./0000775000175000017500000000000014350602071007265 5ustar eddedd./ltmain.sh0000644000175000017500000117716713707046263011141 0ustar eddedd#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-14" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >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 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd _G_rc_run_hooks=false case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do if eval $_G_hook '"$@"'; then # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift _G_rc_run_hooks=: fi done $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, you may remove/edit # any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. In this case you also must return $EXIT_SUCCESS to let the # hook's caller know that it should pay attention to # '_result'. Returning $EXIT_FAILURE signalizes that # arguments are left untouched by the hook and therefore caller will ignore the # result variable. # # Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # No change in '$@' (ignored completely by this hook). There is # # no need to do the equivalent (but slower) action: # # func_quote_for_eval ${1+"$@"} # # my_options_prep_result=$func_quote_for_eval_result # false # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # args_changed=false # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: # args_changed=: # ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" # # is added back to "$@", we could need that later # # if $args_changed is true. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # # if $args_changed; then # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # fi # # $args_changed # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # false # } # func_add_hook func_validate_options my_option_validation # # You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options_finish [ARG]... # ---------------------------- # Finishing the option parse loop (call 'func_options' hooks ATM). func_options_finish () { $debug_cmd _G_func_options_finish_exit=false if func_run_hooks func_options ${1+"$@"}; then func_options_finish_result=$func_run_hooks_result _G_func_options_finish_exit=: fi $_G_func_options_finish_exit } # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd _G_rc_options=false for my_func in options_prep parse_options validate_options options_finish do if eval func_$my_func '${1+"$@"}'; then eval _G_res_var='$'"func_${my_func}_result" eval set dummy "$_G_res_var" ; shift _G_rc_options=: fi done # Save modified positional parameters for caller. As a top-level # options-parser function we always need to set the 'func_options_result' # variable (regardless the $_G_rc_options value). if $_G_rc_options; then func_options_result=$_G_res_var else func_quote_for_eval ${1+"$@"} func_options_result=$func_quote_for_eval_result fi $_G_rc_options } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= _G_rc_options_prep=false if func_run_hooks func_options_prep ${1+"$@"}; then _G_rc_options_prep=: # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result fi $_G_rc_options_prep } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. if func_run_hooks func_parse_options ${1+"$@"}; then eval set dummy "$func_run_hooks_result"; shift _G_rc_parse_options=: fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then _G_rc_parse_options=: break fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false break ;; esac $_G_match_parse_options && _G_rc_parse_options=: done if $_G_rc_parse_options; then # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result fi $_G_rc_parse_options } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd _G_rc_validate_options=false # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" if func_run_hooks func_validate_options ${1+"$@"}; then # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result _G_rc_validate_options=: fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE $_G_rc_validate_options } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname $scriptversion Debian-2.4.6-14 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= _G_rc_lt_options_prep=: # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; *) _G_rc_lt_options_prep=false ;; esac if $_G_rc_lt_options_prep; then # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result fi $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd _G_rc_lt_parse_options=false # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"} ; shift _G_match_lt_parse_options=false break ;; esac $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done if $_G_rc_lt_parse_options; then # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result fi $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC # -static-* direct GCC to link specific libraries statically # -fcilkplus Cilk Plus language extension features for C/C++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: ./README.md0000664000175000017500000000111713707072036010553 0ustar eddedd ## dieharder ### Status This is the maintenance "upstream" repo to regroup updates made for the [Debian package dieharder](https://tracker.debian.org/pkg/dieharder). The repo was spawned off the [Debian package repo](https://salsa.debian.org/edd/dieharder) and contains its full history, which includes the full package history as well. There is another repo [containing mostly Robert's work](https://github.com/eddelbuettel/dieharder-rgb) as transfered from the old Google Code SVN repo. ### Maintainer Dirk Eddelbuettel ### Authors Robert G. Brown, Dirk Eddelbuettel, David Bauer ./configure.ac0000664000175000017500000001326214350422742011564 0ustar eddedd#================================================================== # Process this file with autoconf to produce a configure script. # Make changes to the version number(s) in particular ONLY here. #================================================================== AC_PREREQ(2.59) #================================================================== # Be sure to set DIEHARDER_LT_VERSION below at the same time # you change this: #================================================================== AC_INIT([dieharder], [3.31.1]) AM_INIT_AUTOMAKE([-Wall]) AC_CONFIG_SRCDIR([dieharder.abs]) RELEASE=1 AC_SUBST(RELEASE) AC_CONFIG_HEADERS([config.h]) # AM_MAINTAINER_MODE AC_DEFINE([RELEASED], [], [Description]) #================================================================== # Library versioning (current:revision:age) # See the libtool manual for an explanation of the numbers. # NOTE WELL! One MUST bump LT_VERSION along with AC_INIT, # apparently. # # dieharder-1.0 libdieharder 0:0:0 #================================================================== # This command "should" keep libtool up to date. AC_CONFIG_MACRO_DIR([m4]) LT_INIT AC_SUBST([LIBTOOL_DEPS]) DIEHARDER_LT_VERSION="3:31:1" AC_SUBST(DIEHARDER_LT_VERSION) DIEHARDER_LIB_VERSION=3.31.1 AC_SUBST(DIEHARDER_LIB_VERSION) case "$VERSION" in *+) AC_DEFINE(RELEASED,0) ;; *) AC_DEFINE(RELEASED,1) ;; esac AC_SUBST(RELEASED) #================================================================== # Check for which system. #================================================================== AC_CANONICAL_HOST #================================================================== # Checks for programs. #================================================================== AC_LANG(C) AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_MAKE_SET #================================================================== # OK, these five macros prevent my personal path from appearing # in the default Makefile, and actually should make it work to # rebuilt itself even if somebody completely blows off running # ./autogen.sh. And it ALMOST WORKS #================================================================== ACLOCAL="${SHELL} ./missing --run aclocal" ACTAR="${SHELL} ./missing --run tar" AUTOCONF="${SHELL} ./missing --run autoconf;echo \"Run ./configure\";exit" AUTOHEADER="${SHELL} ./missing --run autoheader" AUTOMAKE="${SHELL} ./missing --run automake --add-missing --copy --gnu" AC_SUBST(ACLOCAL) AC_SUBST(ACTAR) AC_SUBST(AUTOCONF) AC_SUBST(AUTOHEADER) AC_SUBST(AUTOMAKE) #================================================================== # Disable unnecessary libtool tests for c++,fortran,java #================================================================== define([AC_LIBTOOL_LANG_CXX_CONFIG], [:]) define([AC_LIBTOOL_LANG_F77_CONFIG], [:]) define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:]) AC_PROG_LIBTOOL #================================================================== # Check compiler features #================================================================== AC_TYPE_SIZE_T # AC_C_CONST AC_C_VOLATILE AC_C_INLINE DIEHARDER_CFLAGS="" dieharder_CFLAGS="-std=c99 -Wall -pedantic" libdieharder_lo_CFLAGS="-Wall -pedantic" DIEHARDER_LIBS="-L$libdir -ldieharder" ACLOCAL_AMFLAGS="-I m4" AC_SUBST(DIEHARDER_CFLAGS) AC_SUBST(dieharder_CFLAGS) AC_SUBST(libdieharder_lo_CFLAGS) AC_SUBST(DIEHARDER_LIBS) AC_SUBST(ACLOCAL_AMFLAGS) #================================================================== # Checks for libraries, and headers. Test for dependency libraries # FIRST in reverse order that you need -lwhatever to appear on # compile line as it accumulates libraries to build e.g. # -lgsl -lgslcblas # for the SECOND test, required (in that order) to succeed. #================================================================== AC_CHECK_LIB([m],[log]) AC_CHECK_HEADER([gsl/gsl_sf_gamma.h],,[AC_MSG_ERROR([Couldn't find GSL headers. Please install the gsl-devel package.])]) AC_CHECK_LIB([gslcblas], [main],,[AC_MSG_ERROR([Couldn't find libgsl. Please install the gsl package.])]) AC_CHECK_LIB([gsl],[gsl_sf_gamma]) #================================================================== # Check if we're a little-endian or a big-endian system, needed by # brg_endian.h in the build of rng_threefish. This is a very # certain test, and therefore is checked FIRST in this header file. #================================================================== ## AC_DEFUN([AC_C_ENDIAN], ## [AC_CACHE_CHECK(for endianness, ac_cv_c_endian, ## [ ## AC_RUN_IFELSE( ## [AC_LANG_PROGRAM([], [dnl ## long val = 1; ## char *c = (char *) &val; ## exit(*c == 1); ## ]) ## ],[ ## ac_cv_c_endian=big ## ],[ ## ac_cv_c_endian=little ## ]) ## ]) ## if test $ac_cv_c_endian = big; then ## AC_SUBST(LITTLE_ENDIAN,0) ## fi ## if test $ac_cv_c_endian = little; then ## AC_SUBST(LITTLE_ENDIAN,1) ## fi ## ]) ## ## AC_C_ENDIAN # # Per Debian bug report #946774 we can simply do this instead # AC_C_BIGENDIAN([AC_SUBST(LITTLE_ENDIAN,0)],[AC_SUBST(LITTLE_ENDIAN,1)]) #================================================================== # Checks for typedefs, structures, and compiler characteristics. #================================================================== AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME #================================================================== # Files that configure needs to process with this so that they are # all happy and macro-replaced. #================================================================== AC_CONFIG_FILES([ dieharder_version.h dieharder.spec dieharder.html dieharder-config dieharder/Makefile include/Makefile libdieharder/Makefile manual/Makefile manual/macros.tex Makefile]) AC_OUTPUT ./aclocal.m40000664000175000017500000012206413707046264011145 0ustar eddedd# generated automatically by aclocal 1.16.1 -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2018 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], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2018 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_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2018 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [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". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2018 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _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. # This creates each '.Po' and '.Plo' makefile fragment that we'll 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" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2018 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # 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.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2018 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. # 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-2018 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_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2018 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_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 is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2018 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_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2018 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_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2018 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_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2018 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_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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) ./Makefile.in0000664000175000017500000011066213707054533011351 0ustar eddedd# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = dieharder_version.h dieharder.spec dieharder.html \ dieharder-config CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/dieharder-config.in $(srcdir)/dieharder.html.in \ $(srcdir)/dieharder.spec.in $(srcdir)/dieharder_version.h.in \ AUTHORS COPYING ChangeLog INSTALL NEWS README compile \ config.guess config.sub depcomp install-sh ltmain.sh missing \ mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ACTAR = @ACTAR@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIEHARDER_CFLAGS = @DIEHARDER_CFLAGS@ DIEHARDER_LIBS = @DIEHARDER_LIBS@ DIEHARDER_LIB_VERSION = @DIEHARDER_LIB_VERSION@ DIEHARDER_LT_VERSION = @DIEHARDER_LT_VERSION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LITTLE_ENDIAN = @LITTLE_ENDIAN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ RELEASED = @RELEASED@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ #======================================================================== # This is revision information, automagically set from autoconf. The # actual version information is set ONLY in configure.ac #======================================================================== VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dieharder_CFLAGS = @dieharder_CFLAGS@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdieharder_lo_CFLAGS = @libdieharder_lo_CFLAGS@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # These are made, in order presented, from the toplevel make SUBDIRS = libdieharder dieharder include # These are automagically included in the make dist rule. I # do believe that I'm going to have to eliminate my own version # of this below. Sigh. Time to actually learn to use the GBT # properly, I suppose. # EXTRA_DIST = autogen.sh dieharder-config.in configure.ac \ # THANKS BUGS SUPPORT dieharder.spec.in dieharder.m4 test_dieharder.sh EXTRA_DIST = autogen.sh set_ld_library_path Copyright #======================================================================== # This is the toplevel Makefile for the dieharder project. It has # some specialized targets: # # make alone should build the entire application as usual # make install should install it. Use configure --prefix= to specify # a toplevel path other than the default /usr. # # make tgz makes $(TGZ) of entire tree for standalone or rpm build # make rpm makes $(RPM) packages built by dieharder.spec # #======================================================================== # These are targets just for me to facilitate project management. #======================================================================== # make svn does a svn commit and creates the timestamp $(SVNTIME) # make sync does a svn commit and syncs to list of svn-tree hosts # make installweb installs to project website for download # make installrepo installs to yum repo # #======================================================================== PROJECT = dieharder LIBRARY = libdieharder LIBTIME = libwulf.time INCTIME = include.time PROGRAM = dieharder PROGTIME = dieharder.time MANUAL = manual MANTIME = manual.time RDIEHARDER = RDieHarder #======================================================================== # Constructs used in project maintenance and installation. # # The destination on an ssh-accessible remote webserver $(WLOGIN), # used as: # $(HOME)/public_html/$(WDIR) #======================================================================== WLOGIN = ganesh.phy.duke.edu WDIR = General ABS = $(PROJECT).abs PHP = $(PROJECT).php #======================================================================== # RPM/tarball target objects. We need rules for all of these. #======================================================================== PROJECTDIR = $(PROJECT)-$(VERSION) TAR = $(PROJECTDIR).tar TGZ = $(PROJECTDIR).tgz SPEC = $(PROJECT).spec #======================================================================== # rpm target special stuff # # To work in userspace, add the following: # %_topdir /home/rgb/Src/redhat # to your personal $(HOME)/.rpmmacros after building # yourself a private copy of the /usr/src/redhat directory structure. # # RPM_TOPDIR=/usr/src/redhat RPM_TOPDIR = $(HOME)/Src/rpm_tree # This is needed to get the right library and binary rpm. ARCH = `uname -i` # ARCH=i386 # These are the three rpms automagically built by the spec SSRPM = $(PROJECT)-src-$(VERSION)-$(RELEASE).src.rpm SRPM = $(PROJECT)-$(VERSION)-$(RELEASE).src.rpm LRPM = libdieharder-$(VERSION)-$(RELEASE).$(ARCH).rpm PRPM = dieharder-$(VERSION)-$(RELEASE).$(ARCH).rpm #======================================================================== # Make targets for checking in to svn, syncing svn repo from a local # (e.g. laptop) to one or more network/primary repos. #======================================================================== SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/$(PROJECT) SVNTIME = $(PROJECT:=.svn.time) REPOSERVER = uriel REPOPATH = /var/www/html/fc/6/local/ #======================================================================== # This target takes the dieharder sources and "magically" transforms # them into RDieHarder sources. RDHTAR = RDieHarder_@VERSION@.tar RDHPKG = RDieHarder_@VERSION@.tar.gz all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 dieharder_version.h: $(top_builddir)/config.status $(srcdir)/dieharder_version.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ dieharder.spec: $(top_builddir)/config.status $(srcdir)/dieharder.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ dieharder.html: $(top_builddir)/config.status $(srcdir)/dieharder.html.in cd $(top_builddir) && $(SHELL) ./config.status $@ dieharder-config: $(top_builddir)/config.status $(srcdir)/dieharder-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile #======================================================================== # List of variants one can make. all is the default. We always # presume the simplest of dependencies and remake if includes change # for example. #======================================================================== all: $(LIBTIME) $(PROGTIME) $(INCTIME) # This is not, actually, a particularly useful toplevel target. To # work correctly it also would require a full parsing of all # lower level dependencies. I'm leaving it in for the moment just # to have a default target at the toplevel that CAN be used to test. $(LIBTIME): (cd $(LIBRARY); \ make) $(INCTIME): (cd include; \ make) $(PROGTIME): (cd $(PROGRAM); \ make) $(ABS): Makefile cat $(ABS) | \ sed -e 's/^\(

Version \)\(.*\)/\1$(VERSION)<\/H2><\/center>/' > /tmp/$(ABS).$$ mv /tmp/$(ABS).$$ $(ABS) #======================================================================== # This is a required target for both its own sake and to support the # rpm build. It has to run unconditionally when called. Note that we # make PRECISELY what we need in terms of the source directories, # excluding all restricted material and irrelevant data. #======================================================================== tgz: Makefile COPYING Copyright NOTES README $(SPEC) $(ABS) $(PHP) ( rm -rf $(TAR) $(TGZ) $(PROJECTDIR); \ mkdir -p $(PROJECTDIR); \ cd $(LIBRARY); \ make clean; \ cd ..; \ cp -r $(LIBRARY) $(PROJECTDIR); \ cd $(PROGRAM); \ make clean; \ cd ..; \ cp -r $(PROGRAM) $(PROJECTDIR); \ cd $(MANUAL); \ make clean; \ cd ..; \ cp -r $(MANUAL) $(PROJECTDIR); \ cp -r include $(PROJECTDIR); \ cp -r m4 $(PROJECTDIR); \ cp $(ABS) $(PROJECTDIR); \ cp $(PHP) $(PROJECTDIR); \ cp Makefile $(PROJECTDIR); \ cp Makefile.am $(PROJECTDIR); \ cp Makefile.in $(PROJECTDIR); \ cp configure $(PROJECTDIR); \ cp config.h.in $(PROJECTDIR); \ cp $(SPEC).in $(PROJECTDIR); \ cp dieharder_version.h.in $(PROJECTDIR); \ cp dieharder.html.in $(PROJECTDIR); \ cp dieharder-config.in $(PROJECTDIR); \ cp autogen.sh $(PROJECTDIR); \ cp missing $(PROJECTDIR); \ cp aclocal.m4 $(PROJECTDIR); \ cp mkinstalldirs $(PROJECTDIR); \ cp ltmain.sh $(PROJECTDIR); \ cp depcomp $(PROJECTDIR); \ cp configure $(PROJECTDIR); \ cp configure.ac $(PROJECTDIR); \ cp config.guess $(PROJECTDIR); \ cp config.sub $(PROJECTDIR); \ cp config.status $(PROJECTDIR); \ cp install-sh $(PROJECTDIR); \ cp Copyright $(PROJECTDIR); \ cp COPYING $(PROJECTDIR); \ cp INSTALL $(PROJECTDIR); \ cp AUTHORS $(PROJECTDIR); \ cp NEWS $(PROJECTDIR); \ cp ChangeLog $(PROJECTDIR); \ cp README $(PROJECTDIR); \ cp NOTES $(PROJECTDIR); \ tar -cvpf $(TAR) \ --exclude=.svn \ --exclude=Cruft \ --exclude=Exclude \ --exclude=*.tar \ --exclude=*.tgz \ --exclude=*.rpm \ ./$(PROJECTDIR); \ gzip $(TAR); \ mv $(TAR).gz $(TGZ); \ rm -rf $(PROJECTDIR)) libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck $(TGZ): tgz $(SRPM): rpm $(LRPM): rpm $(PRPM): rpm #======================================================================== # One stop shop. Basically we build this every time, we hope. rpm: Makefile $(TGZ) rm -rf /var/tmp/dieharder* cp $(TGZ) $(RPM_TOPDIR)/SOURCES cp $(SPEC) $(RPM_TOPDIR)/SPECS rpmbuild -ba --target=$(ARCH) $(RPM_TOPDIR)/SPECS/$(SPEC) cp $(RPM_TOPDIR)/SRPMS/$(SSRPM) $(SRPM) cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(LRPM) . cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(PRPM) . # I can leave this target in here, but I have to run it BY HAND right # before a release build. Otherwise a src rpm rebuild can fail for # people without the svn repo in odd ways. ChangeLog: $(SVNTIME) svn2cl dieharder.svn.time svn: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) sync: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . # Do the commit rsync -avz --delete $(SVNPATH) ganesh.phy.duke.edu:/home/einstein/prof/rgb/Src/svn-tree rsync -avz --delete $(SVNPATH) 209.42.212.5:$(SVNTREE) cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) installweb : $(TGZ) $(RPM) $(SRPM) $(LRPM) $(PRPM) $(MRPM) $(ABS) $(PHP) (ssh $(WLOGIN) mkdir -p public_html/$(WDIR)/$(PROJECT);\ rsync -avz $(TGZ) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(SRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(LRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(PRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(MRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(ABS) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ ssh $(WLOGIN) "cd public_html/$(WDIR)/$(PROJECT);ln -sf $(TGZ) $(PROJECT).tgz"; \ ssh $(WLOGIN) "cd public_html/$(WDIR)/$(PROJECT);ln -sf $(SRPM) $(PROJECT).src.rpm"; \ ssh $(WLOGIN) "cd public_html/$(WDIR)/$(PROJECT);rm Current*;touch Current_Is_$(VERSION)"; \ rsync -avz $(PHP) $(WLOGIN):public_html/$(WDIR)/) installrepo : $(TGZ) $(RPM) $(SRPM) $(LRPM) $(PRPM) $(MRPM) $(ABS) $(PHP) (ssh $(REPOSERVER) mkdir -p $(REPOPATH);\ rsync -avz $(TGZ) root@$(REPOSERVER):$(REPOPATH);\ rsync -avz $(SRPM) root@$(REPOSERVER):$(REPOPATH)/SRPM;\ ssh $(REPOSERVER) mkdir -p $(REPOPATH)/$(ARCH);\ rsync -avz $(LRPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ rsync -avz $(PRPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ rsync -avz $(MRPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ ssh root@$(REPOSERVER) "cd $(REPOPATH)/$(ARCH);createrepo .") $(RDHPKG): rdhpkg rdhpkg: rm -rf RDieHarder/src/*.h RDieHarder/src/*.c \ RDieHarder/src/*.o RDieHarder/src/Makefile RDieHarder/src/*.so cp dieharder/*.c RDieHarder/src/ cp dieharder/*.h RDieHarder/src/ mv RDieHarder/src/rdieharder.c RDieHarder/src/dieharder.c cp dieharder/Makefile.RDH RDieHarder/src/Makefile tar -cvpf $(RDHTAR) RDieHarder gzip -f $(RDHTAR) # This can be run by anybody rdhclean: rm -rf RDieHarder/src/*.h RDieHarder/src/*.c $(RDHTAR) $(RDHPKG) \ RDieHarder/src/*.o RDieHarder/src/Makefile RDieHarder/src/*.so # This can be run as anybody rdhprep: rm -rf RDieHarder/src/*.h RDieHarder/src/*.c \ RDieHarder/src/*.o RDieHarder/src/Makefile RDieHarder/src/*.so cp dieharder/*.c RDieHarder/src/ cp dieharder/*.h RDieHarder/src/ mv RDieHarder/src/rdieharder.c RDieHarder/src/dieharder.c cp dieharder/Makefile.RDH RDieHarder/src/Makefile # This has to be run only as root, sorry. rdh: $(RDHPKG) R CMD INSTALL $(RDHPKG) # 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: ./m4/0000775000175000017500000000000013707046263007617 5ustar eddedd./m4/libtool.m40000644000175000017500000112676313707046263011543 0ustar eddedd# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS ./m4/ltversion.m40000644000175000017500000000127313707046263012107 0ustar eddedd# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) ./m4/lt~obsolete.m40000644000175000017500000001377413707046263012445 0ustar eddedd# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) ./m4/ltoptions.m40000644000175000017500000003426213707046263012121 0ustar eddedd# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) ./m4/ltsugar.m40000644000175000017500000001044013707046263011537 0ustar eddedd# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) ./dieharder-config.in0000775000175000017500000000163213707046103013017 0ustar eddedd#! /bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ usage() { cat < Copyright (C) 19yy 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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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. ./compile0000755000175000017500000001632713707046265010666 0ustar eddedd#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ./ChangeLog0000664000175000017500000047127313707046103011060 0ustar eddedd------------------------------------------------------------------------ r529 | rgbatduke | 2011-04-01 13:49:31 -0400 (Fri, 01 Apr 2011) | 117 lines OK, this is a fairly enormously major brutal checkin. Both dieharder and libdieharder are ALMOST -Wall -pedantic clean. To get it there I had to learn several things, such as how to get gcc to ignore "unused variables" that are conveniently in a shared include file but aren't really used in all the modules that share it, the fact that the various flavors of C have varying "maximum string size guaranteed to be supported" limits (none of which are really relevant to gcc, but it complains about them anyway), and more. And of course I had to delete all the cruftish lines of e.g. unused loop variables. I'm not quite done with cleanup -- I may have gone overboard in a place or two and may need to put some things back or address things that might affect function -- but I want to get this all checked in. There are two build errors left -- one is in dieharder/rdieharder.c (and hence is yours, Dirk) and the other is in the skein code (and hence is yours, David). David, I also need you to check a fix I made to the rng_threefish code -- I finally took the time to figure out the dread "dereferencing type-punned pointer breaks strict aliasing rules" warning. I replaced the offending line: *((unsigned long int *) state->block) = s; with unsigned long int *blockptr; ... blockptr = (unsigned long int*) &state->block; *blockptr = s; That is, I read what you were trying to do as "Set the contents of state->block, cast to an unsigned long int pointer, equal to unsigned long int pointer s" which might work but gcc -Wall hated it even before -pedantic and (from what I've read) can have undesired side effects. So I introduced an actual unsigned long int pointer, put the address of state->block in it, and the set its contents equal to s. It didn't seem to break threefish -- I tested the first few returns before and after the fix with -S 1 and they were the same -- and I'm using threefish right now in a validate.sh run to make sure that I didn't egregiously break dieharder with all of the changes. Changes you should be aware of: * To avoid most of the "too long string" errors I went to -std=c95, which permits strings a page in size (4095 bytes). That accommodates the auto-documentation strings in the test headers. There may be another way of doing this -- in fact there are probably two or three -- but to alter the dh headers at this point would (marginally) break the API so it will need to wait for v4, I think. Apparently gcc is about to be dressed up with an __attribute__ that will probably enable extra large or unlimited data strings without complaints which is sensible enough since it works on them anyway AFAICT. * c95 turned off uint translation . I went through a huge block of code turning uint into the two words unsigned int before getting irritated enough to look at the headers where I discovered that yeah, you can turn on the uint -> unsigned int macro with a suitable define. So I did. * c95 turned of BSD math macros in math.h, including M_PI. That seemed really silly, so I turned them back on with a suitable define. I didn't turn on the long forms (they only really make sense for long doubles) but we can do that if we ever need PI to 24 places or whatever it was. * -Wall -pedantic really hates any sort of data that is included in a source file where it isn't used. If we were all perfect programmers, I suppose that we would create enough include files and control where they were included precisely enough that no source file even included an include file with a variable it didn't actually use. Alas, I'm not a perfect programmer and lots of the data structures used only inside certain tests or by certain generators are shared via libdieharder.h with program modules that don't use them. Adding __attribute__((unused)) after the definition but before the = sign basically tells the compiler "Yes, I know, I planned it that way, now shut the fuck up" and passes them through -pedantic without complaint. I suppose that the virtue of the check is that it helps prevent namespace collision, but of course the compiler checks for that anyway and general local vs global rules seem like they would handle any accidents that crop up the right way. If I feel really, really energetic someday I may go and segregate out the data and either add it to the sources directly (in a lot of cases that's a good place for it anyway) or put it in a separate include file per module. OTOH things like the dh headers are shared because I DO access content from them in lots of places and want to be able to get to it from anyplace, so there will always be some ((unused)) attribute variables in the program. Printing out the test description string for any given test, or looking up the default tsamples or psamples, for example, is something any sort of application that uses the libdieharder library might want to do. * As per current GBT recommendations and Dirk's suggestions, all of the auto-whatever stuff in autogen.sh is now basically a single autoreconf call. In fact, it looks like they made autoreconf just because getting all of the things just right after a major GBT update is, in fact, the pain in the ass that it has been to me from the beginning, so this is rather a relief. I did leave the configure call in the bottom, so running autogen.sh should still take one from a clean checkout to make-ready, or of course you can enter autoreconf by hand and run configure by hand as per usual. Hopefully this will all make Debianheads happy...;-) Things that I have NOT done yet -- this checkin is basically six hours of work from 9 to 3 am plus another couple of hours today, so I'm working as fast as I can as it is -- include debugging the endian problem in the threefish (or was it AES?) code on e.g. a sparc or powerpc set to the other endianness and dealing with a few real bug reports that have come in from users already. I wanted to get the code clean first as who knows, maybe doing so will help solve the problem? SO, if you guys could each fix the two remaining problems (or tell me to play through in spite of the fact that I'm not sure what is being accomplished and what would break what) then I'll try to move on to the next step. rgb ------------------------------------------------------------------------ r523 | rgbatduke | 2011-03-10 11:09:12 -0500 (Thu, 10 Mar 2011) | 4 lines A last minute oops. I wanted to mark operm5 as good, and mark all of the monkeys suspect (as they can pretty easily be run to failure for good generators still). ------------------------------------------------------------------------ r510 | rgbatduke | 2011-01-07 16:19:40 -0500 (Fri, 07 Jan 2011) | 31 lines This is a WORKING snap and bump to 3.29.6beta. I actually fixed several things that I broke before in the rng selection process. New features: rng_kiss -- a damn fine rng. Faster than mt, better than mt except for period. rng_XOR -- Select this rng, and a list of others, e.g. ./dieharder -g 207 -g 208 -g 14 -g 6 -g 205 -a dieharder will then return the output of 208 (kiss), 14 (mt19937_1999), 6 (gfsr4) and 205 (aes) all xor'd together. Period infinite, no LESS random than the MOST random of the generators alone. The price you pay is sure, 2, 3, 4 times slower. But this is now the official gold standard dieharder testing generator, as finding something randomer will be difficult and of longer period impossible (what is the least common multiple of 19937, 121, and all the rest? 2 to that power, like that). I'm working on superkiss, a vectorized version of kiss with an insanely long period, but the double precision part is broken and I don't see why. The integer part works. I'll figure it out maybe tonight, and have a few other Marsaglia generators to add. Then I'll return (finally) to tests, with the gold standard generator well and truly in place. At least three dieharder (diehard) tests are broken, and I'd like to fix at least ONE of them before I get bogged down teaching again. rgb ------------------------------------------------------------------------ r508 | rgbatduke | 2010-02-19 13:13:56 -0500 (Fri, 19 Feb 2010) | 9 lines Oops, forgot to update FIRST. This should get me back in sync. You guys should ignore this; I'm rearranging my whole source tree on my laptop(s), dieharder included, and am just trying to make sure that the rebuilt one is clean. I also haven't completely forgotten the last post/request for interface room -- I've just been insanely busy and haven't had time to even think about it for the last few weeks. But I will get back there, I promise. ------------------------------------------------------------------------ r498 | rgbatduke | 2009-10-28 01:48:25 -0400 (Wed, 28 Oct 2009) | 28 lines Wow, a lot of stuff. This checkin contains a working -Y 2 option for "test to destruction" where ttd is by default a return pvalue of 0.000001 or less OR getting to 10000 samples alive (both parameters can be set on the command line with -X tolerance and -Z cutoff). I actually did it two ways, and will keep the second (better) one and shortly remove the cruft in std_test.c. In addition I had to update the help, I updated the output routines in output_rnds so I could dump a list of formatted floats (to test another rng tester that alas was so broken it couldn't read any format I tried anyway), I fixed and updated the man page, I got rid of the old overlap variable (no longer desireable or necessary, although I have a bit of cruft left behind to clean up still). As a result of the initial ttd test, I am certain that there is a problem with diehard_dna, one that causes it to fail aes at 0.000001 in 1500-4000 samples. This is odd, since this test has an "exactly" computed mean and sigma target. I may try threefish in a second to see if it fails too, in the same general order. Haven't done the auto-xor generator thing yet. I still have to implement -Y 1 (resolve ambiguity mode) where it will force a test to fail or come back up with more samples, but it should be straightforward. However, it is almost 2 am and I teach way too early, so it is off to bed. rgb ------------------------------------------------------------------------ r497 | rgbatduke | 2009-10-22 09:45:52 -0400 (Thu, 22 Oct 2009) | 20 lines This is a not-quite-yet-broken checkin of -Xtreme mode changes. Three new control variables are in place. They are parsed (untested). They are used in std_test to allocate much larger pvalue vectors (Xcutoff in size) at test initialization time. I'm JUST READY to hack into the main std_test execution loop with case switches or other conditionals and implement at least resolve ambiguity and ttd modes. But as usual, I have to go in and teach. At the moment, though, DH still builds and runs -a correctly, so it seems like a good idea to check in a still working snap in case I break everything and want to start over from here. Oh, I also am cleaning up a bit and made the multiply_p variable (-m option) a double, so you CAN enter -m 0.1 and run only 10 psamples for a fast version of -a(ll). At this point a lot of debugging is just ensuring that all the tests run, and it is a PITA to wait 30+ minutes for a -a(ll) run to get through. So you now CAN test fewer than the default number of psamples in an -all run, even though most people won't use the option in actual testing. The usual usage, -m 10 or -m 100, works fine still. ------------------------------------------------------------------------ r495 | rgbatduke | 2009-10-20 14:25:32 -0400 (Tue, 20 Oct 2009) | 34 lines I'm checking in a lot of changes down below. -m is implemented and documented. -k is implemented and documented. The man page is fixed (post good-kstest and aes/threefish). The endian bug went away when I refreshed the include files, making me wonder if it wasn't some sort of strange GBT stuff and not a real problem -- I left in the endian code in configure.ac but don't use it. I re-fixed diehard_runs.c -- it was broken post patching but now seems good. I filed some documentation and bug reports. I fixed a number of pernicious warnings about needing casts (one still remains in threefish, but it is David's and I don't know how to fix it). I worked on dieharder.html.in pretty substantially to get it to match all of the above. Next, -x (and maybe -X). (p.s. -- Welcome David.) (p.p.s. -- I'm still testing -- sigh, forever -- but it looks like all non-deprecated tests are working OK in this snap, and that the -m feature works nicely. I documented timings for the k options, and basically it comes down the kstest being too slow to do large numbers of samples without switching over to the asymptotic form of the test at some point. I mean, going from three minute runs to over three hours and still counting when I quit for a factor of 10 difference in the number of samples, really serious nonlinear gains in the amount of work/time required, and this was still -k 1 with Marsaglia's more modest speedup, not even the "exact" mode with no speedup at all. This will quite possibly require some further hacking of the boundaries for a crossover that is "practical" and not too inaccurate as we gain experience with our own patience, especially as we implement a -x like option that just keeps crankin' on the number of samples to hit a prespecified tolerance for failure.) ------------------------------------------------------------------------ r494 | rgbatduke | 2009-10-19 09:46:39 -0400 (Mon, 19 Oct 2009) | 3 lines This is all of the Bauer patches. Some are tested, but the testing continues. ------------------------------------------------------------------------ r493 | rgbatduke | 2009-10-18 10:43:52 -0400 (Sun, 18 Oct 2009) | 108 lines This is checking in what will be 3.29.4beta. Primary fixes so far: Several changes to configure.ac to eliminate all reference to libaes and to set macros ENDIAN_BIG or ENDIAN_LITTLE to 1 in the configure stage of the build. I plan to insert a very simple prequel in Brian Goodman's brg_endian.h header file that handles endian issues cleanly and skips most of the stuff below for little endian. I do need to ensure that it builds on i386 as well (when I'm done) as I have a report that 3beta doesn't build clean on that architecture due to problems in this header file. A fix due to Glenn Emelko, GEmelko@aclara.com, where I correctly bumped filecount to type off_t in libdieharder.h but failed to redefine rtot and rptr accordingly in the rng_file_input.c struct and code. He was running 18 GB raw files and obviously this overflowed uint variables with bad results. Oops, and thanks Glenn. I am trying to get sts_serial.h to run at 24 bits by default, not 16 (I think that this will still take a not unreasonable amount of time). The problem is that sts_serial doesn't use bits.c calls to parse out the next 24 bits, it just grabs 16 bit, then the next 16 bits, out of 32 bit uints. This is fast but not scalable. I have to go in and edit the code to use bits calls to get the next 24 bits, no foolin, or better yet use -n ntuple to set the maximum number of bits teste (that's my real goal, with 24 being the default). Plans: David Bauer sent me a fairly extensive patch against 3.29.3beta that fixes some memory leaks and/or speed issues in bits (?) as well as fixing some parts of the diehard OP code -- probably fixing Marsaglia's bugs and not mine, but hard to say. There are bugs in there and I've already squashed several so it wouldn't surprise me if there are more (even more of my own:-). I'm going to TRY to implement most of his fixes if they work well and seem to fix something that makes sense to me, although I'd feel better (per fix) if I could find a test case that illustrates the failure. I may have to ask him how he found the bugs so I can document them in svn somewhere, later. Memory leaks of course are relatively easy and again, I could easily have created some -- getting rid of them is definitely called for. David is also looking at the rgb_bitdist tests (which SHOULD be as sensitive as the OP tests if cranked up to the correct degree) -- there may be some fixes there coming. Finally, I have a few operational changes in mind -- primarily adding or altering the new interface in a couple of small ways. Kuiper will go away as an option (but not the code -- I'll leave a macro in place that can switch it back on in case there is ever any point in reconsidering the test, if for example I or David or somebody else figures out an exact CDF for it so it becomes as accurate and perhaps faster than KS, or it is needed for a specific rng test in the future. -k flags will be used to control how hard ks works (and hence how fast vs accurate dieharder is) with a default of pretty fast, pretty accurate and alternatives of slow but to-convergence-exact and really fast but only accurate enough for the short version of the -a(ll) run. I'd also like to introduce two new run modes controlled by flags. One of them, -m(ultiplier), will allow the user to enter a scale factor to be applied to the default 100 -psamples used in -a(ll) runs (otherwise ignored). So if one want to run all the tests but with 1000 psamples per test (or 10x whatever the per-test default is) one runs -a -m 10. This should make it MUCH easier to test to destruction, increase test resolution, etc. Second, I want to introduce a flag that runs a test "to failure" -- something I've planned to do for a long time. David has already hacked in his own version of doing this, and I used to do something very similar in my numerical simulations. The idea of running in -x(treme) mode (or whatever I name the flag) would be to start with e.g. 100 pvalues and then add 100 pvalues at a time to the test run until the final pvalue fails a fairly stringent (user selectable) cutoff. -d 1 -x 0.000001 would add psamples to the birthdays test until the final pvalue is under 0.000001. -d 1 -X 0.000001 would do the same thing, but it would run the test to this degree of failure psamples = 100 times with different rng seeds (if appropriate) and return something like max, min, mean number of psamples required to cause a test failure. SOMETHING like this is going to be needed, because I think it is entirely plausible that some tests have "poisonous" seeds that have just the right prime modulus to introduce correlations in their stream, but that NEARLY ALWAYS are started with seeds that yield good streams. I'd like to have these last two options work for -a -m runs as well, so -a -m 10 -X 0.000001 runs all tests until they fail low or high at one part in a million, 1000 times for different seeds per run, returning the average number of psamples required to reach failure. I'd even like to be able to plot the distribution of this number so one can pick out e.g. bimodal distributions (bad seeds!) etc. At some point being able to do everything that dieharder will want/need to do is going to require a GUI -- something that can generate scatter plots, candlesticks, real non-ascii histograms, line graphs, 2d/3d surfaces. But that's still a ways in the future. -X is going to be pretty tricky as well, as dieharder isn't equipped to return anything but a final cumulative "pvalue" in [0,1] for a test. But it is probably better to do it now in the beta phase where this doesn't really damage any other future dependent interfaces (e.g R). ------------------------------------------------------------------------ r492 | rgbatduke | 2009-10-12 18:53:13 -0400 (Mon, 12 Oct 2009) | 8 lines THis is mostly to check in the dieharder NSF proposal from last year as it has a roadmap for future dieharder development, and I'm thinking hard about adding a few of the many missing generators now that kstest is reliable. I'm still working on kstest, mind you, but it is mostly on the details, not on the basic code. rgb ------------------------------------------------------------------------ r491 | rgbatduke | 2009-10-12 14:55:55 -0400 (Mon, 12 Oct 2009) | 6 lines This actually works PRECISELY for all count ranges. It is still in testing -- I've got a bit of work to do to be ready to release this globally (including letting David test it and see if he agrees) but it should COMPLETELY FIX dieharders final kstest (and I'll give it one last opportunity to fix diehard_sums():-). ------------------------------------------------------------------------ r490 | rgbatduke | 2009-10-12 12:39:51 -0400 (Mon, 12 Oct 2009) | 10 lines Checking in some key papers (and some stuff getting rid of broken diehard_sums altogether for now -- leaving in the test but strongly deprecating it in dieharder). The papers SHOULD permit us to compute the exact CDF for the one-sided KS test against a uniform distribution for small N and thereby make the KS test reliable for all sample sizes. In particular ks_CDF_N.pdf looks like it will do the trick. rgb ------------------------------------------------------------------------ r489 | rgbatduke | 2009-10-11 11:05:24 -0400 (Sun, 11 Oct 2009) | 32 lines FINALLY I got threefish to work. brg_endian.h was broken as shit; it starts off by pulling something from crypt.h that is obviously broken on modern linux boxes (at least my Fedora 11 x86_64 box). The remaining code looks quite general and seems to work, although I have to admit I absolutely hate crap code like this -- it smacks of aimk, imake, and other crap tools that detect platform type using some sort of transient trace from one tool or another that breaks three years later (or rather, requires yet another conditional). I'll leave this in for now in case somebody wants to port to sparc or some bigendian platform, but since we are using threefish only to make random numbers and don't care to ever decrypt the stream of 0's or whatever it is applied to, I honestly doubt that it matters. Getting endianness wrong sounds like it is at worst an extra byte shuffle. Either way, this will be 3.29.2beta and I'll put it up on the dieharder website in a few minutes (after a full -a run of threefish passes). I may add a comment to brg_endian.h indicating my hack, lest people be tempted to use it as if it weren't modified. Grrr. I'm REALLY tempted to just strip it to the two line definition that is all that matters in skein_port.h and screw the whole "automagic" thing. Robust code is robust code, and there are bound to be intrinsically portable ways to handle endianness IF it is really necessary in the first place. At least this finally liberates me to move on and work on kstest and kuiper again. That's been on hold for a few days, but I'm feeling like we're getting close to having one or the other work "perfectly" (if I can find and add the missing O(1/N) correction terms from the literature). ------------------------------------------------------------------------ r488 | rgbatduke | 2009-10-08 12:50:29 -0400 (Thu, 08 Oct 2009) | 25 lines This is most of the threefish stuff required, but I'm still having trouble with the big/smallendian conversions apparently needed by skein in threefish. One function that is supposed to be defined automagically is coming out UNdefined in the linker, which is "bad". I may have to ask David Bauer how he got this to compile. Note that I've added both bauer and emelko's current round of bug reports and remarks to the Bugs directory below. David in particular has been really looking hard at kstests, and with good justification. The kstest is apparently very poorly defined even in stats texts and the literature. It is apparently more broken in R than it is in dieharder, and it is still a bit broken in dieharder. As is so often the case in dieharder problems, pushing the test suite to new limits exposes weaknesses in code that has long been taken for granted because it has never been used for a rigorous analysis of this sort. But it NEEDS a precise ks or kuiper test, not just a sorta-useful approximate one, or one cannot rely on its statements of weakness or failure. Anyway, this checkin is still broken but is within one #define or so of working, I think, once I figure out how to do it without violating the code in the brg_endian.h include that is supposed to automagically select the right Skein function that is currently undefined. ------------------------------------------------------------------------ r487 | rgbatduke | 2009-10-07 12:19:44 -0400 (Wed, 07 Oct 2009) | 16 lines David Bauer contribued two cryptographic grade GSL wrapped rngs (one of which I had been working on myself, but his has no dependencies and it works already). rng_aes appears to work, very respectably. It has minimal controls (compared to aespipe) but aespipe is still there if people want to play with it directly. It isn't too shabby speedwise, actually, for what should be a world-class rng. I'm going to see if he (David) cares if I contribute it back to the GSL -- it needs a few generators like this in its collection. Although as it is GPL the answer is obviously not, I think. In a second I'm going to insert rng_3fish as a second one. These are enormously useful for testing dieharder itself, and as GPL sources will be useful just being part of the dieharder unless/until they make the GSL. ------------------------------------------------------------------------ r486 | rgbatduke | 2009-10-06 14:26:39 -0400 (Tue, 06 Oct 2009) | 3 lines Little fixes, ignore. Added -d 204 to -all properly, fixed its autodocumentation a bit. ------------------------------------------------------------------------ r485 | rgbatduke | 2009-10-06 14:17:43 -0400 (Tue, 06 Oct 2009) | 35 lines This records a validation script to use with aespipe to produce a "standard run" of dieharder in -v3. aespipe with the fixed, trivial 256-bit key in aeskey below, is used to encrypt /dev/zero into a stdin stream and fed to dieharder -a. The encrypted stream should be as close to "truly random" as we can currently manage with simple, reasonably fast tools. The interesting thing is that this stream actually PASSES ALL OF THE TESTS in dieharder, even the "known bad" tests such as diehard_operm5. This makes it very, very useful for comparison purposes. For example, for the first time ever, I feel like I can now say that mt19937 actually FAILS dieharder (or has weaknesses that are explicitly exposed by dieharder) when it consistently has tests (even very specific tests for very specific length ntuples) on which it is weak or fails or exhibits high bias in its output pvalues. To be fair, passing all of the tests isn't necessarily a good thing, since there are over 100 of them including ntuples. One expects 1/100 or 1/200 or thereabouts to be weak for a PERFECT RNG on most runs. Eyeballing the distribution of final P in the aespipe run reveals that dieharder still produces a weak high bias in the final distribution of pvalues, but this is very much in line for the bias revealed by rgb_kstest_test and is therefore very likely an artifact of using -p 100 as the default for most of the tests in -a(ll). I'm going to run the validation line: cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -a with -p 1000 just for grins (which will take the rest of the day, I expect) and see if it doesn't push the final distribution right back where it belongs, with less visible bias towards the 0.9-1.0 range and away from 0.0-0.1 on the bottom. Still, a perfect PASS for a nearly perfect generator. How cool is that? ------------------------------------------------------------------------ r484 | rgbatduke | 2009-10-06 12:45:36 -0400 (Tue, 06 Oct 2009) | 40 lines This is a set of changes that: a) Fix (for the time being) a problem with ltmain.sh, badly. I suspect that I'll need to add a libtoolize command to the autogen.sh script in order to prevent drift from local libtools in the long run, or give in and make it a link to /usr/share/libtool/config/ltmain.sh and pray that this is portable. b) Changes the default ks test in dieharder from broken Kuiper or broken KS to fixed KS. This is an CRITICAL fix and needs to backport to 2.28 as with it dieharder will FINALLY give much more nearly correct pvalues for the relatively small number of pvalue samples in the kstest at the end of each test. With the old code one needed two or three orders of magnitude more samples -- at LEAST -p 10000 -- in order for the final pvalue to be not VISIBLY high biased when applied to perfect uniform deviates. With the fix -p 100 works "OK" although -p 1000 would be better and will probably be the default -a(ll) option in 3.x. The actual fixes are a single line in dieharder/set_globals.c (change the comment name but not the default number of the ks_test global), a single line in libdieharder/kstest.c, and switching the order in libdieharder/std_test.c so that ks_test == 0 runs kstest, not kuiper_kstest. Fixing the documentation is probably not worth it in 2.28. I would suggest still holding out on actually making the fixes for a bit, as I'm actively playing with things and testing out the new code (in a moment with aespipe as I still haven't finished rng_aes). The changes are preserved and saved as 3.29.1beta, though, with the addition of a very useful and useable rgb_kstest_test routine that can be used to further debug and/or improve the kstest used to generate final test pronouncements of pass/fail/weak etc. And we still need to decide if it is time to move on to v3, as a lot of people are using it and it seems to be stable and usable and has lots of bug fixes and feature enhancements (including much better future scalability as I add tests and generators). rgb ------------------------------------------------------------------------ r483 | rgbatduke | 2009-10-06 09:08:59 -0400 (Tue, 06 Oct 2009) | 7 lines The new rgb_kstest_test in this version actually works, but it looks like we have some sort of libtool derived bug in the build. I'm checking in clean so I can rerun libtoolize, which will hopefully get me a new ltmain.sh, which will hopefully build a libtools script that contains the correct ECHO/echo lines and perhaps deals with MODE correctly. ------------------------------------------------------------------------ r482 | rgbatduke | 2009-10-04 09:44:12 -0400 (Sun, 04 Oct 2009) | 15 lines Ignore today's checkins, Dirk. I'm adding a new test (rgb_kstest_test) to test the kstest routines (as well as to MAYBE function as a new test in the suite, but I doubt that it will be sensitive enough to be any use). Basically, I plan to fill a vector with tsamples uniform deviates, run a kstest on them (which tests for uniformity and generates a pvalue that should itself be a uniform deviate) to fill in the usual vector of pvalues and run the final kstest on that. A kstest SHOULD recursively take uniform deviates to a uniform deviate, for a large enough set of uniform deviates, and I want to find out a) if this is true; and b) if it is true just what a "large enough set" is. This test should help me find out both, and if a) is incorrect, to perhaps "fix" the kstest as this is their THEORETICAL behavior and failure to accomplish this indicates a bug in the code or a real problem in the theory... ------------------------------------------------------------------------ r481 | rgbatduke | 2009-10-02 16:32:30 -0400 (Fri, 02 Oct 2009) | 3 lines This checks in what might be a VERY IMPORTANT fix to kstest, due to David Bauer. Needs more testing, though, with a world class crypt. ------------------------------------------------------------------------ r480 | rgbatduke | 2009-03-17 08:27:23 -0400 (Tue, 17 Mar 2009) | 2 lines Checking in so I can leave. ------------------------------------------------------------------------ r479 | rgbatduke | 2009-03-17 00:28:25 -0400 (Tue, 17 Mar 2009) | 3 lines This is broken as far as the aes generator is concerned, AND I'll probably need to put libaes into the dieharder packaging. ------------------------------------------------------------------------ r478 | rgbatduke | 2009-01-29 10:57:43 -0500 (Thu, 29 Jan 2009) | 8 lines Checking in a LOT of changes and additions associated with v3 -- I've been holding them so as not to screw up the RDH side of things before everything stabilizes. A lot of the stuff below is documentation intended to guide future development and additions. Some of it is fixes (data and otherwise) in diehard tests. Some of it fixes the way dieharder (the binary, not library) initializes (and adds local tests) and runs all tests. ------------------------------------------------------------------------ r477 | rgbatduke | 2008-10-08 15:11:30 -0400 (Wed, 08 Oct 2008) | 3 lines Sending in a minor change to START fixing up parsecl.c to be more robust. ------------------------------------------------------------------------ r476 | rgbatduke | 2008-09-29 22:22:38 -0400 (Mon, 29 Sep 2008) | 26 lines This checkin should make Mattias "perfectly happy". It enables: rgb@lilith|B:1140>./dieharder -a -D default -D -1 -D prefix -D no_whitespace -D show_num -s 1 0|rng_name|num|rands/second| 1|mt19937|13|1.17e+08| 0|test_name|num|ntup|tsamples|psamples|p-value|Assessment|Seed 2|diehard_birthdays|0|0|100|100|0.16302070|PASSED|3542794731 2|diehard_operm5|1|5|1000000|100|0.04115096|PASSED|2304163927 2|diehard_rank_32x32|2|0|40000|100|0.92631752|PASSED|2245496723 2|diehard_rank_6x8|3|0|100000|100|0.86585575|PASSED|3223183182 2|diehard_bitstream|4|0|2097152|100|0.60520232|PASSED|2615297461 2|diehard_opso|5|0|2097152|100|0.05852624|PASSED|1542897414 which is, AFAICT, exactly what he wants. Oh, he wants the full test name as an output field option instead of the short name, but he might have to wait on that... This also checks in a couple of minor bugfixes reported by Mattias and Marc Abel. Marc has another feature request I haven't looked at yet. Both of them are using dieharder quite heavily in the beta version, so I'm hoping that it is shaking out. I'm also hoping this round of changes didn't break anything. Not quite ready for a release, but perhaps getting closer. ------------------------------------------------------------------------ r475 | rgbatduke | 2008-09-22 19:10:01 -0400 (Mon, 22 Sep 2008) | 2 lines Added small section to man page on output control. ------------------------------------------------------------------------ r474 | rgbatduke | 2008-09-22 07:24:15 -0400 (Mon, 22 Sep 2008) | 12 lines Small changes to add dieharder-config.in to the Makefile.am and to get the rpm to autobuild with a split between @VERSION@ and @DIEHARDER_LT_VERSION@ -- I basically twinned the latter into @DIEHARDER_LIB_VERSION@. A slight pain, but it means the library can have a different version (no beta) compared to the program (with beta). The successful RPM build means that everything is in place, although there is still cruft in include and probably libdieharder and there may be NON-cruft that isn't in the repo. But I gotta go and won't find it now. ------------------------------------------------------------------------ r473 | rgbatduke | 2008-09-22 03:29:33 -0400 (Mon, 22 Sep 2008) | 24 lines OK, this is PARTIALLY decrufted -- I doubt that it is finished yet, and I haven't even started to tackly the proper decrufting of the library. I've cleaned up the dieharder man page, checked all the autodocumenting features of dieharder, and run a bunch of tests. I've preemptively fixed around three or four bugs, and finished implementing a couple of features that were missing on the previous checkin, e.g. the ability to use any of: dieharder -d diehard_sums -g 6 dieharder -d 14 -g gfsr4 ... (all tests AND rngs selectable by name OR number. It is 3:20 am, and I have to get up by 6:40. It is therefore bedtime. If I haven't forgotten to checkin any files, it should build and run pretty well. Probably not perfectly, but pretty well. Matthias should be happy -- if he uses -c ',' and -D prefix, he'll get close to exactly what he wants. Everything seems to be working as far as I can tell with limited testing. Might be a day or three before I can really tackle this again. G'night. ------------------------------------------------------------------------ r472 | rgbatduke | 2008-09-22 00:13:56 -0400 (Mon, 22 Sep 2008) | 92 lines OK, this is a checkin of dieharder 3.28.0beta. It is NOT fully decrufted, but seems to mostly nearly hopefully all work. That probably means that there are only a dozen or two bugs. There are also a few API features I haven't implemented in the UI yet -- specifically the reporting of errors (like a rewind of a file in mid-test). So this ISN'T really a beta -- more like an alpha. Dirk, please do not start converting this over into Rdh yet. I'm checking it in for two reasons -- one is that I have to remove a whole pile of files to decruft and svn won't let me until I check in. Another is that I NEED to checkin -- it makes me nervous to have this large a delta not checked in. There are probably a couple of critical sources I've forgotten to add entirely and I won't know until I check in and check out and build a fresh clean copy. MOST of what I've done, from Rdh's point of view, should be invisible after Rdh is (fairly minimally) hacked one last time. Basically Rdh should use its own version of set_globals.c (or patch mine, or ifdef mine). Note that there are a lot fewer variables, and this list may shrink a bit more. ntuple's meaning hasn't changed, and you already handle that. Seed and strategy work together -- the latter is a new variable and SHOULDN'T affect Rdh, but just in case, here's what it does. The default strategy for dieharder is to reseed once when a rng is chosen. In the default output view, the seed is written to the rng information part of the header. That way if one wishes to reproduce a test result, one can enter the seed with -S seed. However, this is actually a PROBLEM if one runs multiple tests from this one seed. If one runs tests out of order, the results will be different. This is true for me running all the tests in order via dieharder -a if I should ever change test order, and is true for Rdh if one runs first one test, then another in different orders, from the same single specification of rng and/or Seed. Also, there may be situations where one wants to run a single test multiple times, each time from a newly selected seed to (in essence) determine if some seeds are "bad" for a given rng. dieharder doesn't yet support that, but I think that in R it would be pretty easy. Setting strategy to anything nonzero (say, 1) causes dieharder to reseed the random number generator at the beginning of any test. If -S seed was NOT specified, it just generates a new random seed, so that one could run e.g. diehard_birthdays 100 times in a loop and each one would reseed anew with a new random seed. If -S seed IS specified, it uses the specified seed. If a file is being used for input (not stdin) it forces a rewind at the beginning of each test, which is actually not a bad thing to do as it conserves rands. (I hope, I haven't yet tested this latter feature much yet but it should work.:-). SO, Rdh will probably just leave strategy = 0 alone and either set the global value of Seed for one-time initialization with a fixed seed or not, accepting a one-time random seed. But you CAN support strategy if you ever think you need to. (From my point of view its primary purpose is to make the creation of a validation run trivial -- if I run dieharder -a -S 1 -s 1 I generate a validation table. If I run dieharder -a -S 1 -s 1 -D test_name -D pvalues I generate a very sparse validation table (basically, just test name and pvalue). You can throw a -c ' ' in there if you want white space separation or -c ',' if you prefer comma separated values, etc. You have nearly complete control over dieharder's output at this point, see: dieharder -F for a listing of output control flags. dieharder -l and dieharder -h and dieharder -g -1 all work as before, but I've completely flattened and rationalized test-space so it works just like rng-space (and I mean JUST like it -- very similar setup. I completely changed (seriously streamlined and cleaned up) the test call procedure, so a SINGLE run_test() routine does pretty much all the work, a SINGLE output() routine does all of THAT work, and so that all the dieharder CLI-specific stuff is done in parsecl(), and then only if you enter specific commands, or in dieharder.c (main()). I tried to label things that are CLI specific there as well. If you want to grab a copy of this and build it and play with it, feel free. As soon as this checkin is complete, though, I'm going to start decrufting and checking to be sure I have all the required modules actually in the repo. ------------------------------------------------------------------------ r453 | rgb | 2008-09-10 07:16:17 -0400 (Wed, 10 Sep 2008) | 14 lines Dearie me. This checkin actually works, although I still haven't implemented the output.c patch needed by Dirk or fixed the missing .h file in include/dieharder. Still, I >>HAVE<< turned all the tests into type int's (still no returns) and stripped dieharder.h and split off a globals.h file that I don't think I'm going to need, actually, although it was useful while stripping dieharder.h as a reservoir of codelets that I needed to put back. Anyway, it is entirely possible that Dirk will read these words as I ALSO have dieharder.googlecode.com set up with him on it, and while this checkin is still local (about to be svnsync'd up, not directly checked in) VERY SOON NOW I may try checkout out from the google repo, which will of course check BACK into the google repo thereafter. ------------------------------------------------------------------------ r452 | rgb | 2008-09-09 18:38:14 -0400 (Tue, 09 Sep 2008) | 4 lines This checks in a code fragment that reseeds the rng at the beginning of each run_whatever segment. This fragment "guarantees" that every test run uses a fixed Seed if it is set. ------------------------------------------------------------------------ r451 | rgb | 2008-09-08 01:18:25 -0400 (Mon, 08 Sep 2008) | 2 lines This now works. 2.28.1 indeed I dub thee. ------------------------------------------------------------------------ r450 | rgb | 2008-09-07 23:53:50 -0400 (Sun, 07 Sep 2008) | 3 lines This seems to fix the output of sts_serial so it is consistent. I do have a few small bugs to clean up to get a "perfect" display. ------------------------------------------------------------------------ r449 | rgb | 2008-09-07 13:58:56 -0400 (Sun, 07 Sep 2008) | 2 lines So this is 2.28.1, for the moment and sake of argument. ------------------------------------------------------------------------ r448 | rgb | 2008-09-07 13:58:00 -0400 (Sun, 07 Sep 2008) | 2 lines This is ready to get some sort of rev boost. ------------------------------------------------------------------------ r447 | rgb | 2008-09-07 10:00:25 -0400 (Sun, 07 Sep 2008) | 6 lines This adds a "new" test -- the rgb_lagged_sums test, which is the user test but wrapped up to run on a whole sequence of values, the way I need to make sts_serial run very shortly. It is sufficient to CLEARLY SHOW that mt19937 is actually a weak generator -- it is "too uniform". ------------------------------------------------------------------------ r444 | rgb | 2008-09-06 19:50:52 -0400 (Sat, 06 Sep 2008) | 2 lines This SHOULD be everything. Table output mode should now work for -a. ------------------------------------------------------------------------ r443 | rgb | 2008-09-06 18:43:39 -0400 (Sat, 06 Sep 2008) | 3 lines This fixes four more tests. I can now run a LOT of the way through -a before reverting to the old style output. ------------------------------------------------------------------------ r442 | rgb | 2008-09-06 14:37:53 -0400 (Sat, 06 Sep 2008) | 8 lines This is coming along nicely. I have pretty much everything set up for table vs report output and am streamlining the run_whatever routines to the point where only a tiny bit of test-specific initiation differentiates them. If I could move it into the test itself, I could pretty much completely simplify the dieharder CLI code to a single generic test shell call plus a SMALL set of specialized calls for e.g. benchmarks or non-standard tests that don't return pvalues per se. ------------------------------------------------------------------------ r441 | rgb | 2008-09-05 15:08:47 -0400 (Fri, 05 Sep 2008) | 7 lines This actually now works to display tables. Time to hack hack hack and make ALL the tests work with a table. Right now most of them will ignore it. I really should combine report and table in "results" and put a SINGLE CALL to results in run_whatever.c. Results must then "do it all". Also, I think I'm going to run the benchmarker on ALL non-filesystem tests to get a timing, IF the table/timing flag is set. ------------------------------------------------------------------------ r440 | rgb | 2008-09-05 08:39:13 -0400 (Fri, 05 Sep 2008) | 3 lines This applies a small patch from Dirk that just cleans up a few issues in dieharder.h. ------------------------------------------------------------------------ r439 | rgb | 2008-09-05 07:20:58 -0400 (Fri, 05 Sep 2008) | 3 lines OK, we'll try ONE LAST change -- commenting out the fclose -- before sending this to Dirk. ------------------------------------------------------------------------ r438 | rgb | 2008-09-05 07:16:01 -0400 (Fri, 05 Sep 2008) | 15 lines This is a 2.27.14 checkin. I'll shoot it off to Dirk who is waiting on it. I noted, however, that my NEW permutations test FAILS (or should fail) mt19937! It produces too GOOD a spread of permutations, consistently! This is fascinating information. It means that perhaps operm5 is NOT broken; maybe getting permutations to work out multinomially is the most difficult test one can put an rng to. Something to look at later. This checkin should fix dieharder and libdieharder so that one can run multiple tests (including invocation of the same test or different rngs) from a single dieharder call. This cannot happen in dieharder -- don't worry. But it can and will happen in Rdh and in gdieharder, so it is an important fix nonetheless. ------------------------------------------------------------------------ r437 | rgb | 2008-09-04 17:07:26 -0400 (Thu, 04 Sep 2008) | 20 lines This actually checks in so that we can pop the snapshot number in just a minute -- a major bugfix relative to Rdh. The two problems addressed herein are: a) In order to be able to run many tests, one after another, on many rngs, one after another, I have to be more careful than I have been about allocating and freeing test resources on the one hand, rngs (which must be freed) on the other hand, and resetting the static bit buffers used in bits.c on the third hand. b) I also needed to set up startup with a split into two sections, one that runs only one time period and one that runs every time a new test is created, executed, and destroyed (with everything reset at the end to run a new test). The good thing beyond Rdh in these changes is that several of them are equally necessary in a GUI version e.g. gdieharder. So nothing being done here is wasted... ------------------------------------------------------------------------ r436 | rgb | 2008-08-19 12:44:28 -0400 (Tue, 19 Aug 2008) | 4 lines This really, really should be IT! I dub thee 2.27.12 as I've got to get on with things. This version works for BOTH x86_64 and i386. It should build into debian packages. It should rpmbuild --rebuild. ------------------------------------------------------------------------ r435 | rgb | 2008-08-19 12:34:56 -0400 (Tue, 19 Aug 2008) | 5 lines This is a nearly final (for now) checkin for 2.27.12. It builds decently. I probably need to put back config.sub as it is one of the many things that should get automagically rebuilt -- if I have a placeholder for it already present. ------------------------------------------------------------------------ r434 | rgb | 2008-08-19 12:16:18 -0400 (Tue, 19 Aug 2008) | 4 lines We'll give this a try -- this defines __auto_build_post at the top of the specfile and SEEMS to prevent the check-buildroot crash in rpm building without my particular .rpmmacros. ------------------------------------------------------------------------ r433 | rgb | 2008-08-19 11:50:28 -0400 (Tue, 19 Aug 2008) | 2 lines With any luck at all, this will be ready to fly. ------------------------------------------------------------------------ r432 | rgb | 2008-08-19 11:42:31 -0400 (Tue, 19 Aug 2008) | 2 lines We're working our way back to not losing everything we just did, dammit. ------------------------------------------------------------------------ r431 | rgb | 2008-08-19 11:34:04 -0400 (Tue, 19 Aug 2008) | 2 lines Try try again... ------------------------------------------------------------------------ r430 | rgb | 2008-08-19 11:31:38 -0400 (Tue, 19 Aug 2008) | 3 lines Sending this towards lucifer. We really need to make sure everything is in subversion! ------------------------------------------------------------------------ r429 | rgb | 2008-08-19 07:40:00 -0400 (Tue, 19 Aug 2008) | 4 lines This MAY fix things up so that they rebuild more cleanly. I'll try sending them on to Dirk directly in tarball form to see if they make him all happy. ------------------------------------------------------------------------ r428 | rgb | 2008-08-19 06:43:42 -0400 (Tue, 19 Aug 2008) | 4 lines Well, perhaps we should send this in since we could be suffering from early hard disk crash syndrome. In fact, I should drag out my 8 GB USB flash (at least) and back up Src if nothing else. ------------------------------------------------------------------------ r427 | rgb | 2008-08-19 06:22:07 -0400 (Tue, 19 Aug 2008) | 2 lines Moving math down to bugs, as it is really a set of patches. ------------------------------------------------------------------------ r426 | rgb | 2008-08-19 06:21:33 -0400 (Tue, 19 Aug 2008) | 14 lines We're rearranging this so I can track bugs a bit better. I've really got only two outstanding ones -- getting aclocal to find libtool on a system I don't control or understand (problem possible solved by rerunning ./autogen.sh on that system) and getting the hard path of missing out of the toplevel Makefile and replacing it with a relative one so that it can be built without rerunning autogen.sh, maybe. Oh, and some sort of rpm build wierdness. Also, Dirk wants me to decruft to where -Wall produces no unused variable complaints. We'll see about that -- MAYBE I'll do it, eventually, but unused variables are really pretty harmless and are sometimes useful and I usually ignore them until I have too much time on my hands. ------------------------------------------------------------------------ r425 | rgb | 2008-08-19 06:01:36 -0400 (Tue, 19 Aug 2008) | 4 lines This removes RDieHarder (which Dirk is maintaining separately at this point). It fixes the newly improved man page (which was broken). It removes a redundant R directory. ------------------------------------------------------------------------ r424 | rgb | 2008-08-18 18:10:44 -0400 (Mon, 18 Aug 2008) | 3 lines This fixes a few small errors in the 2.27.11 abstract; no changes to the actual program, though. ------------------------------------------------------------------------ r423 | rgb | 2008-08-18 16:15:49 -0400 (Mon, 18 Aug 2008) | 19 lines This checks in the ChangeLog itself, as well as the last few minor changes in the tests run with the -a command and the test listing function in the CLI. I think I declare this to be: 2.27.11 and we'll start working on 12. I think this actually fixes all the outstanding bugs except for the problem in sums and the problem in operm5 in diehard (and of course there are tests half implemented as well). I THOUGHT I'd fixed diehard_sums, actually, but it still most definitely fails on large -p. I'll have to check sums out explicitly to see why it doesn't seem to work at the moment. It's possible I dropped the fixes when recently changing systems. Anyway, here it is. Bring on the bugs. ------------------------------------------------------------------------ r422 | rgb | 2008-08-18 15:50:15 -0400 (Mon, 18 Aug 2008) | 21 lines This might be ready for a production snapshot, or a testing snapshot, or something like that. At any rate, I have BOTH fixed the generator problem (where rngs have numbers that can change as new generators are added. I fixed this by significantly increasing the size of the types[] vector and working moderately hard to pack it with generators sparsely and sanely -- sparse so there is plenty of room, sane because the space is now blocked out by general category with room to grown. This will NOT GUARANTEE that the GSL will not change its internal order, and dieharder will continue to follow the GSL order where they overlap as nothing else makes sense. I >>also<< think I've fixed -r 5, rgb_permutations. This is a non-overlapping permutations test and runs to more or less arbitrary order (and seems to work quite nicely where it runs, although it gets quite slow when we get to very large permutations as one might expect). I think it is time to bump the minor-minor number to 11 and post it, for the time being with -r 5 still marked out as experimental in the help listing. ------------------------------------------------------------------------ r421 | rgb | 2008-08-18 14:33:06 -0400 (Mon, 18 Aug 2008) | 5 lines This fixes the only real bug, I think -- dieharder now dies with a complaint if it is invoked with an invalid -g entry, sort of. Hmmm, actually I might need to tweak this fix just a bit more to check on the complete range. ------------------------------------------------------------------------ r420 | rgb | 2008-08-18 14:29:17 -0400 (Mon, 18 Aug 2008) | 3 lines This actually works and has the number spaces previously discussed all implemented and everything. ------------------------------------------------------------------------ r419 | rgb | 2008-08-17 20:15:08 -0400 (Sun, 17 Aug 2008) | 6 lines This is a step in the process of figuring out how to "fix" the numbers for rngs to test. I think I'm going to have to move my own setup routine to libdieharder. But I'm still trying to figure out whether or not I can or should replace the gsl code itself, or run something in parallel. ------------------------------------------------------------------------ r417 | rgb | 2008-08-17 13:30:41 -0400 (Sun, 17 Aug 2008) | 3 lines This rearranges the Bugs stuff. I need to create a "cleared" directory in Bugs so I can see what is done, as well. ------------------------------------------------------------------------ r416 | rgb | 2008-08-17 12:31:18 -0400 (Sun, 17 Aug 2008) | 5 lines This updates the abstract, which is also important documentation and has been added to the %doc lines in the specfile. I should really create a make installdoc target in Makefile.am that can install a bunch of documents, but that is for another day. ------------------------------------------------------------------------ r415 | rgb | 2008-08-15 19:03:26 -0400 (Fri, 15 Aug 2008) | 4 lines This is 2.27.10-1, and adds stdin support and fixes a few bugs in the specfile. I'm posting it for distribution, although it is still not "finished" -- this is very much development snapshot time. ------------------------------------------------------------------------ r414 | rgb | 2008-08-15 14:14:45 -0400 (Fri, 15 Aug 2008) | 4 lines This adds the capability to input a binary stream into stdin. This patch is due to Paul Serice. He also included a (standalone?) rng to test with, which I'll mess with in a moment. ------------------------------------------------------------------------ r413 | rgb | 2008-08-03 08:40:35 -0400 (Sun, 03 Aug 2008) | 3 lines Added a version string to help. Probably should add one elsewhere, e.g. at the top of rng listing and test listing. ------------------------------------------------------------------------ r412 | rgb | 2008-08-01 09:11:10 -0400 (Fri, 01 Aug 2008) | 7 lines Had to back off the svn2cl in the rpm build -- it now has to be run BY HAND before just MY rpmbuild (dummy me) so that it won't fail for end users without svn2cl and an svn repo to match. It still builds perfectly, and I'll do a full rpm build cycle including this step to get this last comment into the changelog. ------------------------------------------------------------------------ r411 | rgb | 2008-07-29 12:01:51 -0400 (Tue, 29 Jul 2008) | 46 lines ...And it is. So henceforth ALL of my svn checkins will be duly noted in the ChangeLog, which will therefore get to be very long indeed, as I check in a lot. Damn! I guess this means no more swearing, and I sure hope I haven't impugned anyone's character in the first 400 plus checkins. At least not too much. Hmmm, I wonder just what I HAVE said down there. I tend to treat SVN logs as sort of a free-association commentary about the project in addition to being a place to document changes. Some changes have "real" documentation in the form of the svn diffs, as well -- I haven't been too specific about just EXACTLY what I've changed every time. Well, better a ChangeLog up to date and verbose than one months to years old, and I'll be hogtied and hung by the nose before I write a precisely formatted description of changes day to day as I work on this -- twice. So SVN it is (dating back to when it was really CVS, BTW, imported to SVN). Next, I suppose we should provide at least >>a<< fix for the problem of shifting generator numbers, and on my own I want to clean up some issues with file read -- arrange it so we can read in very large files and eliminate/document file-based usage redundancies such as needing -g 65 AND -f filename. This will be a bit tricky, as dieharder can read in raw (binary) as well as ascii in many formats, and using the -g flag to differentiate at least raw vs cooked has been an easy solution. Regarding numbers, it has been suggested that we do two things: a) Take action to ensure that the numbers don't change any more, even if the gsl or I or a user add new generators. This is actually a bit of a PITA (much as I see the motivation for doing so, as moving numbers break user scripts) because the way generators are added is to run through all the supported ones of each type and just add them in gsl or call order. However, there are several ways I can do it (some requiring more programming than others) and I'll see which one looks to be easiest and most robust. b) Arrange it so we can call generators by name, not just by number. Names would presumably not change even if numbers were inserted, and many users will be interested in testing a single generator they are thinking of using by name. rgb ------------------------------------------------------------------------ r410 | rgb | 2008-07-29 11:40:30 -0400 (Tue, 29 Jul 2008) | 5 lines OK, this seems to work, autobuilding ChangeLog from the svn log of my timestamp file, that basically picks up a message like this one every time I do an svn checkin. We'll see in a moment if this is reflected in ChangeLog on the next build. ------------------------------------------------------------------------ r409 | rgb | 2008-07-29 11:26:48 -0400 (Tue, 29 Jul 2008) | 2 lines Just testing... ------------------------------------------------------------------------ r407 | rgb | 2008-07-22 09:06:14 -0400 (Tue, 22 Jul 2008) | 5 lines This is, in fact, a major checkin. A serious won't-build-on-lib64 bug was identified and resolved, the resolution being the addition of --libdir=... to the ./configure line in the toplevel specfile. Truthfully, I should probably add this to autogen.sh. ------------------------------------------------------------------------ r406 | rgb | 2008-03-27 12:33:04 -0400 (Thu, 27 Mar 2008) | 8 lines This is getting close to a release snapshot once again. We do need to set the number of tests correctly. I may have to give up on operm5 or rgb_operm for the time being (again) but at least I have rgb_permutations and rgb_bitdist, both of which test similar things along with sts_serial ditto. I do need to try to fix sums. I'd love to add a couple of the contributed tests. I do need to go through the opso, dna, etc. tests and "fix" them wrt overlap and so on. ------------------------------------------------------------------------ r405 | rgb | 2008-03-26 21:20:57 -0400 (Wed, 26 Mar 2008) | 4 lines This APPEARS to be a functional permutations test, as expected/hoped. It uses NON-overlapping samples, although at a guess it would work for overlapping ones, just not as well. ------------------------------------------------------------------------ r404 | rgb | 2008-03-26 17:09:43 -0400 (Wed, 26 Mar 2008) | 4 lines This is one, last, poor attempt to get SOME sort of functioning permutations test. I actually had this working "inside" rgb_operm() so I imagine I will have it working again here shortly. ------------------------------------------------------------------------ r403 | rgb | 2008-03-26 13:39:14 -0400 (Wed, 26 Mar 2008) | 6 lines This appears to be "fixed" so that bitstream runs without complaint. I will need to check for memory leaks in the long run (heh heh). This once again takes me to where "everything works" but sums operm5, I think. I'll do another standard S 1 run in a second to make a new snapshot with a fixed/reference bitstring. ------------------------------------------------------------------------ r402 | rgb | 2008-03-24 15:39:49 -0400 (Mon, 24 Mar 2008) | 6 lines This fixes up all the tests that seem to require chisq with explicit cutoffs (frequently one that will be ignored). Cutoff does matter in the rgb_bitdist test, though! I think all of these tests are at last valid through -p 100 and possibly -p 1000, except for sums, bitstream (which I'll fix shortly) and the perennial operm5. ------------------------------------------------------------------------ r401 | rgb | 2008-03-24 00:18:51 -0400 (Mon, 24 Mar 2008) | 4 lines I am HOPING that this is all good, finally. It runs and gives very reasonable answers (once) at -p 1000. Now to see if this is semiconsistent. I've fixed a few zillion small bugs... ------------------------------------------------------------------------ r400 | rgb | 2008-03-22 18:33:47 -0400 (Sat, 22 Mar 2008) | 6 lines This repairs one serious bug -- I was misinitializing itail -- and makes it a bit more precise as far as counting dofs. ------------------------------------------------------------------------ r399 | rgb | 2008-03-22 15:54:02 -0400 (Sat, 22 Mar 2008) | 6 lines This MAY at long last, actually fix rgb_bitdist by simultaneously fixing vtests in general. Our chisq now AUTOMATICALLY bundles the tail(s) or low spots in a chisq, independent of where they occur. It looks like I failed to set ndof correctly, so there will be another round of tests and a quick checkin in a moment. ------------------------------------------------------------------------ r398 | rgb | 2008-03-19 02:23:40 -0400 (Wed, 19 Mar 2008) | 13 lines THIS IS A WORKING STS SERIAL as far as I can tell. It correctly reveals known weak generators. It seems to pass known "decent" generators. It is very sensitive to certain kinds of failure. I now should redo rgb_bitdist to be the NON-overlapping version of this test, at the very least comparing the freq output (generated with the same code, I think, ported the other way) to a multinomial chisq on the expected values. If I can actually check the distribution of each number against an asymptotically normal curve, that would be great too. If I could IN THE SAME TEST check the asymptotic fraction -- something like the monkey tests do -- that would be just fabulous! Especially if I use a normal and make the comparison very good and not empirical. ------------------------------------------------------------------------ r397 | rgb | 2008-03-18 20:45:03 -0400 (Tue, 18 Mar 2008) | 4 lines This is very, very close to working perfectly WITH LABELS for all the histograms generated by sts_serial. We'll save it just because it looks really useful. ------------------------------------------------------------------------ r396 | rgb | 2008-03-18 17:13:51 -0400 (Tue, 18 Mar 2008) | 9 lines As far as I can tell, sts_serial now works perfectly. Time to clean up its act. I will start by decrufting some of the superfluous output from the library call, then I'm going to FIX the test struct so that each test has its OWN descriptor line that can be set along with its pvalue and that will be used by the histogram and/or single line output routine to identify the associated statistic. I have to make it a bit easier to make a single test call and get back the MATRIX of p-values for a set of statistics all generated with the single call. ------------------------------------------------------------------------ r395 | rgb | 2008-03-17 00:58:13 -0400 (Mon, 17 Mar 2008) | 4 lines This, finally, appears to work perfectly. The last thing I need to do is to put all of the pvalues somewhere to be passed back to the caller, in order. ------------------------------------------------------------------------ r394 | rgb | 2008-03-16 21:44:35 -0400 (Sun, 16 Mar 2008) | 3 lines This fixes a build problem on x86_64 -- must not have an explicit -L/usr/lib on x86_64 systems, empirically. ------------------------------------------------------------------------ r393 | rgb | 2008-03-16 20:55:43 -0400 (Sun, 16 Mar 2008) | 8 lines This is much closer. Fixed a few small bugs, and one fairly large one from the transition to a loop. This is "probably" right at this point. The interesting question is whether and how we can generate statistics, pvalues, and results for the whole vector of results. In principle we can, but I don't know that I've done 14 in a row. OR, maybe I'll figure out that all I need to do is m = 16 (as it includes all its smaller cousins, supposedly). ------------------------------------------------------------------------ r392 | rgb | 2008-03-16 15:40:29 -0400 (Sun, 16 Mar 2008) | 3 lines This isn't really done, but we're going to check it in since it sort of mostly works. ------------------------------------------------------------------------ r391 | rgb | 2008-03-12 17:47:53 -0400 (Wed, 12 Mar 2008) | 2 lines Let's see if this revision works... ------------------------------------------------------------------------ r388 | rgb | 2008-03-12 13:34:59 -0400 (Wed, 12 Mar 2008) | 5 lines Sending it ALL in to Duke and upstairs. There is a bug of sorts in our chisq -- we don't have a good way of specifying the number of degrees of freedom for some of the tests and we need to. ------------------------------------------------------------------------ r385 | rgb | 2008-03-12 07:09:20 -0400 (Wed, 12 Mar 2008) | 3 lines This is about as fixed as I can make it without doing algebra. Algebra later, fix code up now. ------------------------------------------------------------------------ r384 | rgb | 2008-03-11 19:26:01 -0400 (Tue, 11 Mar 2008) | 7 lines This APPEARS to check with John E. Davis's patches. diehard_dna is no problem -- the drop-in replacement there produces identical numbers, runs in half the time. rgb_bitdist gives DIFFERENT numbers but is MUCH faster. I still have several "small bugs" to check out including bugs in specific tests, and I probably will need to test the static routines as well. ------------------------------------------------------------------------ r383 | rgb | 2008-03-11 15:49:34 -0400 (Tue, 11 Mar 2008) | 5 lines Preparing to do the next round(s) of patches. I suppose we'll start with the get_bit_whatever patches. First I need to generate a "before" for at least one test that uses them, e.g. birthdays. Then we'll compare it to after with the fixed seed of 1. ------------------------------------------------------------------------ r382 | rgb | 2008-03-11 00:53:27 -0400 (Tue, 11 Mar 2008) | 3 lines This is beefing up the tarball so it just works with the usual preexisting configure. ------------------------------------------------------------------------ r381 | rgb | 2008-03-11 00:25:48 -0400 (Tue, 11 Mar 2008) | 5 lines RIGHT THIS INSTANT we finally have a clean F8 build with the new Makefile.am's and a hacked specfile. Alas, to fix the rpath problem I had to resort to using chrpath, which sucks big time. Unless there is a libtool directive for fixing it, though, I'm SOL. ------------------------------------------------------------------------ r380 | rgb | 2008-03-10 09:41:26 -0400 (Mon, 10 Mar 2008) | 5 lines I don't know -- I think that we're getting closer and closer. We will have the code completely and cleanly GBT based by the end of the morning, I think. Well, maybe not since I'm going in to see if there is anything entrepreneurial going on with Thom LaBean. ------------------------------------------------------------------------ r379 | rgb | 2008-03-10 08:08:18 -0400 (Mon, 10 Mar 2008) | 7 lines OK, this is pretty much all the patches, I think. We should be very close to BSD-ready. I wonder if I can add the word "beta" to the "release" or the "8" in VERSION? Oh, one other thing -- I very definitely need to fix the rpm build (specfile). Let's install into /tmp and see what we've got. ------------------------------------------------------------------------ r378 | rgb | 2008-03-10 07:54:46 -0400 (Mon, 10 Mar 2008) | 6 lines Decrufted the makefiles, added a /dev/arandom rng for BSD, fixed tiny modulus bug in rng list display, added sensible error message extensions for people running across distros for the /dev/?random devices (I "could", of course, use fstat to determine if the devices are there and refuse to add them if they aren't, but that's for the future). ------------------------------------------------------------------------ r377 | rgb | 2008-03-09 22:07:15 -0400 (Sun, 09 Mar 2008) | 4 lines Checking in a mildly broken set. FWIW, a full build actually works. OTOH, make rpm does not. Perhaps not too unsurprising. I need to do a full install into /tmp and see what comes up. ------------------------------------------------------------------------ r376 | rgb | 2008-03-09 15:35:38 -0400 (Sun, 09 Mar 2008) | 4 lines This actually is getting close to being done "the right way". It still builds, and I think builds an RPM, but I need to work on the library side to clean it up as well. ------------------------------------------------------------------------ r375 | rgb | 2008-03-09 14:57:03 -0400 (Sun, 09 Mar 2008) | 2 lines OK, this is really close to being what freebsd wants. ------------------------------------------------------------------------ r374 | rgb | 2008-03-09 13:55:12 -0400 (Sun, 09 Mar 2008) | 5 lines OK, looks like the BSD patch for rngs_gnu_r.c works, and I'm guessing that it will work in general UNLESS it has to be the gnu error() program to interface with R, in which case the patch will have to be ifdef'd. ------------------------------------------------------------------------ r373 | rgb | 2008-03-09 13:38:06 -0400 (Sun, 09 Mar 2008) | 6 lines OK, we are in the middle of a Major Patch Job. We're fixing various small things that are wrong with our GBT port, trying to get it so that it will automagically build on a wider set of systems. The stuff I've done so far still builds (I need to test the rpm build though) and "should" build on gentoo as well as Debian and Fedora/RH. ------------------------------------------------------------------------ r372 | rgb | 2008-02-12 19:01:04 -0500 (Tue, 12 Feb 2008) | 9 lines This fixes the Crispin bug, -- a bad number in one column of s[i][j] relative to the original diehard. Sure hope it is the correct one; the later (c version) diehard matched what I had. I really need to compute the r and s directly. But then, I think I understand the operm5 test well enough to do it "directly" without overlap as a non-overlapping permutations test. It might even be fun to make overlap just an option. ------------------------------------------------------------------------ r366 | rgb | 2008-01-30 07:47:48 -0500 (Wed, 30 Jan 2008) | 2 lines This fixes the abstract AGAIN... ------------------------------------------------------------------------ r365 | rgb | 2008-01-02 11:23:16 -0500 (Wed, 02 Jan 2008) | 4 lines This should be the absolute minimum needed to build clean from tarball using "just" ./configure followed by make. Need to fix the configure script to check for the gsl and anything else that might be needed. ------------------------------------------------------------------------ r362 | rgb | 2007-12-07 12:40:35 -0500 (Fri, 07 Dec 2007) | 2 lines This checkin just updates the release number. ------------------------------------------------------------------------ r361 | rgb | 2007-12-06 14:39:53 -0500 (Thu, 06 Dec 2007) | 7 lines This patches two small things -- adds fflush(stdout); so tees of the results don't make you wait. Removes a development line from diehard_operm5 that shouldn't be there in any KIND of real release. Need to bump the snap revision and reinstall. ------------------------------------------------------------------------ r360 | rgb | 2007-11-19 07:38:36 -0500 (Mon, 19 Nov 2007) | 29 lines This is pretty much a fully functional version. I fixed the last bug, which turned out to be that I had the right idea but missed the: I + P + P* + P^2 + P*^2 + ... and was accidentally doing (when I empirically noted that including k=0 in the sum was necessary) either: I + P + P^2... or 2I + P + P* + ... Added a conditional to eliminate the second k = 0 instance in the core loop summing the fi*fj and got perfect correspondance through -n 3. The -n 3 matrix is different, but pretty obviously a permutation of the AKM matrix as to be expected since the permutation order is arbitrary and they probably didn't use lexical ordering. The eigenvalues, however, are dead on the same! So I'm back up to the point where I should be able to form a test statistic somehow. I have to covariance matrix precisely in hand -- something at this point about weak inverses (weak because it is singular and has no inverse?). A bit curious, actually. We'll see. rgb ------------------------------------------------------------------------ r359 | rgb | 2007-11-19 01:02:46 -0500 (Mon, 19 Nov 2007) | 13 lines OK, this SEEMS to repair everything, except for some spurious normalization stuff that is at least consistent between the exact and experimental matrices. They now come out the same, and I suspect they are proportional to the nilpotent markov processes paper result. For k=2 they clearly are -- a factor of 2. For k=3 it is harder to see for sure. Time to go back to the paper with a calculator. At least now the matrices are properly symmetric, as well. That means that their eigenvalues can be computed with my existing code with its symmetric matrix eigenvalue calls. It does leave me with the substantial problem of computing a test statistic automagically, but one small step at a time... ------------------------------------------------------------------------ r358 | rgb | 2007-11-14 07:01:57 -0500 (Wed, 14 Nov 2007) | 7 lines This works, but my assumptions concerning the inverse of C are incorrect because (gasp) C isn't invertible. It has eigenvalues and eigenvectors. I can compute them, apparently -- that's what this snapshot does (I'm going to compare the results now to what's in my nilpotent processes paper). I still don't quite see how to make my results into a p-value, though, and may need help with this... ------------------------------------------------------------------------ r357 | rgb | 2007-11-13 11:53:48 -0500 (Tue, 13 Nov 2007) | 7 lines It is SO key to preserve this in precisely this state. At this instant in time, cexact and cexpt are identically formed, one running over all permutations and the other from sampling, and they work perfectly EXECPT for the #!)#%@ sign error. I had the sign right, and don't quite see how I changed the code, so I'm about to look. In the meantime, though, we mustn't lose this working form... ------------------------------------------------------------------------ r356 | rgb | 2007-10-31 22:11:57 -0400 (Wed, 31 Oct 2007) | 3 lines This is a broken checkin, but I'm on track for getting operm finished at last, if only I stick to it. ------------------------------------------------------------------------ r354 | rgb | 2007-10-24 15:19:05 -0400 (Wed, 24 Oct 2007) | 2 lines Need to send to duke, dummy.s ------------------------------------------------------------------------ r353 | rgb | 2007-10-24 15:18:41 -0400 (Wed, 24 Oct 2007) | 2 lines This is needed for development, I think. ------------------------------------------------------------------------ r352 | rgb | 2007-10-24 15:17:37 -0400 (Wed, 24 Oct 2007) | 2 lines Trying again. Dunno how this got screwed up but it is. ------------------------------------------------------------------------ r351 | rgb | 2007-10-03 16:16:38 -0400 (Wed, 03 Oct 2007) | 3 lines This is actually a pretty solid implementation of rgb_minimum_distance... ------------------------------------------------------------------------ r350 | rgb | 2007-09-29 17:43:55 -0400 (Sat, 29 Sep 2007) | 3 lines works perfectly. fixed memory leak. about to improve 2dsphere with sort, then run -a. ------------------------------------------------------------------------ r349 | rgb | 2007-09-29 11:24:16 -0400 (Sat, 29 Sep 2007) | 2 lines This is IT and works... rgb_minimum_distance is there. ------------------------------------------------------------------------ r347 | rgb | 2007-09-20 05:37:04 -0400 (Thu, 20 Sep 2007) | 3 lines I need to fix this, but probably not today. In doc there is a "fix me" recipe for 2d spheres. I'm currently adding the Linux Magazine invoice. ------------------------------------------------------------------------ r346 | rgb | 2007-09-19 14:44:10 -0400 (Wed, 19 Sep 2007) | 3 lines Checking in a fix for the BROKEN 2d spheres test. I should be able to fix 3dspheres as well from it. ------------------------------------------------------------------------ r345 | rgb | 2007-08-28 12:54:51 -0400 (Tue, 28 Aug 2007) | 3 lines Bug reported by a user, sort of. The README still said you could just type "make" and you can't. Fixed. ------------------------------------------------------------------------ r344 | rgb | 2007-08-13 18:30:55 -0400 (Mon, 13 Aug 2007) | 2 lines Will this go in? Time will tell... ------------------------------------------------------------------------ r343 | rgb | 2007-07-16 11:20:54 -0400 (Mon, 16 Jul 2007) | 45 lines We are working HARD or confirming or denying dieharder_operm5 AND working out a more general rgb_operm. The convertoperm.pl script once AGAIN confirms that I'm unpacking and repacking (for C) the r and s matrices of diehard_operm correctly. However, AFAICT, the diehard_operm5 JUST tallies up t[120], the count of the different permutation indices. However, all the permutations should occur with a SYMMETRIC probability -- I verified this directly by doing the actual integrals, but in retrospect it is pretty obvious from symmetry alone. The t-vector therefore has NOTHING TO DO with the covariance matrix no matter what you do with it, which may be why diehard_operm5() is a bad test. FWIW, I've added output statements to diehard_operm5() that dump the t-vector and verified empirically that yes, it produces a more or less uniform distribution of bin-probability 1/120 -- one could in fact do a chisq test on this directly and very likely obtain an actual meaningful test, but that is not at all what is done. Note well that the sampled distribution of t[] will not SIGNIFICANTLY vary if computed from overlapping samples! This is simple to see -- it would be just like computing five distinct samplings of non-overlapping samples, each of which would be expected to have exactly the same mean and variance. Because of the overlap there could be a tiny bit of correlation between the FLUCTUATIONS in the MEASURED mean values for any given bin, but the bin mean would have to be unchanged for each overlapping sampling, and for that matter the bin variance for each sampling would ALSO have to be the same. The only effect of combining the overlapping five samplings (each with identical mean and variance!) would therefore be to AT MOST alter the sampled VARIANCE of the bin distribution, per bin, a tiny bit from what one might expect analytically from truly iid samples. One certainly isn't going to see this variation in the variance from two runs -- the expected statistical noise would overwhelm the signal as this is a second moment/cumulant effect, a susceptibility if you like, and hence VERY difficult to resolve. What we in fact must do is (I'm pretty sure) compute c[][] analytically, (which I have done) and then simulate the SAME c[][] directly from the data. Then difference them, which should make the components of c_exp[][] - c_exact[][] presented as vector a zero mean chisq distributed object with N! - (N-1)! DoF or something like that -- 120-24 = 96 for N = 5? Here I'll defer to experts, eventually. ------------------------------------------------------------------------ r342 | rgb | 2007-06-16 01:11:57 -0400 (Sat, 16 Jun 2007) | 2 lines Hopefully this has all the files needed for rgb_operm() checked in. ------------------------------------------------------------------------ r341 | rgb | 2007-06-16 01:09:13 -0400 (Sat, 16 Jun 2007) | 2 lines This actually builds. Let's see if the new test shows up... ------------------------------------------------------------------------ r340 | rgb | 2007-06-15 20:12:58 -0400 (Fri, 15 Jun 2007) | 23 lines Checking in several things. rgb_operm.c is a template for my eventual replacement for operm5. I have about concluded that operm5 is basically a joke -- it is conceptually incorrect. The correct statistic should be the overlapping permutations covariance matrix itself. This test just counts the occurrence of permutations -- the "overlap" part is completely irrelevant in this context. It returns an aggregate count vector whose mean is 1/120 (obviously, permutations of 5 objects = 5! = 120). It makes NO DIFFERENCE AT ALL if this vector is evaluated from overlapping samples or from independent samples -- the mean will be the same. All that MIGHT change is the variance -- since the samples are drawn from an overlapping population, one would expect that their variance would be strictly less than one would expect from truly independent samples. In a minute I'll verify this with the overlap flag and a couple of runs with mt, but I now understand why the test fails. It remains to figure out how to build a CORRECT overlapping permutations test that uses the COVARIANCE of overlapping samples as a statistic. I actually think that this will be pretty easy, but I do have to also understand why the definition in the nilpotent markov chains paper doesn't (I think) lead to the numbers that they publish there. Or rather, why my MUCH SIMPLER algorithm doesn't lead to the same numbers they get. ------------------------------------------------------------------------ r333 | rgb | 2007-06-14 14:54:23 -0400 (Thu, 14 Jun 2007) | 2 lines This should have no operm in it. ------------------------------------------------------------------------ r332 | rgb | 2007-06-14 14:36:51 -0400 (Thu, 14 Jun 2007) | 2 lines Probably a good time to update to lucifer, since it is actually up... ------------------------------------------------------------------------ r331 | rgb | 2007-06-08 10:14:04 -0400 (Fri, 08 Jun 2007) | 3 lines OK, NOW let's actually try to get rng_uvag in, THEN we'll try to increase its speed... ------------------------------------------------------------------------ r330 | rgb | 2007-05-24 13:35:50 -0400 (Thu, 24 May 2007) | 4 lines I'm gradually refining the bitstream variance -- 290 is from over 260000 samples. I'm shooting for a s.d. of a couple of tenths, although honestly it is overkill. ------------------------------------------------------------------------ r329 | rgb | 2007-05-23 01:02:21 -0400 (Wed, 23 May 2007) | 12 lines OK, this is a major enough checkin. I have at long last fixed bitstream.c. Marsaglia's published value of sigma is off by close to a factor of two. sigma is in fact 288.6. I have verified this by simulation with very excellent RNGs, e.g. MT or gfsr4 AND with HARDWARE generators (which were failing bitstream before). Marsaglia couldn't resolve the error (which could just have been due to a typo at some point that was perpetuated) because his test didn't run enough times or plot the pvalues in a histogram, but if you plot the obtained means in a histogram and fit a normal to them, there is absolutely no doubt. ------------------------------------------------------------------------ r328 | rgb | 2007-05-23 00:35:33 -0400 (Wed, 23 May 2007) | 2 lines Forgot to check this one in... ------------------------------------------------------------------------ r327 | rgb | 2007-05-23 00:31:03 -0400 (Wed, 23 May 2007) | 2 lines OK, this is one of two ways to get things to metatron to run faster. ------------------------------------------------------------------------ r326 | rgb | 2007-05-22 21:12:07 -0400 (Tue, 22 May 2007) | 3 lines This fixes several problems, and is working its way towards a new release. ------------------------------------------------------------------------ r325 | rgb | 2007-05-22 10:04:12 -0400 (Tue, 22 May 2007) | 2 lines Silly checkin, as I dropped a file here that goes below. ------------------------------------------------------------------------ r324 | rgb | 2007-05-21 19:46:44 -0400 (Mon, 21 May 2007) | 5 lines Well, we're making LOTS of little changes here. We're splitting off Exit() into its own file so it can be shred, we're moving db_gnu_r_rngs.c to gnu_r_rngs.c, we're adding prototypes and changing the namespace for RDH. All at once. ------------------------------------------------------------------------ r323 | rgb | 2007-05-21 18:14:19 -0400 (Mon, 21 May 2007) | 3 lines Fixed small problem in makefile. Otherwise I'm not sure why these files are changing -- they really shouldn't. ------------------------------------------------------------------------ r322 | rgb | 2007-05-21 15:04:01 -0400 (Mon, 21 May 2007) | 3 lines I do believe that this now is ready to rock and roll. AFAICT, it "just works". ------------------------------------------------------------------------ r321 | rgb | 2007-05-21 14:39:08 -0400 (Mon, 21 May 2007) | 6 lines This is checking in dieharder WITH RDieHarder included and under version control. RDieHarder now depends on dieharder sources. I still haven't got the Makefile, with dependencies, built into the existing Makefile but I will. Basically, I plan three new targets: rdhprep, rdhlib (as root only) and rdhtgz (to make a "package" out of it). ------------------------------------------------------------------------ r320 | rgb | 2007-05-21 09:34:44 -0400 (Mon, 21 May 2007) | 10 lines Well, we've been working hard here. Let me try to summarize. I've instrumented the code to make it "easy" to move it to RDieHarder. Dirk doesn't understand, quite, how I plan to make RDH a "part of" the dieharder source tree, but he will when I'm done as it will then be really easy to prep his cran/debian package. I think, I hope. I think that I'm going to need to pursue dieharder this summer pretty aggressively in addition to working on axioms and other books. I should probably look hard at getting money to support it, as well. ------------------------------------------------------------------------ r319 | rgb | 2007-05-19 08:14:56 -0400 (Sat, 19 May 2007) | 3 lines We've got to get this to lucifer and then try to unpack it on metatron... ------------------------------------------------------------------------ r318 | rgb | 2007-04-29 14:06:32 -0400 (Sun, 29 Apr 2007) | 2 lines This too has to go to lucifer... ------------------------------------------------------------------------ r317 | rgb | 2007-03-12 09:50:39 -0400 (Mon, 12 Mar 2007) | 4 lines This is the last set of changes associated with 2.24.3 -- which is hopefully getting really, really close to a release I can live with. I suppose I should fix the man pages, at least to some extent. ------------------------------------------------------------------------ r316 | rgb | 2007-03-05 10:35:05 -0500 (Mon, 05 Mar 2007) | 6 lines This looks like it successfully splits off the manual so it is no longer autobuilt and is not in the rpms. From here out the manual will be a SEPARATE project aimed square at lulu publication as a book I might even make money from. ------------------------------------------------------------------------ r315 | rgb | 2007-03-05 10:32:43 -0500 (Mon, 05 Mar 2007) | 2 lines We'll work our way there by hook or by crook. ------------------------------------------------------------------------ r314 | rgb | 2007-03-05 10:32:03 -0500 (Mon, 05 Mar 2007) | 2 lines Grrr. I just lost a whole bunch of work... ------------------------------------------------------------------------ r313 | rgb | 2007-03-01 20:00:11 -0500 (Thu, 01 Mar 2007) | 11 lines This has now been fixed, a la Charles Karney's suggestion and Janusz's paper demonstrates, to use overlapping samples by default. Some tests it really DOES matter, if those tests are valid at all (operm5 being a classic example). I still doubt the bitstream-dna test series -- I think that there is NO difference between overlapping and non-overlapping samples there, or at most a tiny shrinking of the distribution variance in the end, as they don't measure "overlap", only a CLT-limited mean. Overlapping 20 bit samples should make a tiny shift in the sample standard deviation and have no other effect in these tests. ------------------------------------------------------------------------ r312 | rgb | 2007-03-01 19:38:44 -0500 (Thu, 01 Mar 2007) | 4 lines This fixes the Bug reported by Brian J. Wong, making bl and bu of a function in bits.c static uint (preserved between calls) instead of dynamic. Probably my bad... ------------------------------------------------------------------------ r309 | rgb | 2007-02-28 10:39:58 -0500 (Wed, 28 Feb 2007) | 2 lines Sending this into SVN on general principles. ------------------------------------------------------------------------ r308 | rgb | 2007-02-27 22:38:22 -0500 (Tue, 27 Feb 2007) | 10 lines This actually seems to work. So we now have 66 random number generators to test. Tony Pasqualoni's Cellular Automaton rng isn't anywhere NEARLY as fast as he alleges compared to the GSL routines inside identical packaging -- in fact it is about par for the course -- but so far it seems to be 1 bit and 2 bit random, and we're working on a -a run that will expose it to the latest/greatest operm5. It remains to be seen whether or not K. Janusz's paper contains algorithms that will let me check and/or correct Marsaglia's operm5, or perhaps extend the operm5 into a RANGE of tests like rgb_bitdist. ------------------------------------------------------------------------ r307 | rgb | 2007-02-27 22:19:36 -0500 (Tue, 27 Feb 2007) | 6 lines This is a very first cut of Tony Pasqualoni's Cellular Automaton random number generator, ported into a gsl standard wrapper. This will let me test Tony's assertion that this is a good, very fast rng in exactly the same wrapper that one can study the other "good" (but slower) rng's. ------------------------------------------------------------------------ r306 | rgb | 2007-02-27 02:10:12 -0500 (Tue, 27 Feb 2007) | 2 lines This is a really modest checkin, but we'll see if it can manage... ------------------------------------------------------------------------ r305 | rgb | 2007-02-27 02:04:24 -0500 (Tue, 27 Feb 2007) | 13 lines TAG 2.24.2 I fixed the -q(uiet) flag so that it works, and decided to bundle all of the above bugfixes and feature shifts into a new minor minor bump. This is the "official" GBT build, if Dirk concurs when he tries it. As far as I know, we're at least back where we were when we started implementing GBT and then some. Now, if only I could figure out the trunk thing. Maybe I'll try doing a checkout and build without the trunk movement... ------------------------------------------------------------------------ r304 | rgb | 2007-02-27 01:31:45 -0500 (Tue, 27 Feb 2007) | 5 lines TAG 2.24.1-2 Fixed documentation and added a hard record of Janusz's bug in operm5. ------------------------------------------------------------------------ r303 | rgb | 2007-02-27 01:06:25 -0500 (Tue, 27 Feb 2007) | 2 lines Sending this to Duke, at least... ------------------------------------------------------------------------ r302 | rgb | 2007-02-27 01:06:09 -0500 (Tue, 27 Feb 2007) | 47 lines This contains a change suggested by the following: % To: Robert G. Brown Cc: Dirk Eddelbuettel Subject: Re: Random R-Package Hello, without going to much into peculiarities (for now, at least) of the rngs and numbers coming from Marsaglia and you (Robert), I would like to give the result from our paper that is directly applicable to the operm5 header you cited below: "...(with # rank 99)..." - this is the point I questioned in our paper. I asked Marsaglia how he got this rank, but I never received the reply from him. I can only presume that he either guessed this number or estimated it (somehow). It remains a mystery to me; like a Marsaglia's voodoo step. The answer should be 96=5!-4!. It is not a big deal of a difference in this case, however, the theorem we proved allows one to consider cased of perm6, perm7 ... and higher with the exact number of degree of freedom calculations. Thus, exact and not guessed results. It is my opinion that the operm-type test is very powerful for detecting local correlations (dependencies) and it should be used for such purpose. So, any algorithmic PRNG will suffer and most likely do not dwell well when exposed to this test. I have not had a chance to do serious experiments on the "natural-random" generators, e.g. alpha-particle counting, radio noise signals and many others. But, I suspect that the operm-type test should do well in this situation. I cannot promise at this time much, but I am going to look at the issues you addressed in your e-mail. However, the questions you've raised are a bit different animals to deal with. In summary, it would be useful, once and for all, to correct 99 degrees to 96 in the operm5 Marsaglia's header file. Maybe, one day, this will happen :-) %, who was running the test on a file of data just one time per test using more or less this line: for t in $(echo "-d"{1..19} "-r"{1..4} "-s"{1..2}); do ./dieharder -q -t9375 -p1 $t;done > results He noted that kstest_kuiper returned 2.0 for input single pvalues of 0.0, and that the test overall returned a pass even if p=1.0 exactly (which it also should not do for single pvalues). I made the following changes. kstest_kuiper now returns a single input pvalue as its output pvalue -- clearly that's all one can do and the right thing to do. The test.c assessment that prints out the results also no longer calls the return a KStest result, and reports failure a bit differently, flagging the high-p failures as well as the low p failures, and adjusting the reported failure range accordingly. To do this I had to use -static in the Makefile to work in the development tree. I'm guessing that I need to add LDFLAG = -dynamic to the build make line in the specfile and should LEAVE it -static in the actual tree so people don't get stymied if they download and build in the tarball directory ("people" including me) while rpm's will still autobuild dynamic correctly. Finally, Matthias reported that the -q flag doesn't work. He's right, but I'm not sure I'm going to fix that. Rather I should probably just kill it and let people filter the output results by hand... ------------------------------------------------------------------------ r284 | rgb | 2007-02-05 23:42:45 -0500 (Mon, 05 Feb 2007) | 4 lines I've just fired this up to the web. I deem it finished enough. Now to backport the library fix to wulfware, and call it a night, very much a night. ------------------------------------------------------------------------ r283 | rgb | 2007-02-05 22:06:02 -0500 (Mon, 05 Feb 2007) | 5 lines OK, it installs and builds PERFECTLY, and THIS time it almost certainly is dynamically linking to libdieharder.so, as it linked without the .a library present at all. I'll now have to go retrofit this to wulfware, as it is not building correctly. ------------------------------------------------------------------------ r282 | rgb | 2007-02-05 21:39:00 -0500 (Mon, 05 Feb 2007) | 3 lines This actually rand and built! Now to try to rebuild it WITHOUT the .a library installed... ------------------------------------------------------------------------ r281 | rgb | 2007-02-05 21:30:42 -0500 (Mon, 05 Feb 2007) | 3 lines Just in case I drop something, I finally seem to have "fixed" the libdieharder makefile. On to fame and glory. ------------------------------------------------------------------------ r280 | rgb | 2007-02-05 15:06:05 -0500 (Mon, 05 Feb 2007) | 2 lines OK, this is crawling on closer to ready to go... ------------------------------------------------------------------------ r279 | rgb | 2007-02-05 14:51:33 -0500 (Mon, 05 Feb 2007) | 2 lines Make this go away, please. ------------------------------------------------------------------------ r277 | rgb | 2007-01-28 10:58:14 -0500 (Sun, 28 Jan 2007) | 6 lines This has a brand new ultra-cool target, "installrepo" that makes the rpms and installs them in the repo, from when yum can install them. BTW, I think I forgot the "requires" tag in the dieharder sources, partly because it seems that it isn't, in fact, required. Hmmm. ------------------------------------------------------------------------ r276 | rgb | 2007-01-27 19:11:19 -0500 (Sat, 27 Jan 2007) | 2 lines This works! ------------------------------------------------------------------------ r275 | rgb | 2007-01-27 17:39:42 -0500 (Sat, 27 Jan 2007) | 2 lines This is getting really close, worth checking in... ------------------------------------------------------------------------ r274 | rgb | 2007-01-27 13:27:14 -0500 (Sat, 27 Jan 2007) | 4 lines This now builds a perfectly rebuildable tarball. We can think about just what else we'd like to add to that tarball in a moment, but first we need to FINALLY get the rpm to build, maybe. ------------------------------------------------------------------------ r273 | rgb | 2007-01-27 12:59:42 -0500 (Sat, 27 Jan 2007) | 2 lines This updates the abstract. ------------------------------------------------------------------------ r272 | rgb | 2007-01-27 12:50:16 -0500 (Sat, 27 Jan 2007) | 3 lines OK, this just maybe is working now with a target that rebuilds both specfiles and Makefiles when the toplevel Makefile is altered. ------------------------------------------------------------------------ r271 | rgb | 2007-01-27 11:57:23 -0500 (Sat, 27 Jan 2007) | 8 lines This is just peachy. make and make install targets work for BOTH dieharder_src and libdieharder directories, which is pretty cool, really. The remaining problem will be how to force a rebuild of the library in such a way that it works when we're developing but doesn't barf when we're rpm-ifying. At this point in time it is high time to try the rpm build. ------------------------------------------------------------------------ r270 | rgb | 2007-01-27 11:41:39 -0500 (Sat, 27 Jan 2007) | 3 lines OK, this is making progress. Time to go back to libdieharder and get a build to work there... ------------------------------------------------------------------------ r269 | rgb | 2007-01-27 11:13:18 -0500 (Sat, 27 Jan 2007) | 3 lines Just making sure this is all ready to run when I start to edit the Makefile in libdieharder. ------------------------------------------------------------------------ r268 | rgb | 2007-01-27 11:08:45 -0500 (Sat, 27 Jan 2007) | 11 lines OK, this is a very painful move. We will, of course, mothball and preserve libdieharder's original svn tree, but now that we're figuring out how to do one specfile, many packages from a single toplevel source tree we no longer wish to maintain libdieharder in a separate subversion project. So we're checking it into this one. All the change history is preserved, but in pieces -- CVSROOT first, subversion's libdieharder second, and from now on, here in the one true dieharder tree and its subversion controlled project. Next we have to get this so that a make install does the right thing. ------------------------------------------------------------------------ r267 | rgb | 2007-01-27 10:53:36 -0500 (Sat, 27 Jan 2007) | 7 lines This is a first cut at making dieharder actually build, after libdieharder is built and installed. From now on BOTH will use ONLY the include files that are stored in ./include, which will actually simplify life tremendously. I may symlink them through to the source directory(s) and may even svn control the symlinks, if svn can manage them. CVS couldn't... ------------------------------------------------------------------------ r266 | rgb | 2007-01-27 10:31:10 -0500 (Sat, 27 Jan 2007) | 5 lines OK, we are within a single step (removing or moving some include files) of being cleaned up and ready to proceed. I'll probably copy at least part of the sm Makefile to get the hang of looping a make through source directories in order to achieve the make install in the right sequence. ------------------------------------------------------------------------ r145 | rgb | 2005-03-14 08:57:05 -0500 (Mon, 14 Mar 2005) | 5 lines This sends in parse.c. Y'know, I'll bet that this is what breaks Dan's access. Shit, looks like I'll have to kiss "make sync" goodbye... or give him an "account" locally with the same uid/gid -- nope that won't work either. Sigh. ------------------------------------------------------------------------ r144 | rgb | 2005-03-10 22:42:00 -0500 (Thu, 10 Mar 2005) | 2 lines This goes home and into laptop... ------------------------------------------------------------------------ r143 | rgb | 2005-03-10 22:05:41 -0500 (Thu, 10 Mar 2005) | 2 lines Sending this all home, so I can make it on metatron? ------------------------------------------------------------------------ r141 | rgb | 2004-11-30 09:14:46 -0500 (Tue, 30 Nov 2004) | 5 lines I think we'll add this to the repository as the "reference run" against the default generator, dieharder -a > dieharder.all. If we update this at the end of every new addition, we'll be able to advance to toolset in a fairly systematic (but generally reliable) way. ------------------------------------------------------------------------ r140 | rgb | 2004-11-29 16:36:23 -0500 (Mon, 29 Nov 2004) | 2 lines This looks like it ran nicely. ------------------------------------------------------------------------ r139 | rgb | 2004-11-29 14:30:09 -0500 (Mon, 29 Nov 2004) | 3 lines This MIGHT just be a reference run followed by tag bump and checkin. Looks pretty nifty, right up to a first draft of histogram. ------------------------------------------------------------------------ r138 | rgb | 2004-11-29 14:03:49 -0500 (Mon, 29 Nov 2004) | 4 lines Adding the published diehard F90 source code to the tree for porting convenience, although we will not use any of it verbatim, obviously, in a c port. ------------------------------------------------------------------------ r137 | rgb | 2004-11-29 12:18:04 -0500 (Mon, 29 Nov 2004) | 3 lines I'm hoping that this is the needed binary rank program that analyzes binary (bitlevel) matrices for the diehard binary rank tests. ------------------------------------------------------------------------ r136 | rgb | 2004-11-24 01:14:41 -0500 (Wed, 24 Nov 2004) | 5 lines This seems to "work", although it is consistently producing an overall p-value that is in the .9 range and hence "too high". I'm going to start up a full run of 100 x 40000 in a second to see if I get a "normal" pvalue. ------------------------------------------------------------------------ r135 | rgb | 2004-11-24 01:00:50 -0500 (Wed, 24 Nov 2004) | 2 lines Well, not JUST that. I suppose that next we'll have to actually debug. ------------------------------------------------------------------------ r134 | rgb | 2004-11-24 00:58:30 -0500 (Wed, 24 Nov 2004) | 6 lines This is ALMOST working. I'd say the binary rank part is working, hence the checkin. It is the rank_32x32 part that isn't, but I'll work on it. I suspect something really simple, like needing to normalize y by tsamples... ------------------------------------------------------------------------ r133 | rgb | 2004-11-22 15:08:03 -0500 (Mon, 22 Nov 2004) | 4 lines This is simply lovely, simply lovely, with a good start on adding Diehard's Binary Rank test. All I need is a suitably scaled matrix and a few zillion rands... ------------------------------------------------------------------------ r132 | rgb | 2004-11-22 14:23:11 -0500 (Mon, 22 Nov 2004) | 2 lines Why didn't these make it to Duke? ------------------------------------------------------------------------ r131 | rgb | 2004-11-22 03:35:19 -0500 (Mon, 22 Nov 2004) | 6 lines This is 0.5.8 stable, I hope. Time to go beddy-bye, hoping that this is now ready for real development and grantseeking work. I should be able to add a couple more diehard tests "easily" at this point, I think. rgb ------------------------------------------------------------------------ r129 | rgb | 2004-11-22 01:47:07 -0500 (Mon, 22 Nov 2004) | 5 lines This is VERY VERY close to being a fairly serious tagged checkin. We've resolved the problem of multiline strings in gcc, snagged a C tutorial for gcc, completely fixed the documentation -- this is all pretty awesomely ready for a brave new release. ------------------------------------------------------------------------ r128 | rgb | 2004-11-21 23:24:18 -0500 (Sun, 21 Nov 2004) | 11 lines This is really close to working with all the changes in the command line options and associated global variables. In fact, it might BE working. Two things that I really really need are a routine that can take a data object that is one big string and display it to the screen (something gcc refuses to do any more, which sucks big time) and a 20x histogram of p-values. Let's see if I can find them on the web before tackling them -- in particular the former seems like it must have been written by somebody... ------------------------------------------------------------------------ r127 | rgb | 2004-11-20 13:17:55 -0500 (Sat, 20 Nov 2004) | 6 lines This is now really truly ready to go, EXCEPT that NOW I have to alter all sorts of command options according to the latest prescriptions in the checkin logs and abstract/web page. And get it "working perfectly" once again. I might even finish this this weekend, if I really hammer at it. ------------------------------------------------------------------------ r126 | rgb | 2004-11-20 10:55:07 -0500 (Sat, 20 Nov 2004) | 3 lines This is the REALLY final checkin of rand_rate, I think, before we clone it into dieharder. ------------------------------------------------------------------------ r125 | rgb | 2004-11-20 10:50:28 -0500 (Sat, 20 Nov 2004) | 87 lines This is the last checkin of rand_rate AS rand_rate. I'm going to change the name of this suite to dieharder. I'm also going to change the test numbering schema and option naming so that e.g. -d diehard test number -r rgb test number -s sts test number where -1 runs all tests of a given kind, 0 lists a description of all tests in the suite, -2 runs all tests of a given kind EXACTLY as they are run in the original code, if possible -- I'm not sure I'm going to test overlapping bit strings drawn from a single int just to bump the count of "random numbers" unless the test explicitly calls for it and it makes sense, as there is this thing about each sample being "independent" that worries me with overlapping draws. -p number of p-values in final KS (and possibly other) test(s). This is the number of times each "test" is run with independent random number seeds (as the DEFAULT from now on). This defaults to 100, which is actually a lot and very reasonable but which can be increased if one is in doubt about whether the distribution of p returned by "the test" is in fact uniform. -t number of test samples that go into making up a single test. This is NOT always a free parameter -- in many of the diehard tests especially, the number of e.g. points drawn from a 2d or 3d volume in the minimum distance tests is fixed, and varying it would vary the target distribution and test statistic. Although this is a bit unfortunate, since varying the number of test samples is an excellent way to make marginal failures in the distribution of p resolve into clear failures, we either live with it or derive general forms for the asymptotic target distributions as a function of the number of samples or do simulations and empirically deduce forms ditto (as Marsaglia and others appear to have done). For the moment we'll live with it. -b bitstring width. Some tests are applied only to samples that are "bitstrings" (as opposed to e.g. lists of unsigned integers) of user-specifiable length. One reason to limit the tests in this way is to avoid numerical difficulties in e.g. evaluating P_binomial(k,p,n), where one can easily under or overflow and end up with garbage or a gsl fault. Another is to "free" some of the existing tests that have a very specific size of bitstring that they look at so that this can be varied when the target distribution can still be computed as a function of bitstring size. This will be overridden as necessary, like -t, for tests that really do require a fixed bitstring size to approach the known target distribution. -n ntuple or window width. A number of tests look at bit ntuples. An ntuple is a set of n consecutive bits drawn from a bitstring (possibly of -b specified width) or vector of random uints (possibly of -t specified length). ntuples are always drawn relative to a bit offset specified from the right (least significant) with 0 being the rightmost bit, with cyclic boundary conditions on the entire bitstring >>or<< sample uint vector, so drawing an ntuple cannot fail for any offset within the number of significant bits returned by the generator (which MAY NOT BE 32, or even 31 -- some generators return as few as 16 significant bits!). For example, an 8-bit bitstring might be: 01100111 and all the 3-tuples drawn from it are given by offset 3-tuple ===================== 0 111 1 011 2 001 3 100 4 110 5 011 6 101 <- Note wrap around! 7 110 <- Ditto! A general purpose get_bit_ntuple(*bitstring,bitstring size,ntuple size,offset) routine is provided that is used by many tests to get ntuples from a uint *bitstring of given >>uint vector length<< (not bitstring length). Other test controls may be added as well, but these are what I'm going to document right now. Mostly I'm checking in all the placeholders required for the rest of the diehard tests so I can start to knock them off systematically. Sure hope I'm past major rewrites! ------------------------------------------------------------------------ r124 | rgb | 2004-11-20 03:07:19 -0500 (Sat, 20 Nov 2004) | 2 lines Fixed silly spelling error (sigh). ------------------------------------------------------------------------ r123 | rgb | 2004-11-20 02:50:00 -0500 (Sat, 20 Nov 2004) | 3 lines Well, that was quick. A nasty (but easy) little bug in diehard_runs squashed (size -> tsamples). ------------------------------------------------------------------------ r122 | rgb | 2004-11-20 02:47:34 -0500 (Sat, 20 Nov 2004) | 14 lines This should/maybe be a serious v 0.5.3 checkin. We are about to try -v -1. If it works, it will cycle through all of the working tests (and all the tests are working). All the tests are now written in a way that they can use sample and kstest_kuiper() to do the validation of the p-values obtained from running a possibly size-variable test on bits or frequencies or runs or whatever. If this test works, it is off to the website, I'm off to bed, and next we go back to moving in new diehard tests. With the magical sliding bitwindow (which really does seem to work pretty well:-) implementing at least the n-tuple diehard tests should now be pretty easy, and I can probably do a more rigorous job than GM did because I don't have to scrimp on rands. ------------------------------------------------------------------------ r120 | rgb | 2004-11-20 02:34:39 -0500 (Sat, 20 Nov 2004) | 2 lines Try again (network down). ------------------------------------------------------------------------ r119 | rgb | 2004-11-20 02:34:07 -0500 (Sat, 20 Nov 2004) | 4 lines This clears diehard_birthdays AND diehard_2dsphere. Only one diehard to go and we'll have EVERYTHING running with sample and the new test format (but of course rgb_persist, which doesn't count). ------------------------------------------------------------------------ r118 | rgb | 2004-11-19 22:11:12 -0500 (Fri, 19 Nov 2004) | 2 lines Fixed up diehard_runs so it uses the new test format. Works charmlike. ------------------------------------------------------------------------ r117 | rgb | 2004-11-19 18:38:19 -0500 (Fri, 19 Nov 2004) | 5 lines This is v 0.5.1, which is nicely fixed for BOTH sts_monobit AND sts_runs, both in the new format, with a consistent Xtest_eval() routine. This fixes lots of things -- both tests are very likely to be "good". ------------------------------------------------------------------------ r115 | rgb | 2004-11-19 18:34:38 -0500 (Fri, 19 Nov 2004) | 7 lines OK, this looks like sts_runs is now "good" in the new format. However, it may have broken sts_monobit. The problem is, is there or is there not a sqrt(2.0) in the erfc relative to sigma, and if there is is there an EXTRA one in sts_runs vs sts_monobit. Need to clear this up and either always put it into Xtest or always put it into xtest.sigma, but not both. ------------------------------------------------------------------------ r114 | rgb | 2004-11-19 16:06:34 -0500 (Fri, 19 Nov 2004) | 2 lines Sending this home, I hope. ------------------------------------------------------------------------ r113 | rgb | 2004-11-19 15:09:15 -0500 (Fri, 19 Nov 2004) | 8 lines This is now squeaky clean for rgb_bitdist and sts_monobit, and we're working on sts_runs. Then a quick dash through the diehards and we'll be back to where we were but a bit cleaner. I still MIGHT try to get cleaner still. I'm not at all convinced that I need the test structs, for example, although perhaps they allow some encapsulation that is useful. ------------------------------------------------------------------------ r112 | rgb | 2004-11-19 13:55:01 -0500 (Fri, 19 Nov 2004) | 3 lines This is a checkin to Duke of the nifty neato cool new improved version. It may be time to change the name and everything. ------------------------------------------------------------------------ r111 | rgb | 2004-11-19 12:35:19 -0500 (Fri, 19 Nov 2004) | 4 lines OK so there was one more teeny bug in rgb_bitdist() -- wrong order in the final output statement. Fixed. I also added a feature, reseeding the rng in sample on an -i flag. ------------------------------------------------------------------------ r110 | rgb | 2004-11-19 12:28:09 -0500 (Fri, 19 Nov 2004) | 4 lines This is just ensuring that the tag for version 0.5.0 is noted. This version works through rgb_bitdist, which I'll bet a nickel is a very powerful test indeed. ------------------------------------------------------------------------ r108 | rgb | 2004-11-19 12:26:42 -0500 (Fri, 19 Nov 2004) | 4 lines This is a "permanent" checkin. I think that this fixes rgb_bitdist nicely to use sample() and provides a prototype for doing other tests. ------------------------------------------------------------------------ r106 | rgb | 2004-11-18 21:09:25 -0500 (Thu, 18 Nov 2004) | 11 lines This is a fairly major fix -- I was truncating blen in bits.c at the sizeof(uint), not 8*sizeof(uint). One lesson is that this truncation isn't right anyway. We rather need to just punt/die. I'm wondering now if the apparent failure that is still present (although not nearly as bad) for the larger ntuples is because fewer bins pass the cutoff in the formation of the primary sample pvalue(s). We might just try lowering this cutoff a bit. I don't know exactly what a "degree of freedom" is, but we do need to be pretty careful with it. ------------------------------------------------------------------------ r105 | rgb | 2004-11-18 18:43:21 -0500 (Thu, 18 Nov 2004) | 6 lines Now it REALLY looks like it works, and even the best rng's look like they FAIL the test in fairly short order. Now we're cookin' with gas, although I've got to see the details of the failure soon enough. Hmmm, maybe I need to have a lot more bins... ------------------------------------------------------------------------ r104 | rgb | 2004-11-18 18:25:52 -0500 (Thu, 18 Nov 2004) | 3 lines Just to verify that it APPEARS to work to quite high precision through triplets. We could just keep adding things, I suppose... ------------------------------------------------------------------------ r103 | rgb | 2004-11-18 18:17:39 -0500 (Thu, 18 Nov 2004) | 22 lines This is now working. Working amazingly well, actually. Well enough to double the size of the bits in rgb_bitdist_test(). The one MAJOR remaining problem is that I cannot use samples for tests that return a vector of pvalues. Oh, and it is fairly difficult to pass arguments to the testing function in when it is an argument TO samples(). This means that I have two itty bitty problems to solve -- one is to pass in parameters (possibly by making them global variables). This makes sense IF I want to be able to control them from the command line anyway. The other is to return a vector of pvalues. The only way I can think of doing this is to make pvalues[] a global vector as well of length (say) 1K. This puts an upper bound on the number of pvalues that can be returned by a test, but that SHOULDN'T be much of a problem, as it is really a question of what granularity one wishes to evaluate p at. Anyway, just a BIT more work and rgb_bitdist should be production ready, AND I should be perfectly ready to clean up p-sampling and testing as separate entities in the other tests. ------------------------------------------------------------------------ r102 | rgb | 2004-11-18 17:28:50 -0500 (Thu, 18 Nov 2004) | 2 lines This MIGHT be working. ------------------------------------------------------------------------ r101 | rgb | 2004-11-18 15:42:41 -0500 (Thu, 18 Nov 2004) | 2 lines I sent this home, I did, I did. ------------------------------------------------------------------------ r100 | rgb | 2004-11-18 15:08:32 -0500 (Thu, 18 Nov 2004) | 14 lines This is still fairly screwed up, at least in the sense that it doesn't look like rgb_bitdist works. Curiously, it LOOKS like it WORKS -- walking through the code, it looks VERY much like it is collecting two bits at a time and correctly incrementing the correct bit count in the correct vector. The final histogram, however, comes out wrong, wrong, wrong. I may have to make this simpler. Or maybe I'm doing something else wrong -- come to think of it, the totals in the histograms shouldn't equal the number of samples for EACH value of the ntuple, only the total should sum to the number of samples. Maybe this is what is wrong... ------------------------------------------------------------------------ r99 | rgb | 2004-11-18 11:27:27 -0500 (Thu, 18 Nov 2004) | 13 lines We have to go into Duke, but we are very much ready to finish off bits.c and rgb_bitdist.c to where we can eliminate BOTH rgb_binomial AND rgb_bit2.c AND at least one, maybe 3-4 diehard tests AND a couple or three sts tests as being equivalent to this test, for particular call values. I have great hope that this rgb_bitdist will become "the" bit frequency test for all random bit sequences. There may still be a point to tests that look at intervals >>between<< bit sequences thought. In fact, I suspect that the best way to proceed with the latter is to test lagged correlation for arbitrary lags in a long bitstring. This SAME TEST applied with arbitrary displacements between samples might be revealing... ------------------------------------------------------------------------ r98 | rgb | 2004-11-17 14:57:04 -0500 (Wed, 17 Nov 2004) | 5 lines This is HIGHLY BROKEN but is absolutely necessary. We have to break this code up to unify the replicated pieces and streamline the testing processes now that we know how a test "works" in the abstract. ------------------------------------------------------------------------ r97 | rgb | 2004-11-16 22:40:28 -0500 (Tue, 16 Nov 2004) | 16 lines A bugfix commit. The sanity check in get_bit() is broken and is commented out -- if I'm going to allocate rand_int[] vectors other than size in length, I cannot test on a global size to see if get_bit() is out of bounds. This is STILL broken in that there is a risk with no warning, but there is also functionality for the moment (and I have to write a bunch of new bitlevel functions and can rewrite get_bits at the same time). More important, I found a real bug in Btest where I was initializing btest->chisq to zero before accumulation but was accumulating in chisq. Curiously, it worked a lot of the time the old way, but only for certain rng's. I may have memory management problem, which isn't surprising given the slovenliness of the code at this moment...;-) rgb ------------------------------------------------------------------------ r96 | rgb | 2004-11-16 18:46:17 -0500 (Tue, 16 Nov 2004) | 2 lines This is a tagged checkin, about to push. ------------------------------------------------------------------------ r94 | rgb | 2004-11-16 18:45:43 -0500 (Tue, 16 Nov 2004) | 2 lines This appears ready for a checkin. ------------------------------------------------------------------------ r93 | rgb | 2004-11-16 18:19:54 -0500 (Tue, 16 Nov 2004) | 4 lines This appears to FINALLY fix rgb_binomial so that it reliably works. It remains to be seen whether or not it is any more senstitive than e.g. sts_monobit. ------------------------------------------------------------------------ r92 | rgb | 2004-11-16 15:11:18 -0500 (Tue, 16 Nov 2004) | 3 lines This is STILL broken as far as the Ntests are concerned. I've really got to figure this out... ------------------------------------------------------------------------ r91 | rgb | 2004-11-16 10:51:23 -0500 (Tue, 16 Nov 2004) | 2 lines Send this to Duke to finish this morning. ------------------------------------------------------------------------ r90 | rgb | 2004-11-14 12:40:14 -0500 (Sun, 14 Nov 2004) | 61 lines This is a pretty serious bugfix -- probably need to update the website. Basically, my kstest was simply wrong last night; now it is working, I've also added the Kuiper form of the KS test, and will program Anderson and Darling's version (the one used, apparently, in Diehard) when I get around to it. However, for tests involving more than a very few p-values in a vector, it shouldn't really matter -- Kuiper KS and the regular KS and Anderson-Davis KS should all GENERALLY generate similar p-distributions -- different perhaps where they don't matter, but very similar at the ends. The key question is just whether one has a tendency to pass a vector of p-values where the other would consistently fail it. So far it looks like USUALLY if one fails the other fails. I think I'm still going to want to do a histogram picture of binned pvalues and do a Pearson chisq p-test on the result. This should really be pretty easy... maybe today, maybe not. We're getting close to being ready to go BACK and mess with the Ntest and Xtest stuff. I think that now that I understand Pearson vs the alternatives, I can PROBABLY arrange things so that I can use a single set of common tools to do all the test assessment. One thing, for example, would be to make each test return a p-value, period, and put the samples loop in rand_rate_work, to ALWAYS fill a vector of p-values and ALWAYS do KS tests, confidence interval tests, and histogram tests. This would have a number of advantages -- being able to produce a really pretty, really standardized picture of results for one. A second thing that would make this tool relatively interesting to the mass unwashed would be to put a nice little GUI onto it. There are two generic ways to do this. One is to leave it a command line tool but REALLY clean up the output result so that it is just a single line per test with ks test scores for the various forms of test with three lines of # delimited frame, period. Then I can make a perl-Gtk app to call the binary, parse the result, and (e.g.) plot histograms or do other nifty graphical things. The other is to use Gtk directly, but perhaps have the GUI only come up if there is an appropriate command line flag (or not). A third thing to work on is clearly going to be splitting the source into distinct components in distinct directories. We will need a common library containing the kstest, chisq, Ntest, Xtest etc code, the input, the output, etc. We will need a directory containing extensions to the GSL random number library, e.g. /dev/random, /dev/urandom, empty, and shuffled because the one thing that is absolutely true is that we need to add a shuffling/mixing random number generator, one that permits us to set up a shuffling list and refill it from a secondary LIST of rng's! A fourth thing (noted already elsewhere) is to do the simplest of tests -- apply a KS test to the GSL distribution-specific generators themselves. If a "test" is generically generating a known distribution presuming randomness and then seeing if the result is indeed the targeted distribution, then EVERY distribution generator in the GSL can simultaneously be the target of a test for algorithmic purposes AND a test component for the GSL rng's. Beyond that, I need to implement spectral tests and tests for hyperplanes in N dimensions and uniformity tests. Sigh. I think that I DO need to write a grant proposal for this -- I think there is enough work to justify it. ------------------------------------------------------------------------ r89 | rgb | 2004-11-14 04:38:33 -0500 (Sun, 14 Nov 2004) | 3 lines Tagged and on the repository as 0.4.3, with diehard 3d spheres and a MAYBE working KS test. ------------------------------------------------------------------------ r87 | rgb | 2004-11-14 04:37:35 -0500 (Sun, 14 Nov 2004) | 2 lines Sort of playing with KS -- I'm not done here yet... ------------------------------------------------------------------------ r86 | rgb | 2004-11-14 03:04:37 -0500 (Sun, 14 Nov 2004) | 8 lines OK, found my REALLY stupid bug. I was computing the absolute length of r from the origin, not the distance between point pairs. No, I wasn't even doing that well -- I was computing the dot product of the random vectors. Now things look nearly correct. All I need is a KS test and life would be, if not complete, well, worth living. ------------------------------------------------------------------------ r85 | rgb | 2004-11-14 02:22:29 -0500 (Sun, 14 Nov 2004) | 5 lines This "works". Except that it doesn't. It's very odd, but although it works perfectly as far as I can tell by any measure, r is simply not as small as it should be in order to make the pvalue come out between 0 and 1. ------------------------------------------------------------------------ r84 | rgb | 2004-11-13 20:19:53 -0500 (Sat, 13 Nov 2004) | 2 lines THis is on the way to being another test. ------------------------------------------------------------------------ r83 | rgb | 2004-11-13 17:19:55 -0500 (Sat, 13 Nov 2004) | 2 lines This is hopefully a tagged snapshot with a new test! ------------------------------------------------------------------------ r81 | rgb | 2004-11-13 16:50:54 -0500 (Sat, 13 Nov 2004) | 8 lines OK, time to bump the revision number, as birthdays is home and even works tolerably, as far as I can tell. SOON I'm going to do the KS test on vectors of p's. SOON I'm going to really clean up the code so that chisq -> p is consistently computed, and so that a set of p's is consistently evaluated for the random/nonrandom decision. ------------------------------------------------------------------------ r80 | rgb | 2004-11-13 12:17:57 -0500 (Sat, 13 Nov 2004) | 2 lines This is it, ready to proceed. ------------------------------------------------------------------------ r79 | rgb | 2004-11-13 12:12:24 -0500 (Sat, 13 Nov 2004) | 3 lines This checks in a placeholder for a Kolmogorov-Smirnov test, likely to be applied to a vector of p-values. ------------------------------------------------------------------------ r78 | rgb | 2004-11-13 12:06:36 -0500 (Sat, 13 Nov 2004) | 10 lines We'll commit this for the moment. I think the sensible thing to do is to create as general as possible a tool for generating Pearson's chisq for discretely binned data, in particular and immediately for the Poissonian birthday histogram but also for other purposes. Note that these routines should not only generate chisq, but when possible go ahead and compute goodness of fit p-values, ideally in a vector associated with independent trials. This vector of p-values can itself then be subjected to a kolmogorov-smirnov analysis and transformed into a conclusion for the generator being tested. ------------------------------------------------------------------------ r77 | rgb | 2004-11-13 04:34:29 -0500 (Sat, 13 Nov 2004) | 3 lines Just added output of lambda, which is indeed 2 with the parameters given... ------------------------------------------------------------------------ r76 | rgb | 2004-11-13 04:32:46 -0500 (Sat, 13 Nov 2004) | 7 lines This is REALLY CLOSE to having diehard birthdays finished. We just need to add a chisq test for Poisson distributions sampled samples times with known (per sample) lambda, and a loop to convert a table of chisq into a table of p-values. I'm tempted to bump minor and tag, but I shouldn't need to -- I've been really careful and things really look like they're working so far. ------------------------------------------------------------------------ r75 | rgb | 2004-11-12 21:02:55 -0500 (Fri, 12 Nov 2004) | 2 lines This is a simple checkin prior to doing diehard birthdays test. ------------------------------------------------------------------------ r74 | rgb | 2004-11-12 20:32:58 -0500 (Fri, 12 Nov 2004) | 2 lines This splits off the confidence interval test from STS docs. ------------------------------------------------------------------------ r73 | rgb | 2004-11-12 20:28:07 -0500 (Fri, 12 Nov 2004) | 3 lines This is a small adjustment (still in 0.4.1 I guess). Let's try another diehard, I think. ------------------------------------------------------------------------ r72 | rgb | 2004-11-12 20:16:48 -0500 (Fri, 12 Nov 2004) | 10 lines This is actually a fairly functional diehard test! I think that we can actually implement a test for the uniformity of p-values as suggested by NIST to run on TOP of the existing confidence interval test. This would actually break the p-distribution down by interval and return a p-value of its own computed against the assumption of uniformity. Or I could get fancier and try kolmogorov-smirnov, if GSL doesn't have one and I work hard enough to program one. If this is really distinct -- it isn't clear that it is. ------------------------------------------------------------------------ r70 | rgb | 2004-11-12 17:32:03 -0500 (Fri, 12 Nov 2004) | 4 lines This is actually sort of semi-functional. What I >>really<< need now is canned Kolmogorov-Smirnov code. Could it be that this is in the GSL already? I'll be it is... ------------------------------------------------------------------------ r69 | rgb | 2004-11-11 10:59:28 -0500 (Thu, 11 Nov 2004) | 2 lines Continuing to hack this up. ------------------------------------------------------------------------ r68 | rgb | 2004-11-10 17:19:21 -0500 (Wed, 10 Nov 2004) | 3 lines This is a nearly functional diehard_runs -- I just need to figure out what the expected values and sigmas are... ------------------------------------------------------------------------ r67 | rgb | 2004-11-10 00:32:44 -0500 (Wed, 10 Nov 2004) | 4 lines This is simply lovely. A nice litte addition to the Makefile that automatically indicates the current version in the abstract. I actually have things fairly distributable! ------------------------------------------------------------------------ r66 | rgb | 2004-11-10 00:24:18 -0500 (Wed, 10 Nov 2004) | 10 lines OK, added a few minor changes to manage the bits issue yet another way. Really, I'm going to have to figure out a consistent way of indicating whether a test can have size OR bits OR both OR neither specified. Also, it would be really lovely to have another outer loop and to present the lowest p in a set of (say) ten runs of a test combo. Although in many cases running with -s 10x larger should do the same thing, really. ------------------------------------------------------------------------ r65 | rgb | 2004-11-09 23:53:49 -0500 (Tue, 09 Nov 2004) | 2 lines This is it and running, version 0.4.0 as published. Seems to work. ------------------------------------------------------------------------ r63 | rgb | 2004-11-09 23:53:15 -0500 (Tue, 09 Nov 2004) | 2 lines One last checkin, then a tag, then a checkin as published. ------------------------------------------------------------------------ r61 | rgb | 2004-11-09 20:43:14 -0500 (Tue, 09 Nov 2004) | 3 lines This is a tagged release, mostly bugfixes. At the moment it all looks like it works. ------------------------------------------------------------------------ r59 | rgb | 2004-11-09 20:37:58 -0500 (Tue, 09 Nov 2004) | 9 lines This seems to work perfectly, for the very short moment. It is by no means perfect or mutually exclusive. We very definitely need to generalize the bitdist test to handle bit ntuples of arbitrary length, where the length is a variable. I think I'll retag this. It is also probably time to think about putting this up on the website, especially if I'm going to write a proposal on it. ------------------------------------------------------------------------ r58 | rgb | 2004-11-09 17:14:57 -0500 (Tue, 09 Nov 2004) | 2 lines Because it wasn't checked in! ------------------------------------------------------------------------ r57 | rgb | 2004-11-09 17:14:36 -0500 (Tue, 09 Nov 2004) | 2 lines Why didn't bit2.c go home? ------------------------------------------------------------------------ r56 | rgb | 2004-11-09 15:09:36 -0500 (Tue, 09 Nov 2004) | 3 lines This is going home with a split out routine and some nice changes that will make it easier to add new tests with arbitrary numbers. ------------------------------------------------------------------------ r55 | rgb | 2004-11-09 14:30:32 -0500 (Tue, 09 Nov 2004) | 2 lines Just checking repository Root. ------------------------------------------------------------------------ r54 | rgb | 2004-11-09 14:30:05 -0500 (Tue, 09 Nov 2004) | 2 lines Let's send this home... ------------------------------------------------------------------------ r53 | rgb | 2004-11-09 09:51:31 -0500 (Tue, 09 Nov 2004) | 7 lines OK, fixing Makefile to actually get this home, AND adding the URL of the web reference from the last checkin: http://world.std.com/~franl/crypto/random-numbers.html (we need to implement some of its hyperplane tests). ------------------------------------------------------------------------ r52 | rgb | 2004-11-09 09:48:40 -0500 (Tue, 09 Nov 2004) | 5 lines We're actually working on this once again. I need to get my own "runs" test working, as it will replace a whole RANGE of STS, and I need to implement a spectral distribution test with bins as is done in the nice web reference I found. ------------------------------------------------------------------------ r51 | rgb | 2004-11-08 09:52:52 -0500 (Mon, 08 Nov 2004) | 2 lines This adds yet another built-in device to GSL. ------------------------------------------------------------------------ r50 | rgb | 2003-06-10 11:21:15 -0400 (Tue, 10 Jun 2003) | 3 lines This adds an "empty" generator to help us determine gsl call overhead separately. ------------------------------------------------------------------------ r49 | rgb | 2003-01-30 17:16:15 -0500 (Thu, 30 Jan 2003) | 4 lines This is broken as shit. I see what I did -- I made the ntest evaluation and presentation routines use n+1 bits (because in rgb_binomial I needed to do the end of the binomial). However, I have to fix it later... ------------------------------------------------------------------------ r48 | rgb | 2003-01-30 15:12:20 -0500 (Thu, 30 Jan 2003) | 2 lines Forgot to send this... ------------------------------------------------------------------------ r47 | rgb | 2003-01-29 14:19:55 -0500 (Wed, 29 Jan 2003) | 4 lines Not obviously broken, and time to add bitpair counters. Should be really easy -- left-shift in two bits at a time to creat the int index of the counter, then increment it. ------------------------------------------------------------------------ r46 | rgb | 2003-01-29 09:27:09 -0500 (Wed, 29 Jan 2003) | 2 lines Some NOTES on future work. ------------------------------------------------------------------------ r45 | rgb | 2003-01-29 09:14:38 -0500 (Wed, 29 Jan 2003) | 8 lines This checks in a whole new test, which should probably be combined with sts_monobit (it generates monobit stats as it goes) rgb_persist (one can easily generate a bitmask as one goes) rgb_binomial (one can generate binomial stats on top of monobit as one goes). and possibly with more tests. ------------------------------------------------------------------------ r44 | rgb | 2003-01-26 02:54:43 -0500 (Sun, 26 Jan 2003) | 7 lines This last little pair of changes causes measure_rate to use its own, fixed, number of samples ("more than enough"). It also installs a "summary report" mode that isn't horribly useful because of conflict between e.g. -b, -n, -s definitions here and there. Also, different tests need to be run in different ways to demonstrate failure (or a lack thereof). ------------------------------------------------------------------------ r43 | rgb | 2003-01-26 02:23:28 -0500 (Sun, 26 Jan 2003) | 9 lines OK, we haven't done TOO much, but we have definitely learned that all the rng's that are weak in rgb_persist will definitely fail the monobit test (for obvious reasons). Furthermore, when a generator is weak in certain bits and we evaluate the bits from the other end (whichever end that might be!) it can often PASS the monobit test. Bits that repeat, random_max's that aren't powers of two-1 (and probably EVEN powers of two at that) are going to be trouble! ------------------------------------------------------------------------ r42 | rgb | 2003-01-26 00:00:04 -0500 (Sun, 26 Jan 2003) | 4 lines This is a VERY IMPORTANT new test, rgb_persist(), and a very useful new routine, dumpbits(). Read NOTES (and inline comments and output) to see a bit of what it does and why it is important. ------------------------------------------------------------------------ r41 | rgb | 2003-01-25 16:55:32 -0500 (Sat, 25 Jan 2003) | 3 lines This actually works. In fact, it works fabulously. I can directly and fairly powerfully look for bitlevel correlations in the output. ------------------------------------------------------------------------ r40 | rgb | 2003-01-25 15:53:55 -0500 (Sat, 25 Jan 2003) | 16 lines OK, we've learned the hard way that some bits in e.g. boroshi don't change AT ALL, EVER. Which makes it pretty hard to be random, of course. So we're going to invent a new tool -- rgb_persist(), which doesn't (yet) to a formal statistical test. It just is going to dump successive unsigned ints from the rng (bitwise) AND maybe run a string of &'s on the string of ints returned. If they share any 1 bits, the successive &'s will preserve them a LOT longer than permitted by binary flips on the slots. This could be made into a fairly powerful bitlevel sequential correlation test in several ways. We'll investigate them as we go, but one reason to write this now is that I'm not quite convinced that what I'm seeing isn't some sort of bug in the get_bit() routine or the like. ------------------------------------------------------------------------ r39 | rgb | 2003-01-25 10:54:02 -0500 (Sat, 25 Jan 2003) | 3 lines This is well on the way to being MUCH better, and ready to systematically extend. ------------------------------------------------------------------------ r38 | rgb | 2003-01-24 19:50:32 -0500 (Fri, 24 Jan 2003) | 2 lines And now we send the tagged package to Duke. ------------------------------------------------------------------------ r36 | rgb | 2003-01-24 19:50:07 -0500 (Fri, 24 Jan 2003) | 2 lines Checking in the notes. ------------------------------------------------------------------------ r35 | rgb | 2003-01-24 17:52:03 -0500 (Fri, 24 Jan 2003) | 20 lines This is worth a minor bump. First, we fixed get_bit(). Second, we completed sts_runs (for what it is worth, which isn't a whole lot as nearly everything that fails it also fails monobit and binomial as expected). However, working through it suggests how to make binomial work better. Next (to make it easier to check results relative to the sts documents) I need to implement -b (get_bit(0 permits this pretty much transparently, at least in the sts routines) and implement a -f filename filled with e.g. raw bitstrings or ascii floats or binary numbers in xmlish wrappers that indicate the storage mechanism? Thus I can test explicit short bitstrings against the explicit sts numbers to be sure that my erfc and conversions (and sometimes slightly different implementation) yield the same answers as theirs, except where I don't care because I think theirs are (basically) wrong. See also NOTES (about to be checked in) for a fairly detailed beginning critique of sts, which I don't think is particularly strong or useful, really. ------------------------------------------------------------------------ r34 | rgb | 2003-01-24 16:43:14 -0500 (Fri, 24 Jan 2003) | 6 lines This is my home-grown version of sts_runs. It is no better than the actual sts version, really, but the sts version is not terribly good. I'm going to add a (hopefully vastly improved) binomial version of the test to rgb_binomial, where I can do all the tests at once with a single set of code and multiple trials (random number seeds). ------------------------------------------------------------------------ r33 | rgb | 2003-01-23 00:51:56 -0500 (Thu, 23 Jan 2003) | 3 lines Just adding some notes, and preparing to add the next sts test, TOMORROW. ------------------------------------------------------------------------ r32 | rgb | 2003-01-22 23:52:47 -0500 (Wed, 22 Jan 2003) | 2 lines I have no idea why the tag went down into fitany... ------------------------------------------------------------------------ r30 | rgb | 2003-01-22 23:52:07 -0500 (Wed, 22 Jan 2003) | 14 lines This ups the minor revision number to 0.3.0. Worthwhile because now I have BOTH an erfc AND a Q evaluation of p-value. I could certainly prettify sts_monobit, but since I generally think that it isn't that great a test (although it does indicate how starkly many rng's FAIL to be even this random) I won't do so right away. Next (after tagging and resync'ing) is going to be adding more tests. At this point adding a test should be pretty easy, given the hopefully reusable routines I have written to do the pre- and post- processing. All I really have to do is input the expected values, write a loop to generate the "experimental" statistic, and pass everything on to a standard set of tools for outputting the results and deciding on the quality of the results. ------------------------------------------------------------------------ r29 | rgb | 2003-01-22 23:46:08 -0500 (Wed, 22 Jan 2003) | 7 lines All right, this LOOKS like it correctly implements the STS monobit frequency test. I would still claim that anything that fails this test will also fail the binomial test, and that in addition things that pass it (e.g. the vax rng) FAIL the binomial test, so the monobit test is a waste of time and more prone to error. However, mine is not to reason why... ------------------------------------------------------------------------ r28 | rgb | 2003-01-22 13:04:47 -0500 (Wed, 22 Jan 2003) | 7 lines This is working incredibly well, and I've split off nearly everything required to make further n-point chisq tests trivial to implement and assess. All that remains is to do a 1-point (normal) test such as the sts_monobit test (which should really be done internal to the rgb_binomial test and may one day be, but for the moment we'll just do it directly). ------------------------------------------------------------------------ r27 | rgb | 2003-01-22 08:33:21 -0500 (Wed, 22 Jan 2003) | 2 lines Just making SURE this is at Duke... ------------------------------------------------------------------------ r26 | rgb | 2003-01-21 18:56:15 -0500 (Tue, 21 Jan 2003) | 18 lines This works just lovely! HOWEVER, it is also clear that running it once, twice, three times, for EACH generator looking for good ones is a PITA. We'll have to eventually rearrange this so that there is a "search mode" that runs a loop through all known generators, identifying the ones that pass at least at the 1% or higher level. BTW, I'm now prepared to bet a nickel that the rgb binomial test has a great deal of sensitivity, since it fails all but literally three or four of the available RNG's for absurdly short data strings. As in they aren't even APPROXIMATELY random...NONE of them. If one used them to generate a humble binomial distribution numerically it would be in significant error. I do need to alter this test so that I can run it for arbitrary bit string lengths, but for the moment I'm not going to worry about it. ------------------------------------------------------------------------ r25 | rgb | 2003-01-21 16:40:07 -0500 (Tue, 21 Jan 2003) | 3 lines This is now VERY CLOSE. I should be able to determine chisq in a matter of minutes when I return... ------------------------------------------------------------------------ r24 | rgb | 2003-01-21 14:05:50 -0500 (Tue, 21 Jan 2003) | 2 lines This is considerably cleaner and more decrufted... ------------------------------------------------------------------------ r23 | rgb | 2003-01-21 13:35:01 -0500 (Tue, 21 Jan 2003) | 3 lines This finishes the split off of list_rand and list_rngs from the code. I do need to "fix" the Usage() routine to reflect the change. ------------------------------------------------------------------------ r22 | rgb | 2003-01-21 13:08:34 -0500 (Tue, 21 Jan 2003) | 3 lines Breaking things up into subroutines a bit better to clarify the program structure. ------------------------------------------------------------------------ r21 | rgb | 2003-01-17 15:37:14 -0500 (Fri, 17 Jan 2003) | 7 lines This is coming along, although I'm silly for not just finishing the monobit test before introducing a binomial test. Still, all very instructive. I need to get all this on my laptop and take it with me, along with the notebook. ------------------------------------------------------------------------ r20 | rgb | 2003-01-17 14:28:36 -0500 (Fri, 17 Jan 2003) | 10 lines Fixes a nasty bug in sts_monobit, which I think I'm gonna rename rgb_binomial (and screw sts's monobit test, which is immensely sloppy compared to actually systematically exploring the binomial distribution of 1's and 0's in the overall bit strings generated by different seeds. Actually, a better thing still is to leave sts_monobit, but add rgb_binomial and document that it is more sensitive (in particular, that e.g. alternating series that easily pass monobit fail binomial, and that NOTHING that fails monobit will PASS binomial). ------------------------------------------------------------------------ r19 | rgb | 2003-01-17 01:06:32 -0500 (Fri, 17 Jan 2003) | 2 lines Sending off the tag ------------------------------------------------------------------------ r17 | rgb | 2003-01-17 01:06:16 -0500 (Fri, 17 Jan 2003) | 8 lines OK, this is good for a full minor number bump to 0.2.0. We have basically installed the guts of the STS monobit test. All that we lack is the computation of the statistics and p-value, which should be fairly straightforward, especially with the gsl handy. I SHOULD be able to just cumulate the one-count (e.g.) in a vector and hand it to the gsl stats routines and have mean, stddev, skew, kurtosis, and anything else I might like just handed back to me... ------------------------------------------------------------------------ r16 | rgb | 2003-01-17 00:16:59 -0500 (Fri, 17 Jan 2003) | 4 lines Just a bit of cleanup, and some moderately important additions. Now we REALLY need to think about tests. ------------------------------------------------------------------------ r15 | rgb | 2003-01-16 23:23:32 -0500 (Thu, 16 Jan 2003) | 2 lines Tagged. ------------------------------------------------------------------------ r13 | rgb | 2003-01-16 23:23:04 -0500 (Thu, 16 Jan 2003) | 7 lines This is about ready for a semipermanent snapshot, so I bumped the minor version number. I'd say that we are now "good" with the ability to add sw rng's, including interfaces to hw rng's square within the gsl format. Now to give de old tests a try... ------------------------------------------------------------------------ r12 | rgb | 2003-01-16 22:54:25 -0500 (Thu, 16 Jan 2003) | 6 lines Hot diggity dawg! It works! However, I don't need types.c. All I need is to follow the dev_random.c template and call a routine add_my_rngs() (to be defined) before working with gsl's rng's, and keep track (crudely) of which ones are which. So this can be decrufted a bit and then reorganized now that I know how it works. ------------------------------------------------------------------------ r11 | rgb | 2003-01-16 21:54:49 -0500 (Thu, 16 Jan 2003) | 4 lines We'll try these as the basic wrappers required. With luck we'll override the types subroutine in gsl itself, although I do have my doubts... ------------------------------------------------------------------------ r10 | rgb | 2003-01-16 21:38:52 -0500 (Thu, 16 Jan 2003) | 6 lines This significantly improves the Usage and cl parsing, and pre-structures it for addition of sts/diehard tests. We still need to see if we can gsl-wrap our own tests without a full gsl recompile. ------------------------------------------------------------------------ r9 | rgb | 2003-01-16 15:40:56 -0500 (Thu, 16 Jan 2003) | 2 lines Sending the tagged copy home... ------------------------------------------------------------------------ r7 | rgb | 2003-01-16 15:40:38 -0500 (Thu, 16 Jan 2003) | 2 lines This is now going to be v_0_1_0. ------------------------------------------------------------------------ r6 | rgb | 2003-01-16 15:39:55 -0500 (Thu, 16 Jan 2003) | 15 lines This is now functional UP TO all the gsl rngs, not any of the add-ons. Which is fine, as we'll probably completely change how the add-ons work. Next, we need to do all of the following, in some order: a) figure out how to wrap up new gsl_rngs, preferrably without recompiling the whole damn library. b) decruft all the command line options and no-longer-used variables. c) add back command line options for doing quality tests. Start with the very simplest test -- something from diehard or the bits test from sts. d) In the meantime, increment revision, tag, and consider "publishing" as we go. ------------------------------------------------------------------------ r5 | rgb | 2003-01-16 15:14:54 -0500 (Thu, 16 Jan 2003) | 3 lines This SHOULD split rand_rate off so it has its own CVS tree outside of the "random" project overall, which I think is for the best. ------------------------------------------------------------------------ r4 | rgb | 2003-01-16 15:13:05 -0500 (Thu, 16 Jan 2003) | 4 lines This actually works, and needs to be saved in snapshot form. I'm not at ALL certain that I'm getting accurate measurements in terms of the number of rands per second I can generate, but this too, we shall see... ------------------------------------------------------------------------ r3 | rgb | 2003-01-13 17:12:27 -0500 (Mon, 13 Jan 2003) | 2 lines This is a fair amount of progress to having something working... ------------------------------------------------------------------------ r2 | rgb | 2003-01-11 19:07:56 -0500 (Sat, 11 Jan 2003) | 4 lines This is basically the original checkin for my lookin-major random number project. By the time this is done, I'd doggone better have a paper or two out of it, if not more. ------------------------------------------------------------------------ ./dieharder.abs0000664000175000017500000010266313707046103011716 0ustar eddedd

Dieharder: A Random Number Test Suite

Version 3.31.1

Robert G. Brown (rgb)

Dirk Eddelbuettel

David Bauer

Welcome to the dieharder distribution website.

Version 3.29.4beta is the current snapshot. Some of the documentation below may not quite be caught up to it, but it should be close.

Dieharder is a random number generator (rng) testing suite. It is intended to test generators, not files of possibly random numbers as the latter is a fallacious view of what it means to be random. Is the number 7 random? If it is generated by a random process, it might be. If it is made up to serve the purpose of some argument (like this one) it is not. Perfect random number generators produce "unlikely" sequences of random numbers -- at exactly the right average rate. Testing a rng is therefore quite subtle.

dieharder is a tool designed to permit one to push a weak generator to unambiguous failure (at the e.g. 0.0001% level), not leave one in the "limbo" of 1% or 5% maybe-failure. It also contains many tests and is extensible so that eventually it will contain many more tests than it already does.

If you are using dieharder for testing rngs either in one of its prebuilt versions (rpm or apt) or built from source (which gives you the ability to e.g. add more tests or integrate your rng directly with dieharder for ease of use) you may want to join either or both of the dieharder-announce or the dieharder-devel mailing lists here. The former should be very low traffic -- basically announcing when a snapshot makes it through development to where I'm proud of it. The latter will be a bit more active, and is a good place to post bug reports, patches, suggestions, fixes, complaints and generally participate in the development process.

About Dieharder

At the suggestion of Linas Vepstas on the Gnu Scientific Library (GSL) list this GPL'd suite of random number tests will be named "Dieharder". Using a movie sequel pun for the name is a double tribute to George Marsaglia, whose "Diehard battery of tests" of random number generators has enjoyed years of enduring usefulness as a test suite.

The dieharder suite is more than just the diehard tests cleaned up and given a pretty GPL'd source face in native C. Tests from the Statistical Test Suite (STS) developed by the National Institute for Standards and Technology (NIST) are being incorporated, as are new tests developed by rgb. Where possible or appropriate, all tests that can be parameterized ("cranked up") to where failure, at least, is unambiguous are so parameterized and controllable from the command line.

A further design goal is to provide some indication of why a generator fails a test, where such information can be extracted during the test process and placed in usable form. For example, the bit-distribution tests should (eventually) be able to display the actual histogram for the different bit ntuplets.

Dieharder is by design extensible. It is intended to be the "Swiss army knife of random number test suites", or if you prefer, "the last suite you'll ever ware" for testing random numbers.


Dieharder Related Talks or Papers

  • TechExpo 2011 Talk (Duke). A short talk given at a Duke's Tech Expo in 2011 as an overview of random number generator testing. Good for beginners.
  • Good Practice in (Pseudo) Random Number Generation for Bioinformatics Applications by David Jones, UCL Bioinformatics Group (E-mail: d dot jones@cs dot ucl dot ac dot uk). A really excellent "must read" guideline for anyone thinking of using random number generators in an actual application. My own advice differs only in that I endorse using (well tested) Gnu Scientific Library random number generators as they are generally portable and open source, hence well tested. Several of Jones' implementation of Marsaglia's KISS-family rngs have been added to dieharder and will shortly be added to the GSL under the GPL for general use.

Dieharder Download Area

Dieharder can be freely downloaded from the Dieharder download site. On this page there should be a long list of previous versions of dieharder, and it should tell you what is the current snapshot. The version numbers have the following specific meaning which is a bit different than usual:

  • First number (major). Bumped only when major goals in the design roadmap are reached (for example, finishing all the diehard tests). Version 1.x.x, for example, means that ALL of diehard (and more) is now incorporated in the program. Version 2.x.x means that the tests themselves have been split off into the libdieharder library, so that they can be linked into scripting languages such as R, new UIs, or user code. 3.x.x would be expected to indicate that the entire STS suite is incorporated, and so on.
  • Second number (first minor). This number indicates the number of tests currently supported. When it bumps, it means new tests have been added from e.g. STS, Knuth, Marsaglia and Tsang, rgb, or elsewhere.
  • Third number (second minor). This number is bumped when significant features are added or altered. Bug fixes bump this number, usually after a few bumps of the release number for testing snapshots. This number and the release are reset to 0 when the major is bumped or a new test is added to maintain the strictly increasing numerical value on which e.g. yum upgrades rely.

The single-tree dieharder sources (.tgz and .src.rpm) files can be downloaded from this directory. In addition, binary rpm's built on top of Fedora Core whatever (for either i386 or both of x86_64) may be present. Be warned: the GSL is a build requirement. The current packaging builds both the library and the dieharder UI from a single source rpm, or from running "make" in the toplevel directory of the source tarball. With a bit of effort (making a private rpm building tree), "make rpm" should work for you as well in this toplevel directory.

This project is under very active development. Considerable effort is being expended so that the suite will "run out of the box" to produce a reasonably understandable report for any given random number generator it supports via the "-a" flag, in addition to the ability to considerably vary most specific tests as applied to the generator. A brief synopsis of command options to get you started is presented below. In general, though, documentation (including this page, the man page, and built-in documentation) may lag the bleeding edge snapshot by a few days or more.

An rpm installation note from Court Shrock:

I was reading about your work on dieharder.  First, some info
about getting dieharder working in Gentoo:

cd ~
emerge rpm gsl
wget
http://www.phy.duke.edu/~rgb/General/dieharder/dieharder-0.6.11-1.i386.rpm
rpm -i --nodeps dieharder-0.6.11-1.i386.rpm

Rebuilding from tarball source should always work as well, and if you are planning to play a lot with the tool may be a desireable way to proceed as there are some documentation goodies in the ./doc subdirectory and the ./manual subdirectory of the source tarball (such as the original diehard test descriptions and the STS white paper).

George Marsaglia retired from FSU in 1996. For a brief time diehard appeared to have finally disappeared from FSU webspace, but what had really happened is google's favorite path to it had disappeared when his personal home directory was removed. Diehard is still there, at the URL http://www.stat.fsu.edu/pub/diehard as well as at a Hong Kong website. The source code of diehard itself is (of course) Copyright George Marsaglia but Marsaglia did not incorporate an explicit license into his code which muddles the issue of how and when it can be distributed, freely or otherwise. Existing diehard sources are not directly incorporated into dieharder in source form for that reason, to keep authorship and GPL licensing issues clear.

Note that the same is not true about data. Several of the diehard tests require that one use precomputed numbers as e.g. target mean, sigma for some test statistic. Obviously in these cases we use the same numbers as diehard so we get the same, or comparable, results. These numbers were all developed with support from Federal grants and have all been published in the literature, though, and should therefore be in the public domain as far as reuse in a program is concerned.

Note also that most of the diehard tests are modified in dieharder, usually in a way that should improve them. There are three improvements that were basically always made if possible.

  • The number of test sample p-value that contribute to the final Kolmogorov-Smirnov test for the uniformity of the distribution of p-values of the test statistic is a variable with default 100, which is much larger than most diehard default values. This change alone causes many generators that are asserted to "pass diehard" to in fact fail -- any given test run generates a p-value that is acceptable, but the distribution of p-values is not uniform.
  • The number of actual samples within a test that contribute to the single-run test statistic was made a variable when possible. This was generally possible when the target was an easily computable function of the number of samples, but a number of the tests have pre-computed targets for specific numbers of samples and that number cannot be varied because no general function is known relating the target value to the number of samples.
  • Many of diehard's tests investigated overlapping bit sequences. Overlapping sequences are not independent and one has to account for covariance between the samples (or a gradually vanishing degree of autocorrelation between sequential samples with gradually decreasing overlap). This was generally done at least in part because it used file-based input of random numbers and the size of files that could reasonably be generated and tested in the mid-90's contained on the order of a million random deviates.

    Unfortunately, some of the diehard tests that rely on weak inverses of the covariance matrices associated with overlapping samples seem to have errors in their implementation, whether in the original diehard (covariance) data or in dieharder-specific code it is difficult to say. Fortunately, it is no longer necessary to limit the number of random numbers drawn from a generator when running an integrated test, and non-overlapping versions of these same tests do not require any treatment of covariance. For that reason non-overlapping versions of the questionable tests have been provided where possible (in particular testing permutations and sums) and the overlapping versions of those tests are deprecated pending a resolution of the apparent errors.

In a few cases other variations are possible for specific tests. This should be noted in the built-in test documentation for that test where appropriate.

Aside from these major differences, note that the algorithms were independently written more or less from the test descriptions alone (sometimes illuminated by a look at the code implementations, but only to clear up just what was meant by the description). They may well do things in a different (but equally valid) order or using different (but ultimately equivalent) algorithms altogether and hence produce slightly different (but equally valid) results even when run on the same data with the same basic parameters. Then, there may be bugs in the code, which might have the same general effect. Finally, it is always possible that diehard implementations have bugs and can be in error. Your Mileage May Vary. Be Warned.


About Dieharder

The primary point of dieharder (like diehard before it) is to make it easy to time and test (pseudo)random number generators, both software and hardware, for a variety of purposes in research and cryptography. The tool is built entirely on top of the GSL's random number generator interface and uses a variety of other GSL tools (e.g. sort, erfc, incomplete gamma, distribution generators) in its operation.

Dieharder differs significantly from diehard in many ways. For example, diehard uses file based sources of random numbers exclusively and by default works with only roughly ten million random numbers in such a file. However, modern random number generators in a typical simulation application can easily need to generate 10^18 or more random numbers, generated from hundreds, thousands, millions of different seeds in independent (parallelized) simulation threads, as the application runs over a period of months to years. Those applications can easily be sensitive to rng weaknesses that might not be revealed by sequences as short as 10^7 uints in length even with excellent and sensitive tests. One of dieharder's primary design goals was to permit tests to be run on very long sequences.

To facilitate this, dieharder prefers to test generators that have been wrapped up in a GSL-compatible interface so that they can return an unbounded stream of random numbers -- as many as any single test or the entire suite of tests might require. Numerous examples are provided of how one can wrap one's own random number generator so that it is can be called via the GSL interface.

Dieharder also supports file-based input three distinct ways. The simplest is to use the (raw binary) stdin interface to pipe a bit stream from any rng, hardware or software, through dieharder for testing. In addition, one can use "direct" file input of either raw binary or ascii formatted (usually uint) random numbers. The man page contains examples of how to do all three of these things, and dieharder itself can generate sample files to use as templates for the appropriate formatting.

Note Well! Dieharder can consume a lot of random numbers in the course of running all the tests! To facilitate this, dieharder should (as of 2.27.11 and beyond) support large file (> 2GB) input, although this is still experimental. Large files are clunky and relatively slow, and the LFS (large file system) in linux/gcc is still relatively new and may have portability issues if dieharder is built with a non-gcc compiler. It is therefore strongly recommended that both hardware and software generators be tested by being wrapped within the GSL interface by emulating the source code examples or that the pipe/stdin interface be used so that they can return an essentially unbounded rng stream.

Dieharder also goes beyond diehard in that it is deliberately extensible. In addition to implementing all of the diehard tests it is expected that dieharder will eventually contain all of the NIST STS and a variety of tests contributed by users, invented by the dieharder authors, or implemented from descriptions in the literature. As a true open source project, dieharder can eventually contain all rng tests that prove useful in one place with a consistent interface that permits one to apply those tests to many generators for purposes of comparison and validation of the tests themselves as much as the generators. In other words, it is intended to be a vehicle for the computer science of random number generation testing as well as a practical test harness for random number generators.

To expand on this, the development of dieharder was motivated by the following, in rough order of importance:

  • To provide a readily available, rpm- or apt- installable toolset so that "consumers" of random numbers (who typically use large numbers of random numbers in e.g. simulation or other research) can test the generator(s) they are using to verify their quality or lack thereof.
  • To provide a very simple user interface for that toolset for random number consumers. At the moment, this means a command line interface (CLI) that can easily be embedded in scripts or run repeatedly with different parameters. A graphical user interface (GUI) is on the list of things to do, although it adds little to the practical utility of the tool.
  • To provide lots of knobs and dials and low level control for statistical researchers that want to study particular generators with particular tests in more detail. This includes full access to test sources -- no parameter or aspect of the test algorithms is "hidden" and needs to be taken on faith.
  • To have the entire test code and documentation be fully Gnu Public Licensed and hence openly available for adaptation, testing, comment, and modification so that the testing suite itself becomes (over time) reliable.
  • To be extensible. Dieharder provides a fairly simple API for adding new tests with a common set of low-level testing tools and a common test structure that leads (one hopes) to an unambiguous decision to accept or reject any given random number generator on the basis of any given test for a suitable choice of controllable test parameters.
  • To allow all researchers to be able to directly test, in particular, the random number generators interfaced with the GSL. This is a deliberate design decision justified by the extremely large and growing number of random number generators prebuilt into the GSL and the ease of adding new ones (either contributing them to the project or for the sole purpose of local testing).
  • To allow researchers that use e.g. distributions directly generated by GSL routines (which can in principle fail two ways, due to the failure of the underlying random number generator or due to a failure of the generating algorithm) to be able to directly validate their particular generator/distribution combination at the cost of implementing a suitable test in dieharder (using the code of existing tests as a template).
  • To allow dieharder to be directly interfaced with other tools and interfaces. For example, dieharder can be directly called within the R interface, permitting its rngs to be tested and R-based graphics and tools to be used to analyze test results. Note well, however, that because it uses the GSL (which is GPL viral) dieharder itself is GPL viral and cannot be embedded directly into a non-GPL tool such as matlab. It can, of course, be used to generate p-value data that is passed on to matlab (or any other graphing or analysis tool)

Although this tool is being developed on Linux/GCC-based platforms, it should port with no particular difficulty to other Unix-like environments (at least ones that also support the GSL), with the further warning that certain features (in particular large file support) may require tweaking and that the dieharder authors may not be able to help you perform that tweaking.

Essential Usage Synopsis

If you compile the test or install the provided binary rpm's and run it as:

dieharder -a

it should run -a(ll) tests on the default GSL generator.

Choose alternative tests with -g number where:

dieharder -g -1

will list all possible numbers known to the current snapshot of the dieharder.

dieharder -l

should list all the tests implemented in the current snapshop of DieHarder. Finally, the venerable and time tested:

dieharder -h

provides a Usage synopsis (which can quite long) and

man dieharder

is the (installed) man page, which may or many not be completely up to date as the suite is under active development. For developers, additional documentation is available in the toplevel directory or doc subdirectory of the source tree. Eventually, a complete DieHard manual in printable PDF form will be available both on this website and in /usr/share/doc/dieharder-*/.

List of Random Number Generators and Tests Available

List of GSL and user-defined random number generators that can be tested by dieharder:

#=============================================================================#
#          dieharder version 3.29.4beta Copyright 2003 Robert G. Brown        #
#=============================================================================#
#    Id Test Name           | Id Test Name           | Id Test Name           #
#=============================================================================#
|   000 borosh13            |001 cmrg                |002 coveyou             |
|   003 fishman18           |004 fishman20           |005 fishman2x           |
|   006 gfsr4               |007 knuthran            |008 knuthran2           |
|   009 knuthran2002        |010 lecuyer21           |011 minstd              |
|   012 mrg                 |013 mt19937             |014 mt19937_1999        |
|   015 mt19937_1998        |016 r250                |017 ran0                |
|   018 ran1                |019 ran2                |020 ran3                |
|   021 rand                |022 rand48              |023 random128-bsd       |
|   024 random128-glibc2    |025 random128-libc5     |026 random256-bsd       |
|   027 random256-glibc2    |028 random256-libc5     |029 random32-bsd        |
|   030 random32-glibc2     |031 random32-libc5      |032 random64-bsd        |
|   033 random64-glibc2     |034 random64-libc5      |035 random8-bsd         |
|   036 random8-glibc2      |037 random8-libc5       |038 random-bsd          |
|   039 random-glibc2       |040 random-libc5        |041 randu               |
|   042 ranf                |043 ranlux              |044 ranlux389           |
|   045 ranlxd1             |046 ranlxd2             |047 ranlxs0             |
|   048 ranlxs1             |049 ranlxs2             |050 ranmar              |
|   051 slatec              |052 taus                |053 taus2               |
|   054 taus113             |055 transputer          |056 tt800               |
|   057 uni                 |058 uni32               |059 vax                 |
|   060 waterman14          |061 zuf                 |                        |
#=============================================================================#
|   200 stdin_input_raw     |201 file_input_raw      |202 file_input          |
|   203 ca                  |204 uvag                |205 AES_OFB             |
|   206 Threefish_OFB       |                        |                        |
#=============================================================================#
|   400 R_wichmann_hill     |401 R_marsaglia_multic. |402 R_super_duper       |
|   403 R_mersenne_twister  |404 R_knuth_taocp       |405 R_knuth_taocp2      |
#=============================================================================#
|   500 /dev/random         |501 /dev/urandom        |                        |
#=============================================================================#
|   600 empty               |                        |                        |
#=============================================================================#

Two "gold standard" generators in particular are provided to "test the test" -- AES_OFB and Threefish_OFB are both cryptographic generators and should be quite random. gfsr4, mt19937, and taus (and several others) are very good generators in the GSL, as well. If you are developing a new rng, it should compare decently with these generators on dieharder test runs.

Note that the stdin_input_raw interface (-g 200) is a "universal" interface. Any generator that can produce a (continuous) stream of presumably random bits can be tested with dieharder. The easiest way to demonstrate this is by running:

dieharder -S 1 -B -o -t 1000000000 | dieharder -g 75 -r 3 -n 2

where the first invocation of dieharder generates a stream of binary bits drawn from the default generator with seed 1 and the second reads those bits from stdin and tests them with the rgb bitdist test on two bit sequences. Compare the output to:

dieharder -S 1 -r 3 -n 2

which runs the same test on the same generator with the same seed internally. They should be the same.

Similarly the file_input generator requires a file of "cooked" (ascii readable) random numbers, one per line, with a header that describes the format to dieharder. Note Well! File or stream input rands (with any of the three methods for input) are delivered to the tests on demand, but if the test needs more than are available dieharder either fails (in the case of a stdin stream) or rewinds the file and cycles through it again, and again, and again as needed. Obviously this significantly reduces the sample space and can lead to completely incorrect results for the p-value histograms unless there are enough rands to run EACH test without repetition (it is harmless to reuse the sequence for different tests). Let the user beware!

List of the CURRENT fully implemented tests (as of the 08/18/08 snapshot):

#=============================================================================#
#          dieharder version 3.29.4beta Copyright 2003 Robert G. Brown        #
#=============================================================================#
Installed dieharder tests:
 Test Number                         Test Name                Test Reliability
===============================================================================
  -d 0                            Diehard Birthdays Test              Good
  -d 1                               Diehard OPERM5 Test           Suspect
  -d 2                    Diehard 32x32 Binary Rank Test              Good
  -d 3                      Diehard 6x8 Binary Rank Test              Good
  -d 4                            Diehard Bitstream Test              Good
  -d 5                                      Diehard OPSO              Good
  -d 6                                 Diehard OQSO Test              Good
  -d 7                                  Diehard DNA Test              Good
  -d 8                Diehard Count the 1s (stream) Test              Good
  -d 9                  Diehard Count the 1s Test (byte)              Good
  -d 10                         Diehard Parking Lot Test              Good
  -d 11         Diehard Minimum Distance (2d Circle) Test             Good
  -d 12         Diehard 3d Sphere (Minimum Distance) Test             Good
  -d 13                             Diehard Squeeze Test              Good
  -d 14                                Diehard Sums Test        Do Not Use
  -d 15                                Diehard Runs Test              Good
  -d 16                               Diehard Craps Test              Good
  -d 17                     Marsaglia and Tsang GCD Test              Good
  -d 100                                STS Monobit Test              Good
  -d 101                                   STS Runs Test              Good
  -d 102                   STS Serial Test (Generalized)              Good
  -d 200                       RGB Bit Distribution Test              Good
  -d 201           RGB Generalized Minimum Distance Test              Good
  -d 202                           RGB Permutations Test              Good
  -d 203                             RGB Lagged Sum Test              Good
  -d 204                RGB Kolmogorov-Smirnov Test Test              Good

Full descriptions of the tests are available from within the tool. For example, enter:

rgb@lilith|B:1003>./dieharder -d 203 -h
OK, what is dtest_num = 203
#==================================================================
#                     RGB Lagged Sums Test
# This package contains many very lovely tests.  Very few of them,
# however, test for lagged correlations -- the possibility that
# the random number generator has a bitlevel correlation after
# some fixed number of intervening bits.
#
# The lagged sums test is therefore very simple.   One simply adds up
# uniform deviates sampled from the rng, skipping lag samples in between
# each rand used.  The mean of tsamples samples thus summed should be
# 0.5*tsamples.  The standard deviation should be sqrt(tsamples/12).
# The experimental values of the sum are thus converted into a
# p-value (using the erf()) and a ks-test applied to psamples of them.
#==================================================================

Note that all tests have been independently rewritten from their description, and may be functionally modified or extended relative to the original source code published in the originating suite(s). This has proven to be absolutely necessary; dieharder stresses random number generator tests as much as it stresses random number generators, and tests with imprecise target statistics can return "failure" when the fault is with the test, not the generator.

The author (rgb) bears complete responsibility for these changes, subject to the standard GPL code disclaimer that the code has no warranty. In essence, yes it may be my fault if they don't work but using the tool is at your own risk and you can fix it if it bothers you and/or I don't fix it first.

Development Notes

All tests are encapsulated to be as standard as possible in the way they compute p-values from single statistics or from vectors of statistics, and in the way they implement the underlying KS and chisq tests. Diehard is now complete in dieharder (although two tests are badly broken and should not be used), and attention will turn towards implementing more selected tests from the STS and many other sources. A road map of sorts (with full supporting documentation) is available on request if volunteers wish to work on adding more GPL tests.

Note that a few tests appear to have stubborn bugs. In particular, the diehard operm5 test seems to fail all generators in dieharder. Several users have attempted to help debug this problem, and it tentatively appears that the problem is in the original diehard code and not just dieharder. There is extensive literature on overlapping tests, which are highly non-trivial to implement and involve things like forming the weak inverse of covariance matrices in order to correct for overlapping (non-independent) statistics.

A revised version of overlapping permutations is underway (as an rgb test), but is still buggy. A non-overlapping (rgb) permutations test is provided now that should test much the same thing at the expense of requiring more samples to do it.

Similarly, the diehard sums test appears to produce a systematically non-flat distribution of p-values for all rngs tested, in particular for the "gold standard" cryptographic generators aes and threefish, as well as for the "good" generators in the GSL (mt19937, taus, gfsr4). It seems very unlikely that all of these generators would be flawed in the same way, so this test also should not be used to test your rng.

Thoughts for the Future/Wish List/To Do

  • Tests of GSL random distribution (as opposed to number) generators, as indirect tests of the generators that feed them.
  • New tests, compressions of existing ones that are "different" but really the same. Hyperplane tests. Spectral tests. Especially the bit distribution test with user defineable lag or lag pattern (to look for subtle, long period correlations in the bit patterns produced).
  • Collaborators. Co-developers welcome, as are contributions or suggestions from users. Note well that users have already provided critical help debugging the early code! Part of the point of a GPL project is that you are NOT at the mercy of a black box piece of code. If you are using dieharder and are moderately expert at statistics and random numbers and observe something odd, please help out!

Conclusions

I hope that even during its development, you find dieharder useful. Remember, it is fully open source, so you can freely modify and redistribute the code according to the rules laid out in the Gnu Public License (version 2b), which might cost you as much as a beer one day. In particular, you can easily add random number generators using the provided examples as templates, or you can add tests of your own by copying the general layout of the existing tests (working toward a p-value per run, cumulating (say) 100 runs, and turning the resulting KS test into an overall p-value). Best of all, you can look inside the code and see how the tests work, which may inspire you to create a new test -- or a new generator that can pass a test.

To conclude, if you have any interest in participating in the development of dieharder, be sure to let me know, especially if you have decent C coding skills (including familiarity with Subversion and the GSL) and a basic knowledge of statistics. I even have documents to help with the latter, if you have the programming skills and want to LEARN statistics. Bug reports or suggestions are also welcome.

Submit bug reports, etc. to

rgb at phy dot duke dot edu
./Makefile.am0000664000175000017500000002525014345634406011340 0ustar eddedd## Process this file with automake to produce Makefile.in # These are made, in order presented, from the toplevel make SUBDIRS = libdieharder dieharder include # These are automagically included in the make dist rule. I # do believe that I'm going to have to eliminate my own version # of this below. Sigh. Time to actually learn to use the GBT # properly, I suppose. # EXTRA_DIST = autogen.sh dieharder-config.in configure.ac \ # THANKS BUGS SUPPORT dieharder.spec.in dieharder.m4 test_dieharder.sh EXTRA_DIST = autogen.sh set_ld_library_path Copyright #======================================================================== # This is the toplevel Makefile for the dieharder project. It has # some specialized targets: # # make alone should build the entire application as usual # make install should install it. Use configure --prefix= to specify # a toplevel path other than the default /usr. # # make tgz makes $(TGZ) of entire tree for standalone or rpm build # make rpm makes $(RPM) packages built by dieharder.spec # #======================================================================== # These are targets just for me to facilitate project management. #======================================================================== # make svn does a svn commit and creates the timestamp $(SVNTIME) # make sync does a svn commit and syncs to list of svn-tree hosts # make installweb installs to project website for download # make installrepo installs to yum repo # #======================================================================== PROJECT = dieharder LIBRARY = libdieharder LIBTIME = libwulf.time INCTIME = include.time PROGRAM = dieharder PROGTIME = dieharder.time MANUAL = manual MANTIME = manual.time RDIEHARDER = RDieHarder #======================================================================== # Constructs used in project maintenance and installation. # # The destination on an ssh-accessible remote webserver $(WLOGIN), # used as: # $(HOME)/public_html/$(WDIR) #======================================================================== WLOGIN = ganesh.phy.duke.edu WDIR = General ABS = $(PROJECT).abs PHP = $(PROJECT).php #======================================================================== # This is revision information, automagically set from autoconf. The # actual version information is set ONLY in configure.ac #======================================================================== VERSION=@VERSION@ RELEASE=@RELEASE@ LITTLE_ENDIAN=@LITTLE_ENDIAN@ #======================================================================== # RPM/tarball target objects. We need rules for all of these. #======================================================================== PROJECTDIR = $(PROJECT)-$(VERSION) TAR = $(PROJECTDIR).tar TGZ = $(PROJECTDIR).tgz SPEC = $(PROJECT).spec #======================================================================== # List of variants one can make. all is the default. We always # presume the simplest of dependencies and remake if includes change # for example. #======================================================================== all: $(LIBTIME) $(PROGTIME) $(INCTIME) # This is not, actually, a particularly useful toplevel target. To # work correctly it also would require a full parsing of all # lower level dependencies. I'm leaving it in for the moment just # to have a default target at the toplevel that CAN be used to test. $(LIBTIME): (cd $(LIBRARY); \ make) $(INCTIME): (cd include; \ make) $(PROGTIME): $(LIBTIME) (cd $(PROGRAM); \ make) $(ABS): Makefile cat $(ABS) | \ sed -e 's/^\(

Version \)\(.*\)/\1$(VERSION)<\/H2><\/center>/' > /tmp/$(ABS).$$ mv /tmp/$(ABS).$$ $(ABS) #======================================================================== # This is a required target for both its own sake and to support the # rpm build. It has to run unconditionally when called. Note that we # make PRECISELY what we need in terms of the source directories, # excluding all restricted material and irrelevant data. #======================================================================== tgz: Makefile COPYING Copyright NOTES README $(SPEC) $(ABS) $(PHP) ( rm -rf $(TAR) $(TGZ) $(PROJECTDIR); \ mkdir -p $(PROJECTDIR); \ cd $(LIBRARY); \ make clean; \ cd ..; \ cp -r $(LIBRARY) $(PROJECTDIR); \ cd $(PROGRAM); \ make clean; \ cd ..; \ cp -r $(PROGRAM) $(PROJECTDIR); \ cd $(MANUAL); \ make clean; \ cd ..; \ cp -r $(MANUAL) $(PROJECTDIR); \ cp -r include $(PROJECTDIR); \ cp -r m4 $(PROJECTDIR); \ cp $(ABS) $(PROJECTDIR); \ cp $(PHP) $(PROJECTDIR); \ cp Makefile $(PROJECTDIR); \ cp Makefile.am $(PROJECTDIR); \ cp Makefile.in $(PROJECTDIR); \ cp configure $(PROJECTDIR); \ cp config.h.in $(PROJECTDIR); \ cp $(SPEC).in $(PROJECTDIR); \ cp dieharder_version.h.in $(PROJECTDIR); \ cp dieharder.html.in $(PROJECTDIR); \ cp dieharder-config.in $(PROJECTDIR); \ cp autogen.sh $(PROJECTDIR); \ cp missing $(PROJECTDIR); \ cp aclocal.m4 $(PROJECTDIR); \ cp mkinstalldirs $(PROJECTDIR); \ cp ltmain.sh $(PROJECTDIR); \ cp depcomp $(PROJECTDIR); \ cp configure $(PROJECTDIR); \ cp configure.ac $(PROJECTDIR); \ cp config.guess $(PROJECTDIR); \ cp config.sub $(PROJECTDIR); \ cp config.status $(PROJECTDIR); \ cp install-sh $(PROJECTDIR); \ cp Copyright $(PROJECTDIR); \ cp COPYING $(PROJECTDIR); \ cp INSTALL $(PROJECTDIR); \ cp AUTHORS $(PROJECTDIR); \ cp NEWS $(PROJECTDIR); \ cp ChangeLog $(PROJECTDIR); \ cp README $(PROJECTDIR); \ cp NOTES $(PROJECTDIR); \ tar -cvpf $(TAR) \ --exclude=.svn \ --exclude=Cruft \ --exclude=Exclude \ --exclude=*.tar \ --exclude=*.tgz \ --exclude=*.rpm \ ./$(PROJECTDIR); \ gzip $(TAR); \ mv $(TAR).gz $(TGZ); \ rm -rf $(PROJECTDIR)) LIBTOOL_DEPS = @LIBTOOL_DEPS@ libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck #======================================================================== # rpm target special stuff # # To work in userspace, add the following: # %_topdir /home/rgb/Src/redhat # to your personal $(HOME)/.rpmmacros after building # yourself a private copy of the /usr/src/redhat directory structure. # # RPM_TOPDIR=/usr/src/redhat RPM_TOPDIR=$(HOME)/Src/rpm_tree # This is needed to get the right library and binary rpm. ARCH=`uname -i` # ARCH=i386 # These are the three rpms automagically built by the spec SSRPM = $(PROJECT)-src-$(VERSION)-$(RELEASE).src.rpm SRPM = $(PROJECT)-$(VERSION)-$(RELEASE).src.rpm LRPM = libdieharder-$(VERSION)-$(RELEASE).$(ARCH).rpm PRPM = dieharder-$(VERSION)-$(RELEASE).$(ARCH).rpm $(TGZ): tgz $(SRPM): rpm $(LRPM): rpm $(PRPM): rpm #======================================================================== # One stop shop. Basically we build this every time, we hope. rpm: Makefile $(TGZ) rm -rf /var/tmp/dieharder* cp $(TGZ) $(RPM_TOPDIR)/SOURCES cp $(SPEC) $(RPM_TOPDIR)/SPECS rpmbuild -ba --target=$(ARCH) $(RPM_TOPDIR)/SPECS/$(SPEC) cp $(RPM_TOPDIR)/SRPMS/$(SSRPM) $(SRPM) cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(LRPM) . cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(PRPM) . # I can leave this target in here, but I have to run it BY HAND right # before a release build. Otherwise a src rpm rebuild can fail for # people without the svn repo in odd ways. ChangeLog: $(SVNTIME) svn2cl dieharder.svn.time #======================================================================== # Make targets for checking in to svn, syncing svn repo from a local # (e.g. laptop) to one or more network/primary repos. #======================================================================== SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/$(PROJECT) SVNTIME = $(PROJECT:=.svn.time) svn: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) sync: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . # Do the commit rsync -avz --delete $(SVNPATH) ganesh.phy.duke.edu:/home/einstein/prof/rgb/Src/svn-tree rsync -avz --delete $(SVNPATH) 209.42.212.5:$(SVNTREE) cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) installweb : $(TGZ) $(RPM) $(SRPM) $(LRPM) $(PRPM) $(MRPM) $(ABS) $(PHP) (ssh $(WLOGIN) mkdir -p public_html/$(WDIR)/$(PROJECT);\ rsync -avz $(TGZ) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(SRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(LRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(PRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(MRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(ABS) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ ssh $(WLOGIN) "cd public_html/$(WDIR)/$(PROJECT);ln -sf $(TGZ) $(PROJECT).tgz"; \ ssh $(WLOGIN) "cd public_html/$(WDIR)/$(PROJECT);ln -sf $(SRPM) $(PROJECT).src.rpm"; \ ssh $(WLOGIN) "cd public_html/$(WDIR)/$(PROJECT);rm Current*;touch Current_Is_$(VERSION)"; \ rsync -avz $(PHP) $(WLOGIN):public_html/$(WDIR)/) REPOSERVER = uriel REPOPATH = /var/www/html/fc/6/local/ installrepo : $(TGZ) $(RPM) $(SRPM) $(LRPM) $(PRPM) $(MRPM) $(ABS) $(PHP) (ssh $(REPOSERVER) mkdir -p $(REPOPATH);\ rsync -avz $(TGZ) root@$(REPOSERVER):$(REPOPATH);\ rsync -avz $(SRPM) root@$(REPOSERVER):$(REPOPATH)/SRPM;\ ssh $(REPOSERVER) mkdir -p $(REPOPATH)/$(ARCH);\ rsync -avz $(LRPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ rsync -avz $(PRPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ rsync -avz $(MRPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ ssh root@$(REPOSERVER) "cd $(REPOPATH)/$(ARCH);createrepo .") #======================================================================== # This target takes the dieharder sources and "magically" transforms # them into RDieHarder sources. RDHTAR=RDieHarder_@VERSION@.tar RDHPKG=RDieHarder_@VERSION@.tar.gz $(RDHPKG): rdhpkg rdhpkg: rm -rf RDieHarder/src/*.h RDieHarder/src/*.c \ RDieHarder/src/*.o RDieHarder/src/Makefile RDieHarder/src/*.so cp dieharder/*.c RDieHarder/src/ cp dieharder/*.h RDieHarder/src/ mv RDieHarder/src/rdieharder.c RDieHarder/src/dieharder.c cp dieharder/Makefile.RDH RDieHarder/src/Makefile tar -cvpf $(RDHTAR) RDieHarder gzip -f $(RDHTAR) # This can be run by anybody rdhclean: rm -rf RDieHarder/src/*.h RDieHarder/src/*.c $(RDHTAR) $(RDHPKG) \ RDieHarder/src/*.o RDieHarder/src/Makefile RDieHarder/src/*.so # This can be run as anybody rdhprep: rm -rf RDieHarder/src/*.h RDieHarder/src/*.c \ RDieHarder/src/*.o RDieHarder/src/Makefile RDieHarder/src/*.so cp dieharder/*.c RDieHarder/src/ cp dieharder/*.h RDieHarder/src/ mv RDieHarder/src/rdieharder.c RDieHarder/src/dieharder.c cp dieharder/Makefile.RDH RDieHarder/src/Makefile # This has to be run only as root, sorry. rdh: $(RDHPKG) R CMD INSTALL $(RDHPKG) ./autogen.sh0000775000175000017500000000215013707046103011267 0ustar eddedd#! /bin/sh # Run this to generate all the auto-generated files needed by the GNU # configure program. This must be done FIRST; note well that there is # no Makefile to run until it is done. # echo "Running autoheader..." # autoheader # echo "Running aclocal..." # aclocal # echo "Running libtoolize..." # libtoolize # rm -f Makefile Makefile.in dieharder/Makefile dieharder/Makefile.in \ # libdieharder/Makefile libdieharder/Makefile.in # echo "Running automake..." # automake --add-missing --copy --gnu echo "Running autoreconf..." autoreconf # # Might as well run this -- then we are ready to run make. # echo "Running default ./configure --prefix=/usr" ./configure --prefix=/usr echo "==================================================================" echo "" echo " Makefile should be built, and ./configure --prefix=/usr should be" echo " completed. You may rerun configure with a different e.g." echo "--prefix if you want to put dieharder someplace else. Otherwise" echo "you should be able to make, make install, or make rpm." echo "" echo "==================================================================" ./dieharder.spec.in0000664000175000017500000001531113707046103012501 0ustar eddedd%define _unpackaged_files_terminate_build 0 %define __arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot Name: dieharder-src Summary: Dieharder is a random number generator tester and timer %define version @VERSION@ %define release @RELEASE@ Version: %{version} Release: %{release} License: Open Source (GPL) Group: Development/Tools Source: dieharder-%{version}.tgz URL: http://www.phy.duke.edu/~rgb/General/dieharder.php Requires: gsl BuildRequires: chrpath gsl-devel # Mandatory path for Fedora Core builds Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description ######################################################################## # LIBRARY: This is the basic dieharder library ######################################################################## %package -n libdieharder Summary: A library of random number generator tests and timing routines Group: Development/Tools Provides: libdieharder.so %description -n libdieharder libdieharder is the core library of dieharder and friends, designed to be "the last suite of random number testers you'll ever wear". It can test any of its many prebuilt and library linked generators (basically all of those in the Gnu Scientific Library plus a number of others from various sources) or a potentially random dataset in either an ascii-formatted or raw (presumed 32 bit uint) binary file. It is fairly straightforward to wrap new software generators for testing, or to add hardware generators that have a software interface for testing, and the file input method permits pretty much any software or hardware RNG to be tested using libdieharder calls. libdieharder has as a design goal the full encapsulation in an extensible shell of basically all the random number tests I have been able to find -- George Marsaglia's "diehard" battery of tests, STS (v1.6) from NIST FIPS, Knuth's tests, and more. Check in the man page(s) or /usr/share/dieharder*/dieharder.pdf for documentation. ######################################################################## # This is dieharder itself, the tty UI ######################################################################## %package -n dieharder Summary: dieharder is a random number generator tester and timer. Group: Development/Tools Requires: libdieharder = %{version} %description -n dieharder dieharder is a fairly involved random number/uniform deviate generator tester. It can either test any of its many prebuilt and linked generators (basically all of those in the Gnu Scientific Library plus others I've added) or a potentially random dataset in a file. With file input, it can manage either a variety of ascii-formatted input or a raw binary bitstring. It is thus suitable for use in testing both software RNG's and hardware RNG's. dieharder does all of its work with a standalone, extensible library, libdieharder. Its tests can therefore be integrated into other programs, subject to the requirements of the GPL (NOT, note, the LGPL as it uses the GSL which is full GSL, viral). dieharder encapsulates (or will eventually encapsulate) basically all the random number tests I have been able to find -- George Marsaglia's "diehard" battery of tests, STS (v1.5) from NIST FIPS, Knuth's tests, and more. Check in the man page or /usr/share documentation for a complete list of the tests and references where possible. It is intended to be the "swiss army knife of random number testers", or "the last suite of random number testers you'll ever wear". ######################################################################## # The main section common to all builds. ######################################################################## %prep %setup -q -n dieharder-%{version} ./autogen.sh %configure sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %build ./configure --prefix=$RPM_BUILD_ROOT%{_prefix} --libdir=$RPM_BUILD_ROOT%{_libdir} make # Note that multipackage sources with libraries are happier with # their own local buildroot to facilitate development without a # full install. %install rm -rf $RPM_BUILD_ROOT make prefix=$RPM_BUILD_ROOT%{_prefix} install chrpath --delete $RPM_BUILD_ROOT%{_bindir}/dieharder rm -rf $RPM_BUILD_ROOT%{_libdir}/libdieharder.a rm -rf $RPM_BUILD_ROOT%{_libdir}/libdieharder.la rm -rf $RPM_BUILD_ROOT%{_libdir}/libdieharder.so.? # make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \ # mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \ # localstatedir=$RPM_BUILD_ROOT%{_localstatedir} \ # datadir=$RPM_BUILD_ROOT%{_datadir} \ # includedir=$RPM_BUILD_ROOT%{_includedir} \ # sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install %clean rm -rf $RPM_BUILD_ROOT ######################################################################## # Files in libdieharder ######################################################################## %files -n libdieharder %defattr(-,root,root) %dir %{_libdir} # The libdieharder library. We ONLY install the primary # versioned library -- ldconfig and ln are used to finish off # later. # %{_libdir}/libdieharder.so.%{version} %{_libdir}/libdieharder.so.@DIEHARDER_LIB_VERSION@ %{_libdir}/libdieharder.so # The libdieharder include files are under here %attr(644,root,root) /usr/include/dieharder # The libdieharder man page %attr(644,root,root) /usr/share/man/man3/libdieharder.3.gz # These are all pretty much standard. %doc ChangeLog Copyright README COPYING NOTES dieharder.html ######################################################################## # Files installed with the dieharder tty UI ######################################################################## %files -n dieharder %defattr(-,root,root) # The dieharder binary %attr(755,root,root) /usr/bin/dieharder # This is supposed to be installed by/for the GBT? %attr(755,root,root) /usr/bin/dieharder-config # The dieharder man page %attr(644,root,root) /usr/share/man/man1/dieharder.1.gz # These are all pretty much standard. %doc ChangeLog Copyright README COPYING NOTES dieharder.html ######################################################################## # Command to execute post install or uninstall of libdieharder ######################################################################## %post -n libdieharder if [ -d /usr/lib64 ] then cd /usr/lib64 # ln -sf libdieharder.so.%{version} libdieharder.so ldconfig -n . else cd /usr/lib # ln -sf libdieharder.so.%{version} libdieharder.so ldconfig -n . fi %postun -n libdieharder if [ -d /usr/lib64 ] then rm -f /usr/lib64/libdieharder.so rm -f /usr/lib64/libdieharder.so.%{version} ldconfig else rm -f /usr/lib/libdieharder.so rm -f /usr/lib/libdieharder.so.%{version} ldconfig fi ./INSTALL0000644000175000017500000003661413707046265010342 0ustar eddeddInstallation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command './configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. 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 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. Running 'configure' might take a while. 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, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. 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. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. 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=c99 CFLAGS=-g 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 can use 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 '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer 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. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. 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', where PREFIX must be an absolute file name. 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. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= 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'. 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. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common 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). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--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. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. ./Copyright0000664000175000017500000000131013707046103011156 0ustar eddedd/* * dieharder * * Copyright (c) 2007 by Robert G. Brown, rgb@phy.duke.edu * GPL version 2b (b for beverage) granted as given * in the file COPYING in this distribution. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * */ ./dieharder.php0000664000175000017500000000037113707046103011731 0ustar eddedd ./install-sh0000755000175000017500000003601013707046265011303 0ustar eddedd#!/bin/sh # install - install a program, script, or datafile scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # Note that $RANDOM variable is not portable (e.g. dash); Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ./configure0000775000175000017500000162675613707054533011234 0ustar eddedd#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for dieharder 3.31.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dieharder' PACKAGE_TARNAME='dieharder' PACKAGE_VERSION='3.31.1' PACKAGE_STRING='dieharder 3.31.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="dieharder.abs" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS LITTLE_ENDIAN ACLOCAL_AMFLAGS DIEHARDER_LIBS libdieharder_lo_CFLAGS dieharder_CFLAGS DIEHARDER_CFLAGS ACTAR RELEASED DIEHARDER_LIB_VERSION DIEHARDER_LT_VERSION LIBTOOL_DEPS CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL RELEASE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_shared enable_static with_pic enable_fast_install with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures dieharder 3.31.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/dieharder] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dieharder 3.31.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. 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 the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF dieharder configure 3.31.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dieharder $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.16' 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 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dieharder' VERSION='3.31.1' 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"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi RELEASE=1 ac_config_headers="$ac_config_headers config.h" # AM_MAINTAINER_MODE $as_echo "#define RELEASED /**/" >>confdefs.h #================================================================== # Library versioning (current:revision:age) # See the libtool manual for an explanation of the numbers. # NOTE WELL! One MUST bump LT_VERSION along with AC_INIT, # apparently. # # dieharder-1.0 libdieharder 0:0:0 #================================================================== # This command "should" keep libtool up to date. case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 $as_echo "${_am_result}" >&6; } # 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='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cr} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cr libconftest.a conftest.o" >&5 $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: DIEHARDER_LT_VERSION="3:31:1" DIEHARDER_LIB_VERSION=3.31.1 case "$VERSION" in *+) $as_echo "#define RELEASED 0" >>confdefs.h ;; *) $as_echo "#define RELEASED 1" >>confdefs.h ;; esac #================================================================== # Check for which system. #================================================================== #================================================================== # Checks for programs. #================================================================== ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi #================================================================== # OK, these five macros prevent my personal path from appearing # in the default Makefile, and actually should make it work to # rebuilt itself even if somebody completely blows off running # ./autogen.sh. And it ALMOST WORKS #================================================================== ACLOCAL="${SHELL} ./missing --run aclocal" ACTAR="${SHELL} ./missing --run tar" AUTOCONF="${SHELL} ./missing --run autoconf;echo \"Run ./configure\";exit" AUTOHEADER="${SHELL} ./missing --run autoheader" AUTOMAKE="${SHELL} ./missing --run automake --add-missing --copy --gnu" #================================================================== # Disable unnecessary libtool tests for c++,fortran,java #================================================================== #================================================================== # Check compiler features #================================================================== ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # AC_C_CONST { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { volatile int x; int * volatile y = (int *) 0; return !x && !y; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 $as_echo "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then $as_echo "#define volatile /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac DIEHARDER_CFLAGS="-I$includedir" dieharder_CFLAGS="-std=c99 -Wall -pedantic -I$includedir" libdieharder_lo_CFLAGS="-Wall -pedantic -I$includedir" DIEHARDER_LIBS="-L$libdir -ldieharder" ACLOCAL_AMFLAGS="-I m4" #================================================================== # Checks for libraries, and headers. Test for dependency libraries # FIRST in reverse order that you need -lwhatever to appear on # compile line as it accumulates libraries to build e.g. # -lgsl -lgslcblas # for the SECOND test, required (in that order) to succeed. #================================================================== ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_sf_gamma.h" "ac_cv_header_gsl_gsl_sf_gamma_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_sf_gamma_h" = xyes; then : else as_fn_error $? "Couldn't find GSL headers. Please install the gsl-devel package." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgslcblas" >&5 $as_echo_n "checking for main in -lgslcblas... " >&6; } if ${ac_cv_lib_gslcblas_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gslcblas_main=yes else ac_cv_lib_gslcblas_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gslcblas_main" >&5 $as_echo "$ac_cv_lib_gslcblas_main" >&6; } if test "x$ac_cv_lib_gslcblas_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" else as_fn_error $? "Couldn't find libgsl. Please install the gsl package." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsl_sf_gamma in -lgsl" >&5 $as_echo_n "checking for gsl_sf_gamma in -lgsl... " >&6; } if ${ac_cv_lib_gsl_gsl_sf_gamma+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gsl_sf_gamma (); int main () { return gsl_sf_gamma (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gsl_gsl_sf_gamma=yes else ac_cv_lib_gsl_gsl_sf_gamma=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsl_gsl_sf_gamma" >&5 $as_echo "$ac_cv_lib_gsl_gsl_sf_gamma" >&6; } if test "x$ac_cv_lib_gsl_gsl_sf_gamma" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSL 1 _ACEOF LIBS="-lgsl $LIBS" fi #================================================================== # Check if we're a little-endian or a big-endian system, needed by # brg_endian.h in the build of rng_threefish. This is a very # certain test, and therefore is checked FIRST in this header file. #================================================================== ## AC_DEFUN([AC_C_ENDIAN], ## [AC_CACHE_CHECK(for endianness, ac_cv_c_endian, ## [ ## AC_RUN_IFELSE( ## [AC_LANG_PROGRAM([], [dnl ## long val = 1; ## char *c = (char *) &val; ## exit(*c == 1); ## ]) ## ],[ ## ac_cv_c_endian=big ## ],[ ## ac_cv_c_endian=little ## ]) ## ]) ## if test $ac_cv_c_endian = big; then ## AC_SUBST(LITTLE_ENDIAN,0) ## fi ## if test $ac_cv_c_endian = little; then ## AC_SUBST(LITTLE_ENDIAN,1) ## fi ## ]) ## ## AC_C_ENDIAN # # Per Debian bug report #946774 we can simply do this instead # { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) LITTLE_ENDIAN=0 ;; #( no) LITTLE_ENDIAN=1 ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac #================================================================== # Checks for typedefs, structures, and compiler characteristics. #================================================================== { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi #================================================================== # Files that configure needs to process with this so that they are # all happy and macro-replaced. #================================================================== ac_config_files="$ac_config_files dieharder_version.h dieharder.spec dieharder.html dieharder-config dieharder/Makefile include/Makefile libdieharder/Makefile manual/Makefile manual/macros.tex Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by dieharder $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ dieharder config.status 3.31.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "dieharder_version.h") CONFIG_FILES="$CONFIG_FILES dieharder_version.h" ;; "dieharder.spec") CONFIG_FILES="$CONFIG_FILES dieharder.spec" ;; "dieharder.html") CONFIG_FILES="$CONFIG_FILES dieharder.html" ;; "dieharder-config") CONFIG_FILES="$CONFIG_FILES dieharder-config" ;; "dieharder/Makefile") CONFIG_FILES="$CONFIG_FILES dieharder/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "libdieharder/Makefile") CONFIG_FILES="$CONFIG_FILES libdieharder/Makefile" ;; "manual/Makefile") CONFIG_FILES="$CONFIG_FILES manual/Makefile" ;; "manual/macros.tex") CONFIG_FILES="$CONFIG_FILES manual/macros.tex" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ./include/0000775000175000017500000000000014350422742010715 5ustar eddedd./include/Makefile.in0000664000175000017500000004433313707046265013000 0ustar eddedd# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(nobase_include_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(nobase_include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ACTAR = @ACTAR@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIEHARDER_CFLAGS = @DIEHARDER_CFLAGS@ DIEHARDER_LIBS = @DIEHARDER_LIBS@ DIEHARDER_LIB_VERSION = @DIEHARDER_LIB_VERSION@ DIEHARDER_LT_VERSION = @DIEHARDER_LT_VERSION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LITTLE_ENDIAN = @LITTLE_ENDIAN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ RELEASED = @RELEASED@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dieharder_CFLAGS = @dieharder_CFLAGS@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdieharder_lo_CFLAGS = @libdieharder_lo_CFLAGS@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ nobase_include_HEADERS = dieharder/copyright.h \ dieharder/dab_bytedistrib.h \ dieharder/dab_dct.h \ dieharder/dab_filltree2.h \ dieharder/dab_filltree.h \ dieharder/dab_monobit2.h \ dieharder/dieharder_rng_types.h \ dieharder/dieharder_test_types.h \ dieharder/diehard_2dsphere.h \ dieharder/diehard_3dsphere.h \ dieharder/diehard_birthdays.h \ dieharder/diehard_bitstream.h \ dieharder/diehard_count_1s_byte.h \ dieharder/diehard_count_1s_stream.h \ dieharder/diehard_craps.h \ dieharder/diehard_dna.h \ dieharder/diehard_operm5.h \ dieharder/diehard_opso.h \ dieharder/diehard_oqso.h \ dieharder/diehard_parking_lot.h \ dieharder/diehard_rank_32x32.h \ dieharder/diehard_rank_6x8.h \ dieharder/diehard_runs.h \ dieharder/diehard_squeeze.h \ dieharder/diehard_sums.h \ dieharder/Dtest.h \ dieharder/libdieharder.h \ dieharder/marsaglia_tsang_gcd.h \ dieharder/marsaglia_tsang_gorilla.h \ dieharder/parse.h \ dieharder/rgb_bitdist.h \ dieharder/rgb_kstest_test.h \ dieharder/rgb_lagged_sums.h \ dieharder/rgb_lmn.h \ dieharder/rgb_minimum_distance.h \ dieharder/rgb_operm.h \ dieharder/rgb_persist.h \ dieharder/rgb_permutations.h \ dieharder/rgb_timing.h \ dieharder/std_test.h \ dieharder/sts_monobit.h \ dieharder/sts_runs.h \ dieharder/sts_serial.h \ dieharder/tests.h \ dieharder/verbose.h \ dieharder/Vtest.h \ dieharder/Xtest.h \ dieharder/dab_bytedistrib.h \ dieharder/dab_dct.h \ dieharder/dab_filltree2.h \ dieharder/dab_filltree.h \ dieharder/dab_monobit2.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nobase_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nobase_includeHEADERS install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-nobase_includeHEADERS .PRECIOUS: Makefile # 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: ./include/Makefile.am0000664000175000017500000000276214350422742012760 0ustar eddeddnobase_include_HEADERS = dieharder/copyright.h \ dieharder/dab_bytedistrib.h \ dieharder/dab_dct.h \ dieharder/dab_filltree2.h \ dieharder/dab_filltree.h \ dieharder/dab_monobit2.h \ dieharder/dieharder_rng_types.h \ dieharder/dieharder_test_types.h \ dieharder/diehard_2dsphere.h \ dieharder/diehard_3dsphere.h \ dieharder/diehard_birthdays.h \ dieharder/diehard_bitstream.h \ dieharder/diehard_count_1s_byte.h \ dieharder/diehard_count_1s_stream.h \ dieharder/diehard_craps.h \ dieharder/diehard_dna.h \ dieharder/diehard_operm5.h \ dieharder/diehard_opso.h \ dieharder/diehard_oqso.h \ dieharder/diehard_parking_lot.h \ dieharder/diehard_rank_32x32.h \ dieharder/diehard_rank_6x8.h \ dieharder/diehard_runs.h \ dieharder/diehard_squeeze.h \ dieharder/diehard_sums.h \ dieharder/Dtest.h \ dieharder/libdieharder.h \ dieharder/marsaglia_tsang_gcd.h \ dieharder/marsaglia_tsang_gorilla.h \ dieharder/parse.h \ dieharder/rgb_bitdist.h \ dieharder/rgb_kstest_test.h \ dieharder/rgb_lagged_sums.h \ dieharder/rgb_lmn.h \ dieharder/rgb_minimum_distance.h \ #dieharder/rgb_operm.h \ dieharder/rgb_persist.h \ dieharder/rgb_permutations.h \ dieharder/rgb_timing.h \ dieharder/std_test.h \ dieharder/sts_monobit.h \ dieharder/sts_runs.h \ dieharder/sts_serial.h \ dieharder/tests.h \ dieharder/verbose.h \ dieharder/Vtest.h \ dieharder/Xtest.h \ dieharder/dab_bytedistrib.h \ dieharder/dab_dct.h \ dieharder/dab_filltree2.h \ dieharder/dab_filltree.h \ dieharder/dab_monobit2.h ./include/dieharder/0000775000175000017500000000000014350422742012644 5ustar eddedd./include/dieharder/dab_filltree.h0000664000175000017500000000232313707046103015427 0ustar eddedd/* * dab_filltree test header. */ /* * function prototype */ int dab_filltree(Test **test, int irun); static Dtest dab_filltree_dtest __attribute__((unused)) = { "DAB Fill Tree Test", "dab_filltree", "\ #==================================================================\n\ # DAB Fill Tree Test\n\ # This test fills small binary trees of fixed depth with\n\ # words from the the RNG. When a word cannot be inserted\n\ # into the tree, the current count of words in the tree is\n\ # recorded, along with the position at which the word\n\ # would have been inserted.\n\ #\n\ # The words from the RNG are rotated (in long cycles) to\n\ # better detect RNGs that may bias only the high, middle,\n\ # or low bytes.\n\ #\n\ # The test returns two p-values. The first is a Pearson\n\ # chi-sq test against the expected values (which were\n\ # estimated empirically). The second is a Pearson chi-sq\n\ # test for a uniform distribution of the positions at\n\ # which the insert failed.\n\ #\n\ # Because of the target data for the first p-value,\n\ # ntuple must be kept at the default (32).\n\ #==================================================================\n", 1, 15000000, 2, dab_filltree, 0 }; ./include/dieharder/brg_types.h0000664000175000017500000001361513707046103015017 0ustar eddedd/* --------------------------------------------------------------------------- Copyright (c) 2003, Dr Brian Gladman, Worcester, UK. All rights reserved. LICENSE TERMS The free distribution and use of this software in both source and binary form is allowed (with or without changes) provided that: 1. distributions of this source code include the above copyright notice, this list of conditions and the following disclaimer; 2. distributions in binary form include the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other associated materials; 3. the copyright holder's name is not used to endorse products built using this software without specific written permission. ALTERNATIVELY, provided that this notice is retained in full, this product may be distributed under the terms of the GNU General Public License (GPL), in which case the provisions of the GPL apply INSTEAD OF those given above. DISCLAIMER This software is provided 'as is' with no explicit or implied warranties in respect of its properties, including, but not limited to, correctness and/or fitness for purpose. --------------------------------------------------------------------------- Issue 09/09/2006 The unsigned integer types defined here are of the form uint_t where is the length of the type; for example, the unsigned 32-bit type is 'uint_32t'. These are NOT the same as the 'C99 integer types' that are defined in the inttypes.h and stdint.h headers since attempts to use these types have shown that support for them is still highly variable. However, since the latter are of the form uint_t, a regular expression search and replace (in VC++ search on 'uint_{:z}t' and replace with 'uint\1_t') can be used to convert the types used here to the C99 standard types. */ #if defined(__cplusplus) extern "C" { #endif #include #ifndef BRG_UI8 # define BRG_UI8 # if UCHAR_MAX == 255 typedef unsigned char uint_8t; # else # error Please define uint_8t as an 8-bit unsigned integer type in brg_types.h # endif #endif #ifndef BRG_UI16 # define BRG_UI16 # if USHRT_MAX == 65535 typedef unsigned short uint_16t; # else # error Please define uint_16t as a 16-bit unsigned short type in brg_types.h # endif #endif #ifndef BRG_UI32 # define BRG_UI32 # if UINT_MAX == 4294967295 typedef unsigned int uint_32t; # elif ULONG_MAX == 4294967295 typedef unsigned long uint_32t; # elif defined( _CRAY ) /* USE_AES is undefined on Crays, however we define a dummy data type to get the code to compile - pcg */ /*#error Crays don't support 32-bit data types, this code won't compile on a Cray*/ typedef unsigned int uint_32t; # else # error Please define uint_32t as a 32-bit unsigned integer type in brg_types.h # endif #endif #ifndef BRG_UI64 # if defined( _MSC_VER ) # define BRG_UI64 # if _MSC_VER >= 1310 typedef unsigned long long uint_64t; # define li_64(h) 0x##h##ull # else typedef unsigned __int64 uint_64t; # define li_64(h) 0x##h##ui64 # endif # elif defined( __BORLANDC__ ) && !defined( __MSDOS__ ) # define BRG_UI64 # define li_64(h) 0x##h##ull typedef __int64 uint_64t; # elif defined( __sun ) # if defined( ULONG_MAX ) && ULONG_MAX == 0xfffffffful # define BRG_UI64 # define li_64(h) 0x##h##ull typedef unsigned long long uint_64t; # elif defined( ULONG_LONG_MAX ) && ULONG_LONG_MAX == 0xfffffffffffffffful # define BRG_UI64 # define li_64(h) 0x##h##ul typedef unsigned long uint_64t; # endif # elif defined( __MVS__) # define li_64(h) 0x##h##ull typedef unsigned int long long uint_64t; # elif defined( ULLONG_MAX ) && ULLONG_MAX > 4294967295 # if ULLONG_MAX == 18446744073709551615ull # define BRG_UI64 # define li_64(h) 0x##h##ull typedef unsigned long long uint_64t; # endif # elif defined( ULONG_LONG_MAX ) && ULONG_LONG_MAX > 4294967295 # if ULONG_LONG_MAX == 18446744073709551615 # define BRG_UI64 # define li_64(h) 0x##h##ull typedef unsigned long long uint_64t; # endif # elif defined( ULONG_MAX ) && ULONG_MAX > 4294967295 # if ULONG_MAX == 18446744073709551615 # define BRG_UI64 # define li_64(h) 0x##h##ul typedef unsigned long uint_64t; # endif # elif defined( UINT_MAX ) && UINT_MAX > 4294967295 # if UINT_MAX == 18446744073709551615 # define BRG_UI64 # define li_64(h) 0x##h##u typedef unsigned int uint_64t; # endif # endif #endif #if !defined( BRG_UI64 ) # if defined( NEED_UINT_64T ) # error Please define uint_64t as an unsigned 64 bit type in brg_types.h # endif #endif #ifndef RETURN_VALUES # define RETURN_VALUES # if defined( DLL_EXPORT ) # if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) # define VOID_RETURN __declspec( dllexport ) void __stdcall # define INT_RETURN __declspec( dllexport ) int __stdcall # elif defined( __GNUC__ ) # define VOID_RETURN __declspec( __dllexport__ ) void # define INT_RETURN __declspec( __dllexport__ ) int # else # error Use of the DLL is only available on the Microsoft, Intel and GCC compilers # endif # elif defined( DLL_IMPORT ) # if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) # define VOID_RETURN __declspec( dllimport ) void __stdcall # define INT_RETURN __declspec( dllimport ) int __stdcall # elif defined( __GNUC__ ) # define VOID_RETURN __declspec( __dllimport__ ) void # define INT_RETURN __declspec( __dllimport__ ) int # else # error Use of the DLL is only available on the Microsoft, Intel and GCC compilers # endif # elif defined( __WATCOMC__ ) # define VOID_RETURN void __cdecl # define INT_RETURN int __cdecl # else # define VOID_RETURN void # define INT_RETURN int # endif #endif #if defined(__cplusplus) } #endif ./include/dieharder/diehard_squeeze.h0000664000175000017500000000165413707046103016162 0ustar eddedd/* * diehard_squeeze test header. */ /* * function prototype */ int diehard_squeeze(Test **test,int irun); static Dtest diehard_squeeze_dtest __attribute__((unused)) = { "Diehard Squeeze Test", "diehard_squeeze", "\ #==================================================================\n\ # Diehard Squeeze Test.\n\ # Random integers are floated to get uniforms on [0,1). Start- \n\ # ing with k=2^31=2147483647, the test finds j, the number of \n\ # iterations necessary to reduce k to 1, using the reduction \n\ # k=ceiling(k*U), with U provided by floating integers from \n\ # the file being tested. Such j's are found 100,000 times, \n\ # then counts for the number of times j was <=6,7,...,47,>=48 \n\ # are used to provide a chi-square test for cell frequencies. \n\ #==================================================================\n", 100, 100000, 1, diehard_squeeze, 0 }; ./include/dieharder/diehard_sums.h0000664000175000017500000000303013707046103015456 0ustar eddedd/* * diehard_sums test header. */ /* * function prototype */ int diehard_sums(Test **test,int irun); static Dtest diehard_sums_dtest __attribute__((unused)) = { "Diehard Sums Test", "diehard_sums", "\ #==================================================================\n\ # Diehard Sums Test\n\ # Integers are floated to get a sequence U(1),U(2),... of uni- \n\ # form [0,1) variables. Then overlapping sums, \n\ # S(1)=U(1)+...+U(100), S2=U(2)+...+U(101),... are formed. \n\ # The S's are virtually normal with a certain covariance mat- \n\ # rix. A linear transformation of the S's converts them to a \n\ # sequence of independent standard normals, which are converted \n\ # to uniform variables for a KSTEST. The p-values from ten \n\ # KSTESTs are given still another KSTEST. \n\ #\n\ # Comments\n\ #\n\ # At this point I think there is rock solid evidence that this test\n\ # is completely useless in every sense of the word. It is broken,\n\ # and it is so broken that there is no point in trying to fix it.\n\ # The problem is that the transformation above is not linear, and\n\ # doesn't work. Don't use it.\n\ #\n\ # For what it is worth, rgb_lagged_sums with ntuple 0 tests for\n\ # exactly the same thing, but scalably and reliably without the\n\ # complication of overlapping samples and covariance. Use it\n\ # instead.\n\ #==================================================================\n", 100, 100, 1, diehard_sums, 0 }; ./include/dieharder/diehard_count_1s_byte.h0000664000175000017500000000420013707046103017245 0ustar eddedd/* * diehard_count_1s_byte test header. */ /* * function prototype */ int diehard_count_1s_byte(Test **test,int irun); static Dtest diehard_count_1s_byte_dtest __attribute__((unused)) = { "Diehard Count the 1s Test (byte)", "diehard_count_1s_byte", "\ #==================================================================\n\ # Diehard Count the 1s Test (byte) (modified).\n\ # This is the COUNT-THE-1's TEST for specific bytes. \n\ # Consider the file under test as a stream of 32-bit integers. \n\ # From each integer, a specific byte is chosen , say the left- \n\ # most:: bits 1 to 8. Each byte can contain from 0 to 8 1's, \n\ # with probabilitie 1,8,28,56,70,56,28,8,1 over 256. Now let \n\ # the specified bytes from successive integers provide a string \n\ # of (overlapping) 5-letter words, each \"letter\" taking values \n\ # A,B,C,D,E. The letters are determined by the number of 1's, \n\ # in that byte:: 0,1,or 2 ---> A, 3 ---> B, 4 ---> C, 5 ---> D,\n\ # and 6,7 or 8 ---> E. Thus we have a monkey at a typewriter \n\ # hitting five keys with with various probabilities:: 37,56,70,\n\ # 56,37 over 256. There are 5^5 possible 5-letter words, and \n\ # from a string of 256,000 (overlapping) 5-letter words, counts \n\ # are made on the frequencies for each word. The quadratic form \n\ # in the weak inverse of the covariance matrix of the cell \n\ # counts provides a chisquare test:: Q5-Q4, the difference of \n\ # the naive Pearson sums of (OBS-EXP)^2/EXP on counts for 5- \n\ # and 4-letter cell counts. \n\ # \n\ # Note: We actually cycle samples over all 0-31 bit offsets, so \n\ # that if there is a problem with any particular offset it has \n\ # a chance of being observed. One can imagine problems with odd \n\ # offsets but not even, for example, or only with the offset 7.\n\ # tsamples and psamples can be freely varied, but you'll likely \n\ # need tsamples >> 100,000 to have enough to get a reliable kstest \n\ # result. \n\ #==================================================================\n", 100, 256000, 1, diehard_count_1s_byte, 0 }; ./include/dieharder/dab_filltree2.h0000664000175000017500000000252113707046103015511 0ustar eddedd/* * dab_filltree2 test header. */ /* * function prototype */ int dab_filltree2(Test **test, int irun); static Dtest dab_filltree2_dtest __attribute__((unused)) = { "DAB Fill Tree 2 Test", "dab_filltree2", "\ #==========================================================\n\ # DAB Fill Tree 2 Test\n\ # Bit version of Fill Tree test.\n\ # This test fills small binary trees of fixed depth with\n\ # \"visited\" markers. When a marker cannot be placed, the\n\ # current count of markers in the tree and the position\n\ # that the marker would have been inserted, if it hadn't\n\ # already been marked.\n\ #\n\ # For each bit in the RNG input, the test takes a step\n\ # right (for a zero) or left (for a one) in the tree.\n\ # If the node hasn't been marked, it is marked, and the\n\ # path restarts. Otherwise, the test continues with the\n\ # next bit.\n\ #\n\ # The test returns two p-values. The first is a Pearson\n\ # chi-sq test against the expected values (which were\n\ # estimated empirically. The second is a Pearson chi-sq\n\ # test for a uniform distribution of the positions at\n\ # which the insert failed.\n\ #\n\ # Because of the target data for the first p-value,\n\ # ntuple must be kept at the default (128).\n\ #==========================================================\n", 1, 5000000, 2, dab_filltree2, 0 }; ./include/dieharder/dab_bytedistrib.h0000664000175000017500000000236713707046103016155 0ustar eddedd/* * dab_bytedistrib test header. */ /* * function prototype */ int dab_bytedistrib(Test **test, int irun); static Dtest dab_bytedistrib_dtest __attribute__((unused)) = { "Byte Distribution", "dab_bytedistrib", "\ #==================================================================\n\ DAB Byte Distribution Test\n\ #\n\ # Extract n independent bytes from each of k consecutive words. Increment\n\ # indexed counters in each of n tables. (Total of 256 * n counters.)\n\ # Currently, n=3 and is fixed at compile time.\n\ # If n>=2, then the lowest and highest bytes will be used, along\n\ # with n-2 bytes from the middle.\n\ # If the generator's word size is too small, overlapped bytes will\n\ # be used.\n\ # Current, k=3 and is fixed at compile time.\n\ # Use a basic chisq fitting test (chisq_pearson) for the p-value.\n\ # Previous version also used a chisq independence test (chisq2d); it\n\ # was found to be slightly less sensitive.\n\ # I envisioned this test as using a small number of samples and large\n\ # number of separate tests. Experiments so far show that keeping -p 1\n\ # and increasing -t performs best.\n\ #==================================================================\n", 1, 51200000, 1, dab_bytedistrib, 0 }; ./include/dieharder/sts_serial.h0000664000175000017500000000576213707046103015175 0ustar eddedd/* * sts_serial test header. */ /* * function prototype */ int sts_serial(Test **test,int irun); static Dtest sts_serial_dtest __attribute__((unused)) = { "STS Serial Test (Generalized)", "sts_serial", "\ #========================================================================\n\ # STS Serial Test\n\ # Accumulates the frequencies of overlapping n-tuples of bits drawn\n\ # from a source of random integers. The expected distribution of n-bit\n\ # patterns is multinomial with p = 2^(-n) e.g. the four 2-bit patterns\n\ # 00 01 10 11\n\ # should occur with equal probability. The target distribution is thus\n\ # a simple chisq with 2^n - 1 degrees of freedom, one lost due to the\n\ # constraint that:\n\ #\n\ # p_00 + p_01 + p_01 + p_11 = 1\n\ #\n\ # With overlap, though the test statistic is more complex. For example,\n\ # given a bit string such as 0110100111000110 without overlap, it becomes\n\ # 01|10|10|01|11|00|01|10 and we count 1 00, 3 01s, 3 10s, and 1 11.\n\ # WITH overlap we get all of these patterns as well as (with cyclic wrap):\n\ # 0|11|01|00|11|10|00|11|0 and we count 4 00s, 4 01s, 4 10s, and 3 11s.\n\ # There is considerable covariance in the bit frequencies and a simple\n\ # chisq test no longer suffices. The STS test uses target statistics that\n\ # are valid for overlapping samples but which require multiple orders\n\ # to generate.\n\ #\n\ # It is much easier to write a test that doesn't use overlapping samples\n\ # and directly checks to ensure that the distribution of bit ntuples\n\ # is consistent with a multinomial distribution with uniform probability\n\ # p = 1/2^n, e.g. 1/8 for n = 3 bit, 1/16 for n = 4 bit NON-overlapping\n\ # samples, and the rgb_bitdist is just such a test. This test doesn't\n\ # require comparing different orders. An open research question is\n\ # whether or not test sensitivity significantly depends on managing\n\ # overlap testing software RNGs where it is presumed that generation\n\ # is cheap and unlimited. This question pertains to related tests, such\n\ # as overlapping permutations tests (where non-overlapping permutation\n\ # tests are isomorphic to non-overlapping frequency tests, fairly\n\ # obviously).\n\ #\n\ # This test does all the possible bitlevel tests from n=1 to n=24 bits\n\ # (where n=1 is basically sts_monobit, and n=2 IMO is redundant with\n\ # sts_runs). However, if I understand things correctly it is not\n\ # possible to fail a 2 bit test and pass a 24 bit test, as if 2 bits are\n\ # biased so that (say) 00 occurs a bit too often, then 24 bit strings\n\ # containing 00's MUST be imbalanced as well relative to ones that do\n\ # not, so we really only need to check n=24 bit results to get all\n\ # the rest for free, so to speak.\n\ #\n", 100, /* Default psamples */ 100000, /* Default tsamples */ /* 44, * We need to be ABLE to make 1 pvalue from m=1,2, 2 from m=[3,24] */ 30, /* We need to be ABLE to make 1 pvalue from m=1,2, 2 from m=[3,16] */ sts_serial, 0 }; ./include/dieharder/rgb_timing.h0000664000175000017500000000171513707046103015140 0ustar eddedd/* * diehard_rgb_timing test header. This is a nonstandard test and * returns no pvalues, and should probably be converted so that it * doesn't LOOK like a test. */ /* * function prototype */ typedef struct { double avg_time_nsec; double rands_per_sec; } Rgb_Timing; int rgb_timing(Test **test, Rgb_Timing *timing); static Dtest rgb_timing_dtest __attribute__((unused)) = { "RGB Timing Test", "rgb_timing", "\ #========================================================================\n\ # RGB Timing Test\n\ #\n\ # This test times the selected random number generator only. It is\n\ # generally run at the beginning of a run of -a(ll) the tests to provide\n\ # some measure of the relative time taken up generating random numbers\n\ # for the various generators and tests.\n\ ", 10, /* Number of psamples (passes) */ 1000000, /* Number of samples in inner loop */ 1, /* Number of tests */ rgb_timing, 0 }; ./include/dieharder/rgb_persist.h0000664000175000017500000000310413707056150015337 0ustar eddedd/* * diehard_rgb_persist test header. This test needs to just go * away... */ /* * function prototype */ typedef struct { unsigned int nbits; unsigned int and_mask; unsigned int cumulative_mask; } Rgb_Persist; int rgb_persist(Test **test, Rgb_Persist *persist); static Dtest rgb_persist_dtest __attribute__((unused)) = { "RGB Bit Persistence Test", "rgb_persist", "\n\ #========================================================================\n\ # RGB Bit Persistence Test\n\ # This test generates 256 sequential samples of an random unsigned\n\ # integer from the given rng. Successive integers are logically\n\ # processed to extract a mask with 1's whereever bits do not\n\ # change. Since bits will NOT change when filling e.g. unsigned\n\ # ints with 16 bit ints, this mask logically &'d with the maximum\n\ # random number returned by the rng. All the remaining 1's in the\n\ # resulting mask are therefore significant -- they represent bits\n\ # that never change over the length of the test. These bits are\n\ # very likely the reason that certain rng's fail the monobit\n\ # test -- extra persistent e.g. 1's or 0's inevitably bias the\n\ # total bitcount. In many cases the particular bits repeated\n\ # appear to depend on the seed. If the -i flag is given, the\n\ # entire test is repeated with the rng reseeded to generate a mask\n\ # and the extracted mask cumulated to show all the possible bit\n\ # positions that might be repeated for different seeds.\n\ ", 1, 256, 1, rgb_persist, 0 }; extern unsigned int *rgb_persist_rand_uint; ./include/dieharder/rgb_kstest_test.h0000664000175000017500000000273713707046103016232 0ustar eddedd/* * rgb_kstest_test test header */ /* * function prototype */ int rgb_kstest_test(Test **test,int irun); static Dtest rgb_kstest_test_dtest __attribute__((unused)) = { "RGB Kolmogorov-Smirnov Test Test", "rgb_kstest_test", "#\n\ # The Kolmogorov-Smirnov Test Test\n\ #\n\ #\n\ # This test generates a vector of tsamples uniform deviates from the\n\ # selected rng, then applies an Anderson-Darling or Kuiper KS test to\n\ # it to directly test for uniformity. The AD version has been symmetrized\n\ # to correct for weak left bias for small sample sets; Kuiper is already\n\ # ring-symmetric on the interval. The AD code corresponds roughly to\n\ # what is in R (thanks to a correction sent in by David Bauer).\n\ # As always, the test is run pvalues times and the (same) KS test is then\n\ # used to generate a final test pvalue, but the real purpose of this test\n\ # is to test ADKS and KKS, not to test rngs. This test clearly reveals\n\ # that kstests run on only 100 test values (tsamples, herein) are only\n\ # approximately accurate; their pvalues are distinctly high-biased (but\n\ # less so than Kuiper or KS before the fix). This bias is hardly visible\n\ # for less than 1000 trivals (psamples, herein) but will constently cause\n\ # failure for -t 100, -p 10000 or higher. For -t 1000, it is much more\n\ # difficult to detect, and the final kstest is approximately valid for the\n\ # test in question.\n\ #\n", 1000, 10000, 1, rgb_kstest_test, 0 }; ./include/dieharder/std_test.h0000664000175000017500000000317013707046103014645 0ustar eddedd/* * This is is the std_test struct. It is the sole output interface between * the user and the test program -- all standard test inputs and returns * are passed through this struct. A test can have additional user-settable * arguments, of course, but they must be passed in GLOBAL SHARED VARIABLES * defined just for the particular test in question. This is a bit ugly, * but so are void *args argument lists and va_start/va_end for multiple * layers of passing arguments. * * This is silly. We clearly need for each test to have access to all * variables set on the command line. That way the ONE Test object * can be passed to e.g report() or table() and they'll know exactly * what to do with it. */ typedef struct { unsigned int nkps; /* Number of test statistics created per run */ unsigned int tsamples; /* Number of samples per test (if applicable) */ unsigned int psamples; /* Number of test runs per final KS p-value */ unsigned int ntuple; /* Number of bits in ntuples being tested */ double *pvalues; /* Vector of length psamples to hold test p-values */ char *pvlabel; /* Vector of length LINE to hold labels per p-value */ double ks_pvalue; /* Final KS p-value from run of many tests */ double x; /* Extra variable passed on command line */ double y; /* Extra variable passed on command line */ double z; /* Extra variable passed on command line */ } Test; Test **create_test(Dtest *dtest, unsigned int tsamples, unsigned int psamples); void destroy_test(Dtest *dtest, Test **test); void std_test(Dtest *dtest, Test **test); ./include/dieharder/skein.h0000664000175000017500000003053713707046103014134 0ustar eddedd#ifndef _SKEIN_H_ #define _SKEIN_H_ 1 /************************************************************************** ** ** Interface declarations and internal definitions for Skein hashing. ** ** Source code author: Doug Whiting, 2008. ** ** This algorithm and source code is released to the public domain. ** *************************************************************************** ** ** The following compile-time switches may be defined to control some ** tradeoffs between speed, code size, error checking, and security. ** ** The "default" note explains what happens when the switch is not defined. ** ** SKEIN_DEBUG -- make callouts from inside Skein code ** to examine/display intermediate values. ** [default: no callouts (no overhead)] ** ** SKEIN_ERR_CHECK -- how error checking is handled inside Skein ** code. If not defined, most error checking ** is disabled (for performance). Otherwise, ** the switch value is interpreted as: ** 0: use assert() to flag errors ** 1: return SKEIN_FAIL to flag errors ** ***************************************************************************/ #include /* get size_t definition */ #include /* get platform-specific definitions */ enum { SKEIN_SUCCESS = 0, /* return codes from Skein calls */ SKEIN_FAIL = 1, SKEIN_BAD_HASHLEN = 2 }; #define SKEIN_MODIFIER_WORDS ( 2) /* number of modifier (tweak) words */ #define SKEIN_512_STATE_WORDS ( 8) #define SKEIN_MAX_STATE_WORDS (16) #define SKEIN_512_STATE_BYTES ( 8*SKEIN_512_STATE_WORDS) #define SKEIN_512_STATE_BITS (64*SKEIN_512_STATE_WORDS) #define SKEIN_512_BLOCK_BYTES ( 8*SKEIN_512_STATE_WORDS) typedef struct { size_t hashBitLen; /* size of hash result, in bits */ size_t bCnt; /* current byte count in buffer b[] */ u64b_t T[SKEIN_MODIFIER_WORDS]; /* tweak words: T[0]=byte cnt, T[1]=flags */ } Skein_Ctxt_Hdr_t; typedef struct /* 512-bit Skein hash context structure */ { Skein_Ctxt_Hdr_t h; /* common header context variables */ u64b_t X[SKEIN_512_STATE_WORDS]; /* chaining variables */ u08b_t b[SKEIN_512_BLOCK_BYTES]; /* partial block buffer (8-byte aligned) */ } Skein_512_Ctxt_t; typedef struct { u64b_t T[SKEIN_MODIFIER_WORDS]; // Tweak u64b_t Key[SKEIN_512_STATE_WORDS]; // Key } Threefish_512_Ctxt_t; void Threefish_512_Process_Blocks(Threefish_512_Ctxt_t *ctx, const u08b_t *input, void *output, size_t blkCnt); void Threefish_512_Process_Blocks64(Threefish_512_Ctxt_t *ctx, const u08b_t *input, void *output, size_t blkCnt); /* Skein APIs for (incremental) "straight hashing" */ int Skein_512_Init (Skein_512_Ctxt_t *ctx, size_t hashBitLen); int Skein_512_Update(Skein_512_Ctxt_t *ctx, const u08b_t *msg, size_t msgByteCnt); int Skein_512_Final (Skein_512_Ctxt_t *ctx, u08b_t * hashVal); /* ** Skein APIs for "extended" initialization: MAC keys, tree hashing. ** After an InitExt() call, just use Update/Final calls as with Init(). ** ** Notes: Same parameters as _Init() calls, plus treeInfo/key/keyBytes. ** When keyBytes == 0 and treeInfo == SKEIN_SEQUENTIAL, ** the results of InitExt() are identical to calling Init(). ** The function Init() may be called once to "precompute" the IV for ** a given hashBitLen value, then by saving a copy of the context ** the IV computation may be avoided in later calls. ** Similarly, the function InitExt() may be called once per MAC key ** to precompute the MAC IV, then a copy of the context saved and ** reused for each new MAC computation. **/ int Skein_512_InitExt(Skein_512_Ctxt_t *ctx, size_t hashBitLen, u64b_t treeInfo, const u08b_t *key, size_t keyBytes); /* ** Skein APIs for tree hash: ** Final_Pad: pad, do final block, but no OUTPUT type ** Output: do just the output stage */ #ifndef SKEIN_TREE_HASH #define SKEIN_TREE_HASH (1) #endif #if SKEIN_TREE_HASH int Skein_512_Final_Pad(Skein_512_Ctxt_t *ctx, u08b_t * hashVal); int Skein_512_Output (Skein_512_Ctxt_t *ctx, u08b_t * hashVal); #endif /***************************************************************** ** "Internal" Skein definitions ** -- not needed for sequential hashing API, but will be ** helpful for other uses of Skein (e.g., tree hash mode). ** -- included here so that they can be shared between ** reference and optimized code. ******************************************************************/ /* tweak word T[1]: bit field starting positions */ #define SKEIN_T1_BIT(BIT) ((BIT) - 64) /* offset 64 because it's the second word */ #define SKEIN_T1_POS_TREE_LVL SKEIN_T1_BIT(112) /* bits 112..118: level in hash tree */ #define SKEIN_T1_POS_BIT_PAD SKEIN_T1_BIT(119) /* bit 119 : partial final input byte */ #define SKEIN_T1_POS_BLK_TYPE SKEIN_T1_BIT(120) /* bits 120..125: type field */ #define SKEIN_T1_POS_FIRST SKEIN_T1_BIT(126) /* bits 126 : first block flag */ #define SKEIN_T1_POS_FINAL SKEIN_T1_BIT(127) /* bit 127 : final block flag */ /* tweak word T[1]: flag bit definition(s) */ #define SKEIN_T1_FLAG_FIRST (((u64b_t) 1 ) << SKEIN_T1_POS_FIRST) #define SKEIN_T1_FLAG_FINAL (((u64b_t) 1 ) << SKEIN_T1_POS_FINAL) #define SKEIN_T1_FLAG_BIT_PAD (((u64b_t) 1 ) << SKEIN_T1_POS_BIT_PAD) /* tweak word T[1]: tree level bit field mask */ #define SKEIN_T1_TREE_LVL_MASK (((u64b_t)0x7F) << SKEIN_T1_POS_TREE_LVL) #define SKEIN_T1_TREE_LEVEL(n) (((u64b_t) (n)) << SKEIN_T1_POS_TREE_LVL) /* tweak word T[1]: block type field */ #define SKEIN_BLK_TYPE_KEY ( 0) /* key, for MAC and KDF */ #define SKEIN_BLK_TYPE_CFG ( 4) /* configuration block */ #define SKEIN_BLK_TYPE_PERS ( 8) /* personalization string */ #define SKEIN_BLK_TYPE_PK (12) /* public key (for digital signature hashing) */ #define SKEIN_BLK_TYPE_KDF (16) /* key identifier for KDF */ #define SKEIN_BLK_TYPE_NONCE (20) /* nonce for PRNG */ #define SKEIN_BLK_TYPE_MSG (48) /* message processing */ #define SKEIN_BLK_TYPE_OUT (63) /* output stage */ #define SKEIN_BLK_TYPE_MASK (63) /* bit field mask */ #define SKEIN_T1_BLK_TYPE(T) (((u64b_t) (SKEIN_BLK_TYPE_##T)) << SKEIN_T1_POS_BLK_TYPE) #define SKEIN_T1_BLK_TYPE_KEY SKEIN_T1_BLK_TYPE(KEY) /* key, for MAC and KDF */ #define SKEIN_T1_BLK_TYPE_CFG SKEIN_T1_BLK_TYPE(CFG) /* configuration block */ #define SKEIN_T1_BLK_TYPE_PERS SKEIN_T1_BLK_TYPE(PERS) /* personalization string */ #define SKEIN_T1_BLK_TYPE_PK SKEIN_T1_BLK_TYPE(PK) /* public key (for digital signature hashing) */ #define SKEIN_T1_BLK_TYPE_KDF SKEIN_T1_BLK_TYPE(KDF) /* key identifier for KDF */ #define SKEIN_T1_BLK_TYPE_NONCE SKEIN_T1_BLK_TYPE(NONCE)/* nonce for PRNG */ #define SKEIN_T1_BLK_TYPE_MSG SKEIN_T1_BLK_TYPE(MSG) /* message processing */ #define SKEIN_T1_BLK_TYPE_OUT SKEIN_T1_BLK_TYPE(OUT) /* output stage */ #define SKEIN_T1_BLK_TYPE_MASK SKEIN_T1_BLK_TYPE(MASK) /* field bit mask */ #define SKEIN_T1_BLK_TYPE_CFG_FINAL (SKEIN_T1_BLK_TYPE_CFG | SKEIN_T1_FLAG_FINAL) #define SKEIN_T1_BLK_TYPE_OUT_FINAL (SKEIN_T1_BLK_TYPE_OUT | SKEIN_T1_FLAG_FINAL) #define SKEIN_VERSION (1) #ifndef SKEIN_ID_STRING_LE /* allow compile-time personalization */ #define SKEIN_ID_STRING_LE (0x33414853) /* "SHA3" (little-endian)*/ #endif #define SKEIN_MK_64(hi32,lo32) ((lo32) + (((u64b_t) (hi32)) << 32)) #define SKEIN_SCHEMA_VER SKEIN_MK_64(SKEIN_VERSION,SKEIN_ID_STRING_LE) #define SKEIN_KS_PARITY SKEIN_MK_64(0x55555555,0x55555555) /* bit field definitions in config block treeInfo word */ #define SKEIN_CFG_TREE_LEAF_SIZE_POS ( 0) #define SKEIN_CFG_TREE_NODE_SIZE_POS ( 8) #define SKEIN_CFG_TREE_MAX_LEVEL_POS (16) #define SKEIN_CFG_TREE_LEAF_SIZE_MSK ((u64b_t) 0xFF) << SKEIN_CFG_TREE_LEAF_SIZE_POS) #define SKEIN_CFG_TREE_NODE_SIZE_MSK ((u64b_t) 0xFF) << SKEIN_CFG_TREE_NODE_SIZE_POS) #define SKEIN_CFG_TREE_MAX_LEVEL_MSK ((u64b_t) 0xFF) << SKEIN_CFG_TREE_MAX_LEVEL_POS) #define SKEIN_CFG_TREE_INFO_SEQUENTIAL (0) /* use as treeInfo in InitExt() call for sequential processing */ #define SKEIN_CFG_TREE_INFO(leaf,node,maxLevel) ((u64b_t) ((leaf) | ((node) << 8) | ((maxLevel) << 16))) /* ** Skein macros for getting/setting tweak words, etc. ** These are useful for partial input bytes, hash tree init/update, etc. **/ #define Skein_Get_Tweak(ctxPtr,TWK_NUM) ((ctxPtr)->h.T[TWK_NUM]) #define Skein_Set_Tweak(ctxPtr,TWK_NUM,tVal) {(ctxPtr)->h.T[TWK_NUM] = (tVal);} #define Skein_Get_T0(ctxPtr) Skein_Get_Tweak(ctxPtr,0) #define Skein_Get_T1(ctxPtr) Skein_Get_Tweak(ctxPtr,1) #define Skein_Set_T0(ctxPtr,T0) Skein_Set_Tweak(ctxPtr,0,T0) #define Skein_Set_T1(ctxPtr,T1) Skein_Set_Tweak(ctxPtr,1,T1) /* set both tweak words at once */ #define Skein_Set_T0_T1(ctxPtr,T0,T1) \ { \ Skein_Set_T0(ctxPtr,(T0)); \ Skein_Set_T1(ctxPtr,(T1)); \ } #define Skein_Set_Type(ctxPtr,BLK_TYPE) \ Skein_Set_T1(ctxPtr,SKEIN_T1_BLK_TYPE_##BLK_TYPE) /* set up for starting with a new type: h.T[0]=0; h.T[1] = NEW_TYPE; h.bCnt=0; */ #define Skein_Start_New_Type(ctxPtr,BLK_TYPE) \ { Skein_Set_T0_T1(ctxPtr,0,SKEIN_T1_FLAG_FIRST | SKEIN_T1_BLK_TYPE_##BLK_TYPE); (ctxPtr)->h.bCnt=0; } #define Skein_Clear_First_Flag(hdr) { (hdr).T[1] &= ~SKEIN_T1_FLAG_FIRST; } #define Skein_Set_Bit_Pad_Flag(hdr) { (hdr).T[1] |= SKEIN_T1_FLAG_BIT_PAD; } #define Skein_Set_Tree_Level(hdr,height) { (hdr).T[1] |= SKEIN_T1_TREE_LEVEL(height);} /***************************************************************** ** "Internal" Skein definitions for debugging and error checking ******************************************************************/ #ifdef SKEIN_DEBUG /* examine/display intermediate values? */ #include "skein_debug.h" #else /* default is no callouts */ #define Skein_Show_Block(bits,ctx,X,blkPtr,wPtr,ksEvenPtr,ksOddPtr) #define Skein_Show_Round(bits,ctx,r,X) #define Skein_Show_R_Ptr(bits,ctx,r,X_ptr) #define Skein_Show_Final(bits,ctx,cnt,outPtr) #define Skein_Show_Key(bits,ctx,key,keyBytes) #endif #ifndef SKEIN_ERR_CHECK /* run-time checks (e.g., bad params, uninitialized context)? */ #define Skein_Assert(x,retCode)/* default: ignore all Asserts, for performance */ #define Skein_assert(x) #elif defined(SKEIN_ASSERT) #include #define Skein_Assert(x,retCode) assert(x) #define Skein_assert(x) assert(x) #else #include #define Skein_Assert(x,retCode) { if (!(x)) return retCode; } /* caller error */ #define Skein_assert(x) assert(x) /* internal error */ #endif /***************************************************************** ** Skein block function constants (shared across Ref and Opt code) ******************************************************************/ enum { /* Skein_512 round rotation constants */ R_512_0_0=38, R_512_0_1=30, R_512_0_2=50, R_512_0_3=53, R_512_1_0=48, R_512_1_1=20, R_512_1_2=43, R_512_1_3=31, R_512_2_0=34, R_512_2_1=14, R_512_2_2=15, R_512_2_3=27, R_512_3_0=26, R_512_3_1=12, R_512_3_2=58, R_512_3_3= 7, R_512_4_0=33, R_512_4_1=49, R_512_4_2= 8, R_512_4_3=42, R_512_5_0=39, R_512_5_1=27, R_512_5_2=41, R_512_5_3=14, R_512_6_0=29, R_512_6_1=26, R_512_6_2=11, R_512_6_3= 9, R_512_7_0=33, R_512_7_1=51, R_512_7_2=39, R_512_7_3=35 }; #ifndef SKEIN_ROUNDS #define SKEIN_512_ROUNDS_TOTAL (72) #else /* allow command-line define in range 8*(5..14) */ #define SKEIN_512_ROUNDS_TOTAL (8*((((SKEIN_ROUNDS/ 10) + 5) % 10) + 5)) #endif #endif /* ifndef _SKEIN_H_ */ ./include/dieharder/Xtest.h0000664000175000017500000000107413707046103014124 0ustar eddedd/* *======================================================================== * $Id: Btest.c 212 2006-07-21 18:07:33Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* * This is the struct used in Xtest.c, a erfc based test that generates * a p-value for a single normally distributed statistic. */ typedef struct { unsigned int npts; double p; double x; double y; double sigma; double pvalue; } Xtest; void Xtest_eval(Xtest *xtest); ./include/dieharder/diehard_operm5.h0000664000175000017500000100275113707046103015710 0ustar eddedd/* * diehard_operm5 test header. */ /* * function prototype */ int diehard_operm5(Test **test, int irun); static Dtest diehard_operm5_dtest __attribute__((unused)) = { "Diehard OPERM5 Test", "diehard_operm5", "\n\ #==================================================================\n\ # Diehard Overlapping 5-Permutations Test.\n\ # This is the OPERM5 test. It looks at a sequence of one mill- \n\ # ion 32-bit random integers. Each set of five consecutive \n\ # integers can be in one of 120 states, for the 5! possible or- \n\ # derings of five numbers. Thus the 5th, 6th, 7th,...numbers \n\ # each provide a state. As many thousands of state transitions \n\ # are observed, cumulative counts are made of the number of \n\ # occurences of each state. Then the quadratic form in the \n\ # weak inverse of the 120x120 covariance matrix yields a test \n\ # equivalent to the likelihood ratio test that the 120 cell \n\ # counts came from the specified (asymptotically) normal dis- \n\ # tribution with the specified 120x120 covariance matrix (with \n\ # rank 99). This version uses 1,000,000 integers, twice. \n\ #\n\ # Note that Dieharder runs the test 100 times, not twice, by\n\ # default.\n\ #==================================================================\n", 100, 1000000, 1, diehard_operm5, 0 }; static long double pseudoInv[120][120] __attribute__((unused)) = { { 101.702796460, 3.47959864133, 2.04238410188, 1.74181938409, 3.01521299803, 2.28539648409, 2.27752614391, 12.5879849047, 1.39654183047, 1.61928012390, 4.24056105166, 1.90846053913, 3.58974770676, 2.43658406577, 2.17703943527, 0.788072126217, 1.44529123062, 1.01893534483, -11.7602653513, 2.16993674850, 2.01281383095, 1.70972351290, -12.5737071842, -13.8647322686, 2.22704751677, 1.93731693654, -8.41395982155, 1.78089271632, 1.72684525309, 3.81509686603, -0.610894684855, 7.79473120283, 8.12910672884, 7.96997978451, -0.195801329414, 0.752358397718, 0.859606531259, -2.08846228834, 2.15730956894, 2.86356084676, -0.548063667065, 1.95882504879, -1.16278277850, -0.208344798672, 1.08285467559, 0.663691969363, -1.07761585802, 1.30130103982, 1.63743331504, 0.835336974273, 1.26843494328, -5.44848887444, -1.21391220419, -1.55906670230, -2.88743618262, 0.590633792225, -2.05424388182, 1.68554765668, 2.02872233283, 1.62075751509, 0.317009408644, 0.0967280348665, 1.32144544549, 1.39656074305, 1.02605720546, 1.88772939286, -0.324682637397, -2.13068687021, -2.90550450174, 1.25294322978, 0.100981600673, 1.16047660536, 2.44549621665, -0.0846387143669, -1.39501835562, -3.34650475961, 0.283448392274, -3.02612919136, -3.80493410954, -1.38665779695, 0.121673303444, 0.171732966065, -2.34887107486, 0.247177449112, 1.56010340800, -1.48444614454, 5.44933609520, 8.87802925086, 1.81852923469, 10.1470993263, -0.358971552026, -1.83014139735, -1.74931105086, -0.817545630271, 1.02558937862, 8.60717933673, -35.4362488569, -5.36799149000, -6.65812491595, -4.26269341359, -4.19712666694, -4.77986206737, -4.43349551400, -6.05454160848, -4.14858224039, -3.25072542614, -2.66162830552, -1.00718051189, -2.05132354587, -1.90101638341, -5.10130764631, -1.41314885590, -0.983369342872, -1.43661669760, -17.4134339546, -3.96687513396, -4.09070881500, -2.90571696531, -15.7714696397, -29.6934146419, }, { 3.47959864133, 98.3558345997, 1.91572793238, 2.03244291996, 3.27367538387, 3.51750054562, 10.8670443194, 1.63728269312, 2.46532995184, 2.18522773610, 0.283315126158, 3.32191661492, 2.11540301866, 1.71359022390, 1.76170682652, 3.87026004778, 4.81301106985, 3.99144669601, 2.38263262964, -10.8343835093, -12.3582958452, -12.7603680586, 0.908235754809, 1.40680050611, 3.51283765151, 3.72182254444, 2.82412258514, -8.39291090002, 5.51065378265, 2.43697755210, 8.66481634482, 0.0698359663295, 0.840501237418, -0.0789435747566, 7.73624059467, 7.33279444374, -1.39535571638, 0.573983294049, 0.110396462681, -0.491483243017, 0.723831726613, 1.68554765668, 0.405950073013, 0.827827410776, 1.55270079570, 1.06176307263, -0.0823657666345, 0.613440673968, -1.48564295720, -2.35072651678, -5.88796619628, 0.116066517666, 0.909198892731, 0.301302209952, 2.59871803433, 0.112462804622, 2.91664946903, 2.18345616634, 0.243514488529, 0.918782591640, -1.79665727600, -2.29004601420, -0.0762330275188, 1.81968452702, -2.37331479701, 0.545331558958, -0.377040242349, -1.28003934163, 1.38687323822, 1.40809620370, 0.110396186431, 2.91434752106, -1.34997010910, 1.94203511105, -0.0334858524931, -0.244222984889, -4.05226447797, -2.57697065912, 0.842927830720, 0.448765444898, 2.74121610464, 2.55767805912, 0.516993015810, 2.16874029149, 4.38149458079, 5.17250072782, -2.90550450174, -2.54840826787, 4.44558063180, -3.45130216438, -2.40015513230, -0.0622295296345, 0.926481665246, 1.88241502240, 8.38996332437, -4.99338303655, -2.88446862464, -36.1948023840, -5.29037912148, -6.65812491595, -4.56409239301, -4.22796727586, -5.02467448805, -4.48983028873, -2.15868159775, -2.11393300786, -3.86961435551, -3.27561900621, -1.92029423174, -1.71528642262, -4.33004449477, -5.60682842900, -2.22568304570, -4.22556084587, -1.75773570496, -18.3976865898, -17.3220171221, -16.7877815213, -12.7359922823, -4.69893147886, }, { 2.04238410188, 1.91572793238, 98.0501238084, 1.54283271895, 1.32988350128, 1.89214896281, 1.83617274451, -11.3771881230, -10.4179101369, -11.1977046007, 12.0368225525, 3.95863320677, 2.00594589649, 2.85356476469, 2.75496955568, 2.44544825138, 3.51366877414, 4.39505757541, 0.592951516896, 3.22581106136, 2.93931202527, 2.37667671700, 0.854745298683, 0.866154454190, 7.42132958226, 7.85572434880, 6.91329582535, 5.24659988964, 7.68438220043, -5.55402788282, 0.839919235494, 2.38836929911, 2.05840148048, 2.13971609673, -1.32849163946, -1.13547734156, 0.314755923607, 8.91907078347, 6.32770429109, 7.13294881956, 0.795755172129, 1.25294322978, 4.75341046185, 4.62640633331, 3.11848761998, 3.20833846878, 3.72152299620, 2.87816600487, 1.41674265601, -0.940801877032, 0.0209809415685, 1.34264207773, 0.831206512909, 1.23620042522, 2.90077588087, 1.57307864629, 1.51640273628, 1.40809620370, 0.503138444413, 0.0555678467829, -2.98199746189, -2.67167545957, -2.19163227797, -2.75719522516, -3.77733627693, -2.09613711355, -0.877376856169, 0.401277785420, 2.91664946903, 2.66041333492, -0.644118167803, 0.722311796191, 4.42099749479, -1.83309503743, -1.16880599602, -1.19922432959, 6.33445073191, 6.73360604526, 0.248275334921, -0.0946103506733, -3.11650166621, -2.30497741046, -0.818593816318, -2.56428697012, -2.70812576928, -2.15700853736, -2.05424388182, -3.64547457306, -3.61315415637, -4.26389011473, 5.38238026713, -4.06087251037, -2.42109281648, -2.87516480264, -4.86937681595, -7.36658175599, -2.23364079297, -4.99880484738, -36.1948023840, -5.36799149000, -2.85350911338, -2.36940709009, -1.25286666352, -17.0216252500, -18.0874436684, -17.9660620096, -4.80044307096, -3.91494167754, -2.07073322809, -1.88530104907, -3.04232718639, -3.61884557138, -3.06686059009, -6.04286677972, -14.0912440427, -5.53141230965, -3.63980243567, -4.14106321047, -3.04768959184, -5.32764231058, }, { 1.74181938409, 2.03244291996, 1.54283271895, 96.4300399384, 1.53038477142, 2.61336859710, -12.9037604338, 1.88099997551, 3.11372650764, 2.55730386708, -12.4658563158, 0.514937591235, 1.54681324423, 2.94636891811, 3.66237190690, 5.44273872863, 6.16196222431, 5.34531479332, 2.87699128121, 0.466615290388, 1.02899668126, 1.03203693157, 2.30547304932, 2.52173697735, 4.32886732400, 5.39916098902, 4.26729074902, 8.42273496448, -0.0679883047309, 8.35094501318, 3.60249764016, -0.329815234990, -0.374619659663, 0.0509280864459, 2.51277142788, 0.692207431452, 13.6325647973, 6.44221687032, 2.94831173152, 0.934777145256, 13.1815685886, 8.87802925086, 2.38840824158, 1.99892364104, -0.288593708110,-0.00969180416599, 2.24103669192, -0.299951186682, -0.794133342961, 2.06849456445, 1.39551041680, 4.83644746149, 2.92211067478, 3.69530622097, 3.17949645052, -0.338532291702, 0.795755172129, -2.54840826787, 0.0824510449375, -0.222808488642, -1.99850697532, -1.37002058804, -1.67990502431, -2.90899564007, -1.43305365901, -3.16798642674, 2.26535029574, 3.19550859524, 0.723831726613, -3.64547457306, -1.82528689767, -3.52437410739, -2.52050917818, 3.05921950333, 5.80288007867, 7.29488051492, -1.30327712967, 0.228970207248, 0.111484934528, -0.838740155361, -3.39699380325, -4.48756391546, -0.503684885921, -3.31540906326, -2.36678986350, -0.546162441077, -0.548063667065, -3.12036899949, -4.09790992519, -3.76674627657, -3.60435018208, 3.95300330661, -5.59032944961, -6.87236432478, -6.40393467745, -4.23299685560, -3.95123677566, -2.23364079297, -2.88446862464, -35.4362488569, -4.37094940786, -3.44918321285, -15.5611255551, -2.12754545184, -3.04136462819, -4.11294492957, -17.8481897204, -21.4030642441, -4.08938603508, -3.93793507938, -2.70739810248, -4.34479292116, -7.18637400837, -4.27079623153, -3.42432463260, -13.9285718417, -2.11136224508, -3.20809872200, -6.03443377457, -3.80182453265, }, { 3.01521299803, 3.27367538387, 1.32988350128, 1.53038477142, 98.2195915061, 1.77456287105, 3.06745698764, 2.06125308493, 11.9416522898, 1.77152941632, 4.63861937546, 2.64266037378, -10.8751916175, 3.90350490143, 1.39081975589, 1.17416486145, -12.6814395874, -12.6457044171, 3.47037493945, 1.65442854956, 1.96270324942, 0.124039501753, 2.10113876234, 1.70988267819, 3.95791893946, -7.23976744124, 4.27652301649, 3.23350409469, 2.76659868630, 4.82579845901, -0.831516026082, 1.05528116547, -0.288433360886, -0.257197740859, -1.01550367500, 0.191498213269, 0.892384226942, -0.0206401687921, 0.559476174582, 2.87309717622, -0.503684885921, 1.30130103982, -1.87300467473, 6.70357901341, 6.85809515971, 7.51502639263, -1.29869010121, 0.339061376455, 5.82889224441, 4.48072367247, 2.93182498382, 0.266964585737, 4.66367182442, 0.719583277667, -1.77820375188, 0.934294689249, -0.818593816318, 0.613440673968, -0.811815197803, 0.429846443576, 3.18700577505, 2.62950027646, -1.20360863110, 0.618454666887, 5.30877759488, 2.52869602862, 3.75027773845, 1.63938994047, 0.516993015810, 2.87816600487, 3.91173751298, 1.30519160208, -1.19832194615, -2.27239000576, -2.65884432854, -4.45236155393, -1.40296912034, -3.05199614679, -4.42205372104, -3.29214336856, -2.20848872348, 5.99953633686, 2.94669958734, 6.12522600352, -0.607028592293, -2.53679733505, -2.34887107486, -0.299951186682, -0.561114436965, -1.46189605730, -3.58084102688, -3.78092960240, -4.70370169779, 6.35850336621, -5.29277408478, -2.93284896764, -3.44918321285, -2.36940709009, -4.22796727586, -4.77986206737, -36.2386704698, -5.34623743353, -5.15925382175, -2.55234384466, -4.73280164616, -1.48524032158, -3.54614834121, -1.74755203283, -18.3575303507, -6.22632330604, -3.66840017366, -2.77501741267, -17.3542721770, -16.7634577374, -2.43434134683, -0.537906001096, -1.61502794398, -11.9243045226, -4.17525572483, -2.00425841399, }, { 2.28539648409, 3.51750054562, 1.89214896281, 2.61336859710, 1.77456287105, 98.0986307305, 4.13254115806, 3.36886108025, 2.96750226889, 13.3534507787, 6.04967090955, 3.97585019365, 3.81386715783, -10.6187303080, -11.2385279478, -11.6729786631, 0.827377726153, 1.73634316499, 1.93512326132, 1.12297208977, 1.10735995817, 3.03302590491, 2.32430877087, 3.04187382428, -7.09732086170, 3.85417816513, 4.35351409207, 3.04775298559, 2.76355973272, 4.96993552301, -1.72833866992, -0.159705863318, -1.49399239261, -0.852923983700, 0.359573676015, 0.115820235337, 3.34668012401, 2.28514157604, 2.52120643985, 1.19191624916, 2.24103669192, 0.247177449112, 7.92839152050, -0.330263365747, -1.77477694233, -1.78976586390, 8.01997590090, 6.12522600352, 2.35700464670, 4.62879146440, 7.19934538749, 4.27517288855, -1.03526516990, 3.72198225871, 2.28500868480, 4.96574729528, 3.72152299620, 2.16874029149, 2.76544260503, 1.88972013476, 3.33342800563, 4.70409238607, 2.82072520664, 0.702694944772, 0.888583249480, -1.63606896922, -0.822099283250, 1.55050062551, -0.0823657666344, -2.56428697012, -0.402406864486, -2.90479889313, -1.32677197557, -2.03263840131, -2.88072342083, -1.56432015213, -2.96608171915, -1.65265185841, 6.43466143584, 5.75150332245, 3.37785124710, -4.31705493911, -1.29869010121, -4.73421493710, -2.68666481829, -1.11357560461, -1.07761585802, -3.31540906326, -2.78206804744, -3.57155025876, -3.30981984540, -3.78301578534, 6.34108150200, -4.77212084362, -5.33485524048, -3.14490568256, -4.37094940786, -2.85350911338, -4.56409239301, -4.19712666694, -5.22527665799, -36.2386704698, -2.67053226402, -0.973849166874, -2.99859433160, -6.13796778300, -3.24361929777, -4.74087329353, -6.24502277907, -18.0301307705, -16.9543023518, -18.1647344400, -4.33829916575, -3.99370888359, -3.52702931314, -1.97808516555, -13.1943048089, -2.90566379430, -5.49689862569, -3.31381710689, }, { 2.27752614391, 10.8670443194, 1.83617274451, -12.9037604338, 3.06745698764, 4.13254115806, 94.1372306530, 3.82132646761, 4.40043954301, 4.11196661189, -13.6004620130, -1.09564831427, 2.12704020822, 3.61354047806, 5.27981451917, 5.43369561992, 5.10925342427, 3.78761175390, 2.40375639965, 11.0796491579, 13.2137268024, 12.8234289622, 1.64544241710, 3.60711007986, 5.93887287961, 6.13080095654, 5.64432273403, -8.33851406616, 23.4873253383, 11.0883737153, -14.7625052036, 0.119462679144, -1.32629124690, -1.74931022596, -16.3606587886, -20.7829473955, 2.95258478977, 9.54021935880, 4.72477703040, 0.659261570580, 13.6325647973, 10.1470993263, 4.08962687016, 4.57598222658, -2.50206994411, -2.04081972113, 3.34668012401, -1.46189605730, 7.30349562037, 6.04429774214, 7.27804666997, 5.84810605862, 2.54581189924, 4.18885217231, 4.93464750296, 6.24180265424, 0.314755923607, -3.45130216438, -0.217621232298, -0.607862524868, -2.66294670741, -0.986603121024, -2.81004665660, -3.35210644563, -3.45626513000, -5.37432696832, -2.14215935276, -0.538823633149, -1.39535571638, -4.26389011473, -3.58332670710, -5.03263931039, 0.648060105356, -3.02221399632, -1.83170587234, -2.37033491174, -0.527049340161, 1.27190685484, 1.86609684761, 2.27346737812, -4.35783988847, -4.09579126929, 0.892384226942, -3.57155025876, 0.0872816773913, 1.96844187389, 0.859606531259, -3.76674627657, -5.83850222330, -7.61047757684, -7.90607148418, -10.0869608861, -7.61785716243, -8.56595466210, -9.79598600926, -7.62228100824, -3.42432463260, -14.0912440427, -1.75773570496, -17.4134339546, -3.52702931314, -2.43434134683, 4.34231891950, -2.59637492575, -4.18361147861, -4.91534081789, 2.77691764137, -2.00135462423, -8.02880140394, -6.68837691359, -4.20846320503, -5.14678983453, -8.49276272601, -6.20630988686, -5.10373631855, -7.88809678529, -6.50929731674, -7.84653437912, -11.8893635232, -6.79922199279, }, { 12.5879849047, 1.63728269312, -11.3771881230, 1.88099997551, 2.06125308493, 3.36886108025, 3.82132646761, 95.8253560915, -11.4937924601, -12.8169778043, 13.1379198417, 5.44249526303, 0.660741621798, 1.51214093103, 1.26119834948, 5.96833742143, 4.11048986679, 4.70113281529, 12.9423641628, 1.95804453141, 4.07022363329, 2.84956457467, 11.4442099056, 12.1325078736, 11.4517516335, 11.7034791276, -8.29754156395, 4.86683987463, 7.80962418292, 15.2833215316, 0.0688474955951, -14.2515233115, -18.5389743861, -19.5588218250, -1.50027454550, -2.27303616948, 6.24180265424, -5.29735570343, 10.0730498543, 8.54277559021, -0.338532291702, 1.16047660536, 6.66691905449, 6.95343835880, 1.20670176701, 1.18570542996, 4.96574729528, 1.30519160208, 4.42154249574, 4.61452225228, 5.64722424249, 2.18987516681, 2.73971784574, 3.37896290047, 4.91037153642, 8.60637122639, 1.57307864629, 2.91434752106, -1.16301986843, -2.61762276351, -5.04394247808, -4.27782577163, -1.37163023510, -2.10738078932, -5.70466629849, -4.05435495795, -1.50142740200, -4.57224088644, 0.112462804622, 0.722311796191, -3.00247208670, -0.725226738072, -1.31988516118, 0.0530762724269, 2.05301896597, 0.651472016818, -3.49650206722, -3.04675227459, 2.34670913657, 2.71151189023, -3.21707086342, -3.08366691349, 0.934294689249, -2.90479889313, -1.23652875064, -1.20420235933, 0.590633792225, -3.52437410739, -7.88914111836, -5.03263931039, -8.50314641749, -8.52814552557, -7.35459035667, -5.44641221973, -6.53319254708, -8.68936039711, -13.9285718417, -5.53141230965, -18.3976865898, -3.96687513396, -1.97808516555, -0.537906001096, -3.31927402712, 3.97463653510, 0.846182241218, 0.699673230686, -3.93903347767, -3.78877759863, -4.19782340310, -3.06099501395, -6.03427973474, -5.97302395553, -4.53722062451, -8.15841326488, -7.88809678529, -7.36238199152, -6.72390343177, -6.30970603601, -7.42705630041, -13.5953439229, }, { 1.39654183047, 2.46532995184, -10.4179101369, 3.11372650763, 11.9416522898, 2.96750226889, 4.40043954301, -11.4937924601, 96.4518701114, -12.6839240768, 13.2818405765, 5.80496011766, 10.3977310850, 0.677327563698, 3.47335810570, 6.85570362359, 13.8527965563, 14.8468941777, 1.87942139897, 2.17686565290, 3.61855263797, 2.26907424018, 1.31728951722, 2.72936358630, 6.80378366108, -12.0089431300, 7.21247353087, 3.94284580098, 6.14401133253, 13.6763017879, -1.05510526828, 2.56894077997, 4.01875400135, 2.90487823575, 0.304161354887, -0.702321383383, 7.27804666997, 15.5349777304, -7.84888069700, 9.88998691768, 1.39551041680, 1.88772939286, 8.51096261755, -11.2505893766, -16.9846587415, -18.3629095634, 7.19934538749, 2.52869602862, 3.38103514287, 4.05940570669, 7.36241256775, 4.15777877683, 0.0849587942869, 1.06752938523, 2.52357226846, 5.64722424249, 0.0209809415686, 0.545331558958, 0.514136212441, -2.30163312917, -3.07052267766, -2.68209384482, -3.51454627695, -6.23340209851, -7.00279693580, -6.61848412260, -2.49753689780, -1.37410684853, -5.88796619628, -2.09613711355, -4.70767664646, -4.05435495795, -2.42287091649, -0.380210961430, 1.05158253708, 0.530475704477, -1.39059221097, -0.642957914166, 1.97210592684, 1.61158816726, -4.11852072757, -3.12264250823, 2.93182498382, -1.63606896922, 0.450688627235, 1.57698579440, 1.26843494328, -3.16798642674, -6.83419264548, -5.37432696832, -8.44202922569, -9.94818435373, -6.01767315498, -8.74645850396, -9.33963865749, -6.52606891117, -2.11136224508, -3.63980243567, -17.3220171221, -4.09070881500, -13.1943048089, -1.61502794398, -2.27640071874, 3.79095739238, 5.02034622785, -0.479123945235, -5.72021533230, -6.49664214697, -5.41431685967, -3.83821499890, -3.40654646337, -3.86241095315, -7.33354399261, -6.19424392149, -6.50929731674, -6.72390343177, -3.20219830206, -9.62141229527, -6.57582963161, -4.70076357543, }, { 1.61928012390, 2.18522773610, -11.1977046007, 2.55730386708, 1.77152941632, 13.3534507787, 4.11196661189, -12.8169778043, -12.6839240768, 95.1410445734, 14.6330225498, 7.04208824378, -0.497817484562, 11.9233162716, 13.9006086275, 17.3359761659, 2.91896715975, 7.41429879343, 2.37060247004, 2.18580016393, 3.00527857918, 3.19368144731, 2.04681763800, 3.14984948426, -9.87229649908, 9.42849253750, 9.29575996071, 6.09790724766, 8.95675841254, 16.5612410921, 1.17284223635, 4.18954888030, 2.73539255755, 2.57472739991, -3.27086927080, -1.68292210904, 5.43369561992, 12.3088134260, 7.54335481944, -9.39177531702, 5.44273872863, -1.43661669760, -12.2432643529, 7.91720330292, 2.48195738147, 1.55758494558, -11.6729786631, -16.7634577374, 3.51830820868, 8.26954420328, 6.85570362359, 3.23790008991, -0.580323425396, 1.07416732004, 2.33851044078, 5.96833742143, 2.44544825138, -4.22556084587, -2.27483562655, -2.45959713642, -6.02998849958, -3.82849120087, -3.88232908528, -4.43922102010, -6.93544144105, -6.19424392149, 0.00520850413779, 4.26348616172, 3.87026004778, -6.04286677972, -8.51024383753, -8.15841326488, -1.79190636860, 0.0617025313114, 0.716863814499, 0.166041701236, -3.12338044576, -1.40380767879, 3.01638553195, 3.62606894482, -1.78446843887, -5.08978296436, 1.17416486145, -3.99370888359, -0.655500619147, 0.625586580876, 0.788072126217, -4.27079623153, -7.04349262793, -6.20630988686, -8.09631305473, -6.79002948435, -7.15385672093, -6.84928104137, -7.93679465698, -7.22139710446, -3.20809872200, -4.14106321047, -16.7877815213, -2.90571696531, -2.90566379430, -11.9243045226, -4.40884437221, 1.70108151577, -0.0438466036696, 4.06630928290, -4.24027216807, -3.15759783481, -4.70358055171, -3.78271517431, -3.26077886935, -6.30293519068, -7.36867393869, -6.15054479643, -7.84653437912, -6.30970603601, -9.62141229527, -4.59832563694, -7.47507811941, -5.70081880516, }, { 4.24056105166, 0.283315126158, 12.0368225525, -12.4658563158, 4.63861937546, 6.04967090955, -13.6004620130, 13.1379198417, 13.2818405765, 14.6330225498, 95.0549573511, -0.201028443308, 4.22568698788, 5.57269052947, 7.31803758939, 8.95675841254, 5.76091246408, 6.18971629783, 3.57441254429, 1.17390695484, 2.09320522335, 3.30475352149, 3.96775742616, 5.59392466674, 5.82666009926, 5.42245148490, 5.25351092114, 8.69796976280, 21.1906530124, -10.6900502580, 3.17239108681, -0.453212325349, -2.80677249714, -3.78922402605, 5.19487052725, 0.342721870139, 23.4873253383, -9.37774635473, -14.7753124299, -19.8582350703, -0.0679883047309, 8.60717933673, 3.43150830196, 3.17903115692, -2.76899080156, -3.79629591723, 2.76355973272, -2.93284896764, 2.78643342225, 2.67799341696, 6.14401133253, 3.49249165404, 0.219686486452, 1.67444252606, 5.11985745270, 7.80962418292, 7.68438220043, -4.99338303655, -0.288350770806, -2.75213165922, -4.73781547117, -3.37577633747, -3.05018339346, -5.29810362710, -7.39504638297, -6.52606891117, 2.67602940790, 2.38818731746, 5.51065378265, -7.36658175599, -13.0398138120, -8.68936039711, 0.963561730308, -3.00379402614, -1.48303979002, -0.963704921350, 1.43073220478, 3.00380912726, 3.35725030544, 3.26675519699, -2.99515736580, -3.84237277717, 2.76659868630, -3.14490568256, -1.39758341021, 0.135824431576, 1.72684525309, -4.23299685560, -7.04252427141, -7.62228100824, -9.33786975830, -6.78794619835, -6.46198437092, -6.79811016906, -8.67247228685, -10.8203866155, -6.03443377457, -3.04768959184, -12.7359922823, -15.7714696397, -5.49689862569, -4.17525572483, 3.23042948793, -3.15950591385, -5.51170646267, -6.45874811277, 4.87083197795, 0.470523253304, -3.90690736715, -2.61517726585, -3.36354084830, -5.30466293646, -6.50728434006, -7.22139710446, -11.8893635232, -7.42705630041, -6.57582963161, -7.47507811941, -7.26558298022, -9.41793008863, }, { 1.90846053913, 3.32191661492, 3.95863320677, 0.514937591235, 2.64266037378, 3.97585019365, -1.09564831427, 5.44249526303, 5.80496011766, 7.04208824378, -0.201028443308, 119.836425318, 2.61850268380, 3.95757418947, 5.83649997367, 7.04208824378, 2.11615664827, 5.38523171468, 1.77926900938, 3.10532137185, 4.15892129831, 5.38523171468, 2.33797744968, 4.00304809629, 5.83649997367, 5.64316448556, 5.36585346694, 7.06585597865, -0.201028443308, 6.94511364434, 1.42851903350,-0.00675287102231, -2.02802672410, -2.54663857301, 1.38599815357, 1.85902383774, -1.09564831427, 7.06585597865, 1.42851903350, 2.31078513921, 0.514937591235, -29.6934146419, 3.95757418947, 3.37243472607, -2.02151439206, -3.35031062359, 3.97585019365, -2.00425841399, -0.0424397035294, 4.15892129831, 5.80496011766, 5.64316448556, 2.02183256873, 3.37243472607, 5.36585346694, 5.44249526303, 3.95863320677, -4.69893147886,-0.00675287102233, -1.69030572390, -3.35179369511, -2.02151439206, -2.02802672410, -4.21925717124, -5.73626900280, -4.70076357543, -1.72460020986, 3.10532137185, 3.32191661492, -5.32764231058, -10.1740482357, -13.5953439229, -0.822761627120, -1.72460020986, -0.0424397035294, 2.11615664827, 0.170657990262, 2.33797744968, 2.61850268380, 2.02183256873, -3.35179369511, -4.80906526575, 2.64266037378, -3.31381710689, -0.822761627120, 1.77926900938, 1.90846053913, -3.80182453265, -6.75964659113, -6.79922199279, -6.75964659112, -10.1740482357, -5.73626900280, -8.15448489157, -10.7815827017, -9.41793008863, -3.80182453265, -5.32764231058, -4.69893147886, -29.6934146419, -3.31381710689, -2.00425841399, 2.31078513921, -1.69030572390, -4.21925717124, -5.22313360386, 1.85902383774, 1.58839264994, -4.80906526575, -3.35031062359, -2.54663857301, -5.22313360386, -8.15448489157, -5.70081880516, -6.79922199279, -13.5953439229, -4.70076357543, -5.70081880516, -9.41793008863, -7.07451952436, }, { 3.58974770676, 2.11540301866, 2.00594589649, 1.54681324423, -10.8751916175, 3.81386715783, 2.12704020822, 0.660741621798, 10.3977310850, -0.497817484562, 4.22568698788, 2.61850268380, 96.2328823514, 5.95579816464, 4.09190734571, 3.01638553195, -12.4019770743, -14.7745897265, 2.26290931654, 0.897125204738, -0.158319857919, 2.84939790460, 4.01280807894, 1.65867317606, -0.175364901065, 11.3982255953, 1.63364398023, 2.99488054707, 3.35725030544, 4.96241427809, 0.624602508586, -1.15408470499, -1.67373580774, 8.11963810962, -0.873547681475, -1.05467036139, 1.86609684761, 3.09071169008, -3.15515491248, 1.72765665257, 0.111484934528, 0.663691969363, -2.62487054875, -9.04793938552, 9.13690958564, 18.2660662821, 6.43466143584, 7.51502639263, 7.39312816784, 7.54195229339, 1.97210592684, 2.68655900288, -11.3999775314, 2.14946668185, 3.18541284620, 2.34670913657, 0.248275334921, 1.06176307263, -2.85326303442, 1.60500993770, -19.3172377973, -8.65304489492, -5.50478634897, -0.901028953118, -17.7214813554, -18.3629095634, 2.63094122274, 2.37222909638, 0.842927830720, 3.20833846878, 1.35133816440, 1.18570542996, 0.752523437973, 1.12185793523, -0.966763684304, -0.143948880618, -0.376870686323, -2.65468288836, -1.03267698428, -1.13586621270, -2.54666298514, -5.42499548254, -4.42205372104, -1.78976586390, -0.981000615935, -1.66259948970, -3.80493410954,-0.00969180416603, -1.78235877809, -2.04081972113, -7.37680265761, -3.62453739721, -3.38273805882, -4.03303910361, -3.41068706800, -3.79629591723, -3.93793507938, -1.88530104907, -1.71528642262, -1.90101638341, -18.0301307705, -6.22632330604, -3.29390863627, -2.98679387144, -2.74395919415, -10.9041161162, -1.73724798100, -1.28902728442, 5.54952664487, -2.69413426189, -3.64730771509, -3.18226111466, 2.34564145219, 1.55758494558, -6.68837691359, -3.06099501395, -3.83821499890, -3.78271517431, -2.61517726585, -3.35031062359, }, { 2.43658406577, 1.71359022390, 2.85356476469, 2.94636891811, 3.90350490143, -10.6187303080, 3.61354047806, 1.51214093103, 0.677327563698, 11.9233162716, 5.57269052947, 3.95757418947, 5.95579816464, 92.9081609273, -10.9696196737, -12.2432643529, 3.35728059368, 5.69324816715, 2.89791410635, 2.16723095516, 3.70110750688, 0.783079248832, 0.735988436246, 2.77936969810, 11.4112320403, -0.242624434201, 1.22098483369, 3.33357224677, 3.43150830196, 5.08742069869, -0.523543280774, -2.26824927103, 8.86483341561, -4.56923963793, 0.241912282487, -0.371207019862, 4.08962687016, 5.24852905716, -0.518408162699, -0.344176823369, 2.38840824158, 0.171732966065, 3.45654007290, 10.0677163024, 7.58738509851, -5.42499548254, 7.92839152050, 5.99953633686, 1.34710462072, 1.92792536871, 8.51096261755, 9.26811669461, 3.60317294936, -12.0586768221, 7.33859822326, 6.66691905449, 4.75341046185, 2.55767805912, 1.72187882714, 1.78263563452, -5.64241517623, -18.8945373099, -21.4912539598, -21.0330481220, -2.53196272433, -3.12264250823, -0.308055041427, 0.580982753522, 0.405950073013, -2.30497741046, -2.92596621497, -3.08366691349, -1.45370351642, -0.532432213488, 1.40874140874, 0.407242738726, -0.675888482944, 1.19185087310, -2.62487054875, -2.07282329380, -4.22320070153, -1.17578717837, -1.87300467473, -4.31705493911, -2.13442715547, -1.09661117536, -1.16278277850, -4.48756391546, -4.03545319173, -4.09579126929, -7.29749260730, -3.49052670024, -4.36964974991, -3.19563732100, -3.49946492897, -3.84237277717, -4.08938603508, -2.07073322809, -1.92029423174, -2.05132354587, -6.24502277907, -18.3575303507, -1.08325212653, -0.979733462898, -10.5458301759, -5.67174203167, -2.75853109518, -3.45806031990, -3.59775002064, 5.54952664487, 2.98812055676, 1.73375230332, -4.23601380227, -5.08978296436, -8.02880140394, -4.19782340310, -5.41431685967, -4.70358055171, -3.90690736715, -4.80906526575, }, { 2.17703943527, 1.76170682652, 2.75496955568, 3.66237190690, 1.39081975589, -11.2385279478, 5.27981451917, 1.26119834948, 3.47335810570, 13.9006086275, 7.31803758939, 5.83649997367, 4.09190734571, -10.9696196737, 98.6684618307, -9.87229649908, 2.83654536530, 5.71434286053, 2.99608668066, 2.00550909998, 4.70811456921, 3.81743460173, 3.05266424708, 4.67733974278, 24.6607223608, 14.1327613027, 11.2369380302, 4.98178812755, 5.82666009926, 7.18696222212, 0.313854286943, 6.29032662774, -6.47364612549, -6.59806078449, -0.206560379201, -1.14299204712, 5.93887287961, 7.02062231512, 1.83839328834, -4.19956382234, 4.32886732400, -0.817545630271, 11.4112320403, 0.823733923179, -4.70149806626, -4.03303910361, -7.09732086170, 6.35850336621, 1.45528844758, 2.87287451220, 6.80378366108, -12.0020462898, 2.25691717471, 6.65935094182, -7.46208658743, 11.4517516335, 7.42132958226, 1.88241502240, -13.1120021898, -21.5884745239, -3.08262042966, 1.03529123844, 4.46226543485, -3.89444925619, -11.4856321658, -8.74645850396, 1.00101216412, 2.25972447542, 3.51283765151, -2.87516480264, -5.38655433290, -5.44641221973, -1.01728261213, 0.625326118133, 2.91476006270, 2.01415320722, -1.29945312138, -0.614509431762, -0.175364901065, 1.12394241249, -6.28473382085, -3.19563732100, 3.95791893946, -4.77212084362, 0.768747418436, 0.261943941164, 2.22704751677, -6.87236432478, -8.70938048563, -8.56595466210, -9.22655396238, -5.77589734195, -7.81212664565, -7.15322553675, -6.35861885328, -6.79811016906, -7.18637400837, -3.06686059009, -2.22568304570, -0.983369342872, -4.33829916575, -17.3542721770, -0.622281335680, -11.8168960818, -3.76698308645, -5.59596919541, -3.10671340685, -3.70888639990, -4.23601380227, 2.34564145219, 4.33952915306, 1.42580257187, -4.49896444709, -6.84928104137, -8.49276272601, -4.53722062451, -7.33354399261, -7.36867393869, -6.50728434006, -8.15448489157, }, { 0.788072126217, 3.87026004778, 2.44544825138, 5.44273872863, 1.17416486145, -11.6729786631, 5.43369561992, 5.96833742143, 6.85570362359, 17.3359761659, 8.95675841254, 7.04208824378, 3.01638553195, -12.2432643529, -9.87229649908, 95.1410445734, 0.166041701236, 3.19368144731, 0.625586580876, 4.26348616172, 8.26954420328, 7.41429879343, -1.40380767879, 3.14984948426, 13.9006086275, 3.23790008991, 2.33851044078, 12.3088134260, 14.6330225498, 16.5612410921, 7.54335481944, -2.27483562655, -3.88232908528, -3.26077886935, -3.27086927080, -4.24027216807, 4.11196661190, 6.09790724766, 1.17284223635, -4.40884437221, 2.55730386708, -2.90571696531, 11.9233162716, 1.07416732004, -3.82849120087, -3.78271517431, 13.3534507787, -11.9243045226, 0.716863814499, 3.00527857918, -12.6839240768, 9.42849253750, 3.62606894482, 7.91720330292, 9.29575996071, -12.8169778043, -11.1977046007, -16.7877815213, 4.18954888030, 1.70108151577, -1.78446843887, 2.48195738147, 2.73539255755, -0.0438466036697, -7.15385672093, -9.62141229527, 0.0617025313115, 2.18580016393, 2.18522773610, -4.14106321047, -6.79002948435, -6.30970603601, -0.655500619147, 0.00520850413776, 3.51830820868, 2.91896715975, -3.12338044576, 2.04681763800, -0.497817484562, -0.580323425396, -6.02998849958, -4.70358055171, 1.77152941632, -2.90566379430, -1.79190636860, 2.37060247004, 1.61928012390, -3.20809872200, -8.09631305473, -7.84653437912, -7.04349262793, -8.51024383753, -6.93544144105, -7.36867393869, -7.93679465698, -7.47507811941, -4.27079623153, -6.04286677972, -4.22556084587, -1.43661669760, -3.99370888359, -16.7634577374, -9.39177531702, -2.45959713642, -4.43922102010, -6.30293519068, -1.68292210904, -3.15759783481, -5.08978296436, 1.55758494558, 2.57472739991, 4.06630928290, -6.84928104137, -4.59832563694, -6.20630988686, -8.15841326488, -6.19424392149, -6.15054479643, -7.22139710446, -5.70081880516, }, { 1.44529123062, 4.81301106985, 3.51366877414, 6.16196222431, -12.6814395874, 0.827377726153, 5.10925342427, 4.11048986679, 13.8527965563, 2.91896715975, 5.76091246408, 2.11615664827, -12.4019770743, 3.35728059368, 2.83654536530, 0.166041701236, 92.1365355516, -16.1553457842, -0.0310057129430, 1.83082030725, 3.58769338251, 4.24731476814, 2.13648776433, 1.02050137931, 2.01415320722, 11.6325047244, 1.97189302591, 1.29179650177, -0.963704921350, 3.32517390895, -1.52362951526, -0.774776264366, -1.49196964868, -1.95176042081, -2.05718013166, 8.61627206225, -2.37033491174, 2.77259210961, -3.83870245603, 12.0459018356, 7.29488051492, 7.96997978451, 0.407242738726, 10.3804109113, -10.0418795477, 8.11963810962, -1.56432015213, -0.257197740859, -16.2402478326, 3.73619642794, 0.530475704477, 4.26622830396, 7.17934350437, 3.35790524138, 4.36501661673, 0.651472016818, -1.19922432959, -0.0789435747566, -1.87628143369, 2.47431235715, -1.14582454271, -4.50485903284, -7.05793411218, 0.193453132463, 5.68294330736, 2.90487823575, -15.1465558918, 4.41797286516, -0.244222984889, 2.13971609673, -16.0949204373, -19.5588218250, -2.02931849394, -1.83079589154, 0.0169954512305, 1.20436215199, 0.337099110791, -1.21452928814, -0.143948880618, -2.34515277457, -0.172708307440, -4.56923963793, -4.45236155393, -0.852923983700, -0.737208484589, -1.95883804573, -3.34650475961, 0.0509280864458, -1.05123128530, -1.74931022596, -2.51407232447, -5.79854447676, -4.40445015800, -6.59806078449, -3.82010252008, -3.78922402605, -2.70739810248, -3.04232718639, -4.33004449477, -5.10130764631, -16.9543023518, -3.66840017366, -2.05981445593, -2.77795348368, -3.90795863113, -2.12699636533, -0.612057989473, -10.8310446324, 2.98812055676, -3.64730771509, -1.53071571540, -2.45376070600, 4.33952915306, 2.57472739991, -4.20846320503, -6.03427973474, -3.40654646337, -3.26077886935, -3.36354084830, -2.54663857301, }, { 1.01893534483, 3.99144669601, 4.39505757541, 5.34531479332, -12.6457044171, 1.73634316499, 3.78761175390, 4.70113281529, 14.8468941777, 7.41429879343, 6.18971629783, 5.38523171468, -14.7745897265, 5.69324816715, 5.71434286053, 3.19368144731, -16.1553457842, 93.0369089747, -1.91776405385, 2.47930316206, 2.99133463145, 6.87948754021, 1.51405062145, 3.53162357437, 3.81743460173, 12.5784802369, 2.44550709798, 3.07354155736, 3.30475352149, 3.53402648425, -0.486534657962, -1.00719159757, -4.21039938474, -2.12699636533, 9.16556607048, -2.81745826544, 12.8234289622, 13.2970436677, 8.03071032466, -5.30094184162, 1.03203693157, -3.25072542614, 0.783079248832, 9.16691233076, 5.60836397767, -10.9041161162, 3.03302590491, -1.48524032158, 3.26782880655, -14.3750955712, 2.26907424018, 4.82287665170, 4.85576722241, 4.67724015175, 5.49448637986, 2.84956457467, 2.37667671700, -2.11393300786, 0.149580620670, -1.76475194051, -0.768481463569, -0.624657997254, 0.0380088357487, -5.14903647973, -3.35219702054, -0.479123945235, 1.83679897869, -14.9716998052, -12.7603680586, -17.9660620096, -1.80161412778, 0.699673230686, -4.10591299042, -1.08861127329, 0.864511276649, 4.24731476814, -0.156236616844, 2.71948844032, 2.84939790460, 0.493403977792, -3.96373655670, -5.67174203167, 0.124039501753, -6.13796778300, -1.74888357212, 2.22998910694, 1.70972351290, -4.11294492957, -4.67353237935, -4.91534081789, -7.68846714904, -7.13738360177, -5.52024849453, -5.59596919541, -6.26867919373, -6.45874811277, -4.34479292116, -3.61884557138, -5.60682842900, -1.41314885590, -18.1647344400, -2.77501741267, -0.850722933852, -3.41769576679, -6.71315349486, -3.03529803528, -10.3530654949, -1.81557029447, 1.73375230332, -3.18226111466, -2.45376070600, -3.32889805364, 1.42580257187, 4.06630928290, -5.14678983453, -5.97302395553, -3.86241095315, -6.30293519068, -5.30466293646, -5.22313360386, }, { -11.7602653513, 2.38263262964, 0.592951516896, 2.87699128121, 3.47037493945, 1.93512326132, 2.40375639965, 12.9423641628, 1.87942139897, 2.37060247004, 3.57441254429, 1.77926900938, 2.26290931654, 2.89791410635, 2.99608668066, 0.625586580876, -0.0310057129431, -1.91776405385, 92.4347819176, 1.87872915877, 1.28248388672, 2.22998910694, -14.6463852485, -14.8400567409, 0.261943941164, 0.00817510064863, 11.7288926780, 1.20036859623, 0.135824431576, 1.92241176595, -1.92153663320, -10.4459740465, 9.35576439192, 12.0459018356, 2.61461575929, 2.22376399657, 1.96844187389, -0.685276785438, 4.38226922329, 3.56684831254, -0.546162441077, 2.86356084676, -1.09661117536, -1.38754417573, -1.11372675128, 1.72765665257, -1.11357560461, 2.87309717622, 0.419196010992, -1.91084817595, 1.57698579440, -0.233985776625, -1.77000131659, -0.771434475411, -6.40891589527, -1.20420235933, -2.15700853736, -0.491483243017, 0.265231994911, 0.829071607073, -0.0647828994834, -0.0139864204816, -0.995124191103, -0.230362026411, -0.0859737999384, 9.88998691768, -1.15480161496, -4.73130890527, 5.17250072782, 7.13294881956, -1.36735936182, 8.54277559021, -14.7303964383, -0.379801943548, -2.04207166717, -1.95883804573, 5.26249155547, 4.02652212184, -1.66259948970, -2.00355051992, -1.30237338382, -0.344176823369, -2.53679733505, 1.19191624916, 2.67912768460, 0.960378711611, -1.48444614454, 0.934777145256, 3.14499930424, 0.659261570580, -17.6100253304, -3.07743593625, -2.18365247431, -4.19956382234, -18.8896883403, -19.8582350703, -15.5611255551, -1.25286666352, -5.02467448805, -4.43349551400, -2.67053226402, -5.15925382175, -2.98718992499, -4.10554906252, -4.87087529660, -5.30094184162, -4.53452165872, -1.69920580331, -1.08325212653, -3.29390863627, -2.05981445593, -0.850722933852, -0.622281335680, -9.39177531702, 4.34231891950, -3.31927402712, -2.27640071874, -4.40884437221, 3.23042948793, 2.31078513921, }, { 2.16993674850, -10.8343835093, 3.22581106136, 0.466615290388, 1.65442854956, 1.12297208977, 11.0796491579, 1.95804453141, 2.17686565290, 2.18580016393, 1.17390695484, 3.10532137185, 0.897125204738, 2.16723095516, 2.00550909998, 4.26348616172, 1.83082030725, 2.47930316206, 1.87872915877, 93.6426102094, -15.7905603561, -14.9716998052, 2.94467407897, 1.68664098403, 2.25972447542, 2.60278409476, 2.46454329810, 11.4762396034, 2.38818731746, 0.606401472974, -10.7280805275, -0.188438998761, -0.156025669468, 2.47431235715, 11.0676035914, 12.1289294635, -0.538823633149, 2.71510318704, -0.267792101053, 0.829071607073, 3.19550859524, 1.62075751509, 0.580982753522, -0.295170575584, -0.201661053047, 1.60500993770, 1.55050062551, 0.429846443576, -4.51946838500, -3.19998558894, -1.37410684853, 1.14479443151, 0.292564966958, 1.04860798325, 1.48147473050, -4.57224088644, 0.401277785420, 0.918782591640, 0.651265875292, -0.0582642072911, -2.18819474404, -2.48488946318, -0.876450614864, -1.46089485254, 7.59505512494, -2.30163312917, 7.71072711834, 9.06274797268, -1.28003934163, 0.0555678467829, 7.67248056184, -2.61762276351, -1.65035733438, -15.2978841164, 1.47846360711, 4.41797286516, 0.733919099735, -0.695741099095, 2.37222909638, 0.279843608035, 1.65480029254, 1.78263563452, 1.63938994047, 1.88972013476, -4.01214234100, -4.73130890527, -2.13068687021, -0.222808488642, -2.67538276240, -0.607862524868, -2.26857129554, -17.8224916068, -18.7096452661, -21.5884745239, -3.81099339358, -2.75213165922, -2.12754545184, -17.0216252500, -4.48983028873, -6.05454160848, -0.973849166874, -2.55234384466, -4.10554906252, -1.91383293954, -1.53452144760, -1.76475194051, -5.85849699332, -7.69733034196, -0.979733462898, -2.98679387144, -2.77795348368, -3.41769576679, -11.8168960818, -2.45959713642, -2.59637492575, 3.97463653510, 3.79095739238, 1.70108151577, -3.15950591385, -1.69030572390, }, { 2.01281383095, -12.3582958452, 2.93931202527, 1.02899668126, 1.96270324942, 1.10735995817, 13.2137268024, 4.07022363329, 3.61855263797, 3.00527857918, 2.09320522335, 4.15892129831, -0.158319857919, 3.70110750688, 4.70811456921, 8.26954420328, 3.58769338251, 2.99133463145, 1.28248388672, -15.7905603561, 92.7490309898, -14.3750955712, 2.89820975974, 3.44568326186, 2.87287451220, 3.05273950099, 3.49246198396, 11.0614215636, 2.67799341696, 1.19761159601, 7.75620353226, 0.137554300282, -1.29586693892, 0.193453132463, -7.83212364819, 7.93840729882, 6.04429774214, 5.59187838003, 2.82235210499, -0.230362026411, 2.06849456445, 1.39656074305, 1.92792536871, 2.25917246856, -2.64461858054, -0.901028953118, 4.62879146440, 0.618454666887, 11.4159072685, 11.0067261524, 4.05940570669, 2.13910789756, 8.64381642659, 1.41439353302, 2.69155885333, 4.61452225228, -0.940801877032, 1.81968452702, -0.0567776177297, -1.46089485254, 4.48066186429, -2.78247617573, -1.85841628415, -2.73796049663, -7.34212250355, -6.23340209851, -3.09523932096, -3.19998558894, -2.35072651678, -2.75719522516, -3.88179659482, -2.10738078932, -0.701150313907, 0.982437868940, -15.9480158432, 3.73619642794, 0.586904825889, 2.02175215248, 7.54195229339, -12.7497104077, -18.0169750810, -21.0330481220, 4.48072367247, 0.702694944772, -2.50966202192, -1.91084817595, 0.835336974273, -2.90899564007, -7.65647231212, -3.35210644563, -6.13678692008, -3.79742931057, 1.21387395923, -3.89444925619, -7.03436867550, -5.29810362710, -3.04136462819, -18.0874436684, -2.15868159775, -4.14858224039, -2.99859433160, -4.73280164616, -4.87087529660, -1.53452144760, -2.50996423442, -5.14903647973, -0.936251126037, -5.25391663395, -10.5458301759, -2.74395919415, -3.90795863113, -6.71315349486, -3.76698308645, -4.43922102010, -4.18361147861, 0.846182241218, 5.02034622785, -0.0438466036696, -5.51170646267, -4.21925717124, }, { 1.70972351290, -12.7603680586, 2.37667671700, 1.03203693157, 0.124039501753, 3.03302590491, 12.8234289622, 2.84956457467, 2.26907424018, 3.19368144731, 3.30475352149, 5.38523171468, 2.84939790460, 0.783079248831, 3.81743460173, 7.41429879343, 4.24731476814, 6.87948754021, 2.22998910694, -14.9716998052, -14.3750955712, 93.0369089747, 2.71948844032, 3.53162357437, 5.71434286053, 4.82287665170, 5.49448637986, 13.2970436677, 6.18971629783, 3.53402648425, 8.03071032466, 0.149580620670, 0.0380088357487, -2.45376070600, 9.16556607048, -10.3530654949, 3.78761175390, 3.07354155736, -0.486534657962, -0.850722933852, 5.34531479332, -1.41314885590, 5.69324816715, 4.67724015175, -0.624657997254, -3.18226111466, 1.73634316499, -2.77501741267, 0.864511276649, 2.99133463145, 14.8468941777, 12.5784802369, 0.493403977792, 9.16691233076, 2.44550709798, 4.70113281529, 4.39505757541, -5.60682842900, -1.00719159757, -3.41769576679, -3.96373655670, 5.60836397767, -4.21039938474, -6.71315349486, -5.52024849453, -3.86241095315, -1.08861127329, 2.47930316206, 3.99144669601, -3.61884557138, -7.13738360177, -5.97302395553, -1.74888357212, 1.83679897869, 3.26782880655, -16.1553457842, -0.156236616844, 1.51405062145, -14.7745897265, 4.85576722241, -0.768481463569, 1.73375230332, -12.6457044171, -18.1647344400, -4.10591299042, -1.91776405385, 1.01893534483, -4.34479292116, -7.68846714904, -5.14678983453, -4.67353237935, -1.80161412778, -3.35219702054, 1.42580257187, -6.26867919373, -5.30466293646, -4.11294492957, -17.9660620096, -2.11393300786, -3.25072542614, -6.13796778300, -1.48524032158, -5.30094184162, -1.76475194051, -5.14903647973, -3.32889805364, -2.81745826544, -1.81557029447, -5.67174203167, -10.9041161162, -2.12699636533, -3.03529803528, -5.59596919541, -6.30293519068, -4.91534081789, 0.699673230686, -0.479123945235, 4.06630928290, -6.45874811277, -5.22313360386, }, { -12.5737071842, 0.908235754809, 0.854745298683, 2.30547304932, 2.10113876234, 2.32430877087, 1.64544241710, 11.4442099056, 1.31728951722, 2.04681763800, 3.96775742616, 2.33797744968, 4.01280807894, 0.735988436246, 3.05266424708, -1.40380767879, 2.13648776433, 1.51405062145, -14.6463852485, 2.94467407897, 2.89820975974, 2.71948844032, 92.6578117154, -15.1998571420, -0.614509431762, 1.14597346545, 10.7287014056, 4.03107288934, 3.00380912726, 4.68667942184, 1.78584284172, 8.66578251209, -7.06529346522, 8.61627206225, -1.41387342026, -1.37831976503, 1.27190685484, 1.45683591274, -0.541588753301, 2.22376399657, 0.228970207248, 0.752358397718, 1.19185087310, 2.97337347268, 2.13889983533, -1.05467036139, -1.65265185841, 0.191498213269, 1.75832614461, 2.02175215248, -0.642957914166, 2.92767457208, 2.08159759315, 0.194605943195, 0.646018777457, -3.04675227459, 6.73360604526, 7.33279444374, -4.68783610204, 12.1289294635, -2.32574635157, -4.82797426774, -5.73844782065, 7.93840729882, 0.216651853125, -0.702321383383, -0.102612168783, -0.695741099095, -2.57697065912, -1.13547734156, -1.19535906150, -2.27303616948, 2.66720371507, 0.277616118533, -0.601676628533, -1.21452928814, -17.5987402266, 0.0681813707366, -2.65468288836, -0.520669323459, -0.627258344381, -0.371207019862, -3.05199614679, 0.115820235337, -15.3285798195, 4.02652212184, -3.02612919136, 0.692207431452, -15.1668725173, -20.7829473955, -0.540637942149, -2.56168688630, -4.40138514720, -1.14299204712, 3.80636994282, 0.342721870139, -17.8481897204, -4.80044307096, -3.86961435551, -2.66162830552, -3.24361929777, -3.54614834121, -4.53452165872, -5.85849699332, -0.936251126037, -2.81745826544, -1.64566691985, -1.50296632734, -2.75853109518, -1.73724798100, -0.612057989473, -10.3530654949, -3.10671340685, -1.68292210904, 2.77691764137, -3.93903347767, -5.72021533230, -4.24027216807, 4.87083197795, 1.85902383774, }, { -13.8647322686, 1.40680050611, 0.866154454190, 2.52173697735, 1.70988267819, 3.04187382428, 3.60711007986, 12.1325078736, 2.72936358630, 3.14984948426, 5.59392466674, 4.00304809629, 1.65867317606, 2.77936969810, 4.67733974278, 3.14984948426, 1.02050137931, 3.53162357437, -14.8400567409, 1.68664098403, 3.44568326186, 3.53162357437, -15.1998571420, 95.4361312537, 4.67733974278, 1.57770453761, 10.7075152535, 2.92665381643, 5.59392466674, 6.98051591347, 1.80036779883, 9.02880381129, 9.09063855211, -10.8310446324, -0.675358718959, -1.50296632734, 3.60711007986, 2.92665381643, 1.80036779883, -1.69920580331, 2.52173697735, -1.00718051189, 2.77936969810, 0.888231594353, -0.726464919442, -1.28902728442, 3.04187382428, -1.74755203283, 1.72996653042, 3.44568326186, 2.72936358630, 1.57770453761, 0.657839132651, 0.888231594353, 10.7075152535, 12.1325078736, 0.866154454190, -3.27561900621, 9.02880381129, -7.69733034196, -2.70772471001, -0.726464919442, 9.09063855211, -5.25391663395, -5.75346587156, -6.49664214697, -0.354029801964, 1.68664098403, 1.40680050611, -3.91494167754, -3.49132852619, -3.78877759863, 2.17786885862, -0.354029801964, 1.72996653042, 1.02050137931, 0.220345800761, -15.1998571420, 1.65867317606, 0.657839132651, -2.70772471001, -3.45806031990, 1.70988267819, -4.74087329353, 2.17786885862, -14.8400567409, -13.8647322686, -21.4030642441, -2.37328471558, -2.00135462423, -2.37328471558, -3.49132852619, -5.75346587156, -3.70888639990, -1.38620940730, 0.470523253304, -21.4030642441, -3.91494167754, -3.27561900621, -1.00718051189, -4.74087329353, -1.74755203283, -1.69920580331, -7.69733034196, -5.25391663395, -1.81557029447, -1.50296632734, -3.19605235187, -3.45806031990, -1.28902728442, -10.8310446324, -1.81557029447, -3.70888639990, -3.15759783481, -2.00135462423, -3.78877759863, -6.49664214697, -3.15759783481, 0.470523253304, 1.58839264994, }, { 2.22704751677, 3.51283765151, 7.42132958226, 4.32886732399, 3.95791893946, -7.09732086170, 5.93887287961, 11.4517516335, 6.80378366108, -9.87229649908, 5.82666009926, 5.83649997367, -0.175364901065, 11.4112320403, 24.6607223608, 13.9006086275, 2.01415320722, 3.81743460173, 0.261943941163, 2.25972447542, 2.87287451220, 5.71434286053, -0.614509431762, 4.67733974278, 98.6684618307, -12.0020462898, -7.46208658743, 7.02062231512, 7.31803758939, 7.18696222212, 1.83839328834, -13.1120021898, 4.46226543485, 4.33952915306, -0.206560379201, -3.10671340685, 5.27981451917, 4.98178812755, 0.313854286943, -0.622281335680, 3.66237190690, -0.983369342872, -10.9696196737, 6.65935094182, 1.03529123844, 2.34564145219, -11.2385279478, -17.3542721770, 2.91476006270, 4.70811456921, 3.47335810570, 14.1327613027, 1.12394241249, 0.823733923179, 11.2369380302, 1.26119834948, 2.75496955568, -2.22568304570, 6.29032662774, -11.8168960818, -6.28473382085, -4.70149806626, -6.47364612549, -3.76698308645, -7.81212664565, -7.33354399261, 0.625326118133, 2.00550909998, 1.76170682652, -3.06686059009, -5.77589734195, -4.53722062451, 0.768747418436, 1.00101216412, 1.45528844758, 2.83654536530, -1.29945312138, 3.05266424708, 4.09190734571, 2.25691717471, -3.08262042966, -4.23601380227, 1.39081975589, -4.33829916575, -1.01728261213, 2.99608668066, 2.17703943527, -7.18637400837, -9.22655396238, -8.49276272601, -8.70938048563, -5.38655433290, -11.4856321658, -4.49896444709, -6.35861885328, -6.50728434006, -6.87236432478, -2.87516480264, 1.88241502240, -0.817545630271, -4.77212084362, 6.35850336621, -4.19956382234, -21.5884745239, -3.89444925619, 1.42580257187, -1.14299204712, -3.70888639990, -3.19563732100, -4.03303910361, -6.59806078449, -5.59596919541, -7.15322553675, -7.36867393869, -8.56595466210, -5.44641221973, -8.74645850396, -6.84928104137, -6.79811016906, -8.15448489157, }, { 1.93731693654, 3.72182254444, 7.85572434880, 5.39916098902, -7.23976744124, 3.85417816513, 6.13080095654, 11.7034791276, -12.0089431300, 9.42849253750, 5.42245148490, 5.64316448556, 11.3982255953, -0.242624434201, 14.1327613027, 3.23790008991, 11.6325047244, 12.5784802369, 0.00817510064861, 2.60278409476, 3.05273950099, 4.82287665170, 1.14597346545, 1.57770453761, -12.0020462898, 94.7298696159, -8.61710023958, 5.10529079514, 3.49249165404, 3.32405577632, -1.18330443691, -14.6112811453, 4.92079954057, 5.68294330736, 1.50969080752, 0.216651853125, 5.84810605862, 5.85134547356, 3.39335561421, -0.0859737999384, 4.83644746149, 1.02605720546, 9.26811669461, -12.2102995519, -18.0786209612, -17.7214813554, 4.27517288855, 5.30877759488, 1.12338280046, 2.13910789756, 4.15777877683, 15.1580747943, 1.01326108039, 1.32288537996, 13.8048763306, 2.18987516681, 1.34264207773, -2.37331479701, -9.90097087751, 7.59505512494, -2.79810435903, -4.32478909853, -4.29947966233, -7.34212250355, -8.41736996603, -7.00279693580, -0.332001041841, 1.14479443151, 0.116066517666, -3.77733627693, -6.47950333593, -5.70466629849, -0.234511347270, 0.341986528276, 1.12502630644, 4.26622830396, 1.50831284227, 2.92767457208, 2.68655900288, 0.821853551219, -5.35965896485, -2.53196272433, 0.266964585737, 0.888583249480, -2.05191827869, -0.233985776625, -5.44848887444, -1.43305365901, -3.44409149145, -3.45626513000, -8.64938121805, -7.06730433692, -6.28804067827, -11.4856321658, -7.03341058696, -7.39504638297, -5.59032944961, -2.42109281648, 0.926481665246, -1.74931105086, 6.34108150200, -4.70370169779, -2.18365247431, -18.7096452661, 1.21387395923, -3.35219702054, -4.40138514720, -5.75346587156, -4.36964974991, -3.38273805882, -4.40445015800, -5.52024849453, -7.81212664565, -6.93544144105, -7.61785716243, -7.35459035667, -6.01767315498, -7.15385672093, -6.46198437092, -5.73626900280, }, { -8.41395982155, 2.82412258514, 6.91329582535, 4.26729074902, 4.27652301649, 4.35351409207, 5.64432273403, -8.29754156395, 7.21247353087, 9.29575996071, 5.25351092114, 5.36585346694, 1.63364398023, 1.22098483369, 11.2369380302, 2.33851044078, 1.97189302591, 2.44550709798, 11.7288926780, 2.46454329810, 3.49246198396, 5.49448637986, 10.7287014056, 10.7075152535, -7.46208658743, -8.61710023958, 102.873000337, 6.25670358802, 5.11985745270, 4.90918856470, -0.424687356220, -31.9189739166, -17.8574115966, -16.0949204373, -0.0662381676393, -1.19535906150, 4.93464750296, 6.53891567913, -0.272497579815, -1.36735936182, 3.17949645052, 0.100981600673, 7.33859822326, 6.06537020449, 0.532469675084, 1.35133816440, 2.28500868480, 3.91173751298, 2.07207252862, 2.69155885333, 2.52357226846, 13.8048763306, 3.59856635699, 3.10256892136, -5.21236288663, 4.91037153642, 2.90077588087, 0.110396186431, 9.55041595013, 7.67248056184, -4.39348055773, -4.94217489682, -3.21798506775, -3.88179659482, -6.47950333593, -4.70767664646, 0.515781867353, 1.48147473050, 2.59871803433, -0.644118167803, -4.33084423350, -3.00247208670, 0.306914586681, 0.598478445137, 2.06949985359, 4.36501661673, 0.0977904398823, 0.646018777457, 3.18541284620, 1.81135952795, -3.96916466957, -2.92596621497, -1.77820375188, -0.402406864486, -3.73188144194, -6.40891589527, -2.88743618262, -1.82528689767, -3.84681126387, -3.58332670710, -7.53423166744, -5.19815138695, -7.06730433692, -5.38655433290, -5.72755448944, -13.0398138120, 3.95300330661, -4.06087251037, -0.0622295296345, -1.83014139735, -3.78301578534, -3.78092960240, -3.07743593625, -17.8224916068, -3.79742931057, -1.80161412778, -2.56168688630, -3.49132852619, -3.49052670024, -3.62453739721, -5.79854447676, -7.13738360177, -5.77589734195, -8.51024383753, -10.0869608861, -8.52814552557, -9.94818435373, -6.79002948435, -6.78794619835, -10.1740482357, }, { 1.78089271632, -8.39291090002, 5.24659988964, 8.42273496448, 3.23350409469, 3.04775298559, -8.33851406616, 4.86683987463, 3.94284580098, 6.09790724766, 8.69796976280, 7.06585597865, 2.99488054707, 3.33357224677, 4.98178812755, 12.3088134260, 1.29179650177, 3.07354155736, 1.20036859623, 11.4762396034, 11.0614215636, 13.2970436677, 4.03107288934, 2.92665381643, 7.02062231512, 5.10529079514, 6.25670358802, 102.739840617, -9.37774635473, -7.53144107416, -32.3095409893, -0.425236423370, -3.31243791773, -1.05123128530, -14.1007388423, -15.1668725173, 9.54021935880, 9.59785708953, 3.84465259820, 3.14499930424, 6.44221687032, 1.81852923469, 5.24852905716, 3.12219281403, -3.10406777656, -1.78235877809, 2.28514157604, -0.561114436965, 3.62078617726, 5.59187838003, 15.5349777304, 5.85134547356, 3.46667425859, 3.94431849865, 6.53891567913, -5.29735570343, 8.91907078347, 4.44558063180, 0.992142461532, -2.67538276240, -1.96636597240, -1.59619979390, -2.20778938257, -7.65647231212, -3.44409149145, -6.83419264548, 0.688957879569, 2.71510318704, 0.573983294049, -3.61315415637, -3.84681126387, -7.88914111836, -0.405485447228, 0.303358116588, 0.501243283029, 2.77259210961, 2.72940983215, 1.45683591274, 3.09071169008, 1.06590212299, -5.17763354174, -4.03545319173, -0.0206401687921, -2.78206804744, -2.97318505675, -0.685276785438, -2.08846228834, -4.09790992519, -2.60446624975, -5.83850222330, -6.10713465110, -7.53423166744, -8.64938121805, -8.70938048563, -12.4512214806, -7.04252427141, -3.60435018208, 5.38238026713, -2.40015513230, -0.358971552026, -3.30981984540, -3.58084102688, -17.6100253304, -2.26857129554, -6.13678692008, -4.67353237935, -0.540637942149, -2.37328471558, -7.29749260730, -7.37680265761, -2.51407232447, -7.68846714904, -9.22655396238, -7.04349262793, -7.90607148418, -8.50314641749, -8.44202922569, -8.09631305473, -9.33786975830, -6.75964659113, }, { 1.72684525309, 5.51065378265, 7.68438220043, -0.0679883047309, 2.76659868630, 2.76355973272, 23.4873253383, 7.80962418292, 6.14401133253, 8.95675841254, 21.1906530124, -0.201028443308, 3.35725030544, 3.43150830196, 5.82666009926, 14.6330225498, -0.963704921350, 3.30475352149, 0.135824431576, 2.38818731746, 2.67799341696, 6.18971629783, 3.00380912726, 5.59392466674, 7.31803758939, 3.49249165404, 5.11985745270, -9.37774635473, 95.0549573511, -10.6900502580, -14.7753124299, -0.288350770806, -3.05018339346, -3.36354084830, 5.19487052725, 4.87083197795, -13.6004620130, 8.69796976280, 3.17239108681, 3.23042948793, -12.4658563158, -15.7714696397, 5.57269052947, 1.67444252606, -3.37577633747, -2.61517726585, 6.04967090955, -4.17525572483, -1.48303979002, 2.09320522335, 13.2818405765, 5.42245148490, 3.26675519699, 3.17903115692, 5.25351092114, 13.1379198417, 12.0368225525, -12.7359922823, -0.453212325349, -3.15950591385, -2.99515736580, -2.76899080156, -2.80677249714, -5.51170646267, -6.46198437092, -6.57582963161, -3.00379402614, 1.17390695484, 0.283315126158, -3.04768959184, -6.78794619835, -7.42705630041, -1.39758341021, 2.67602940790, 2.78643342225, 5.76091246408, 1.43073220478, 3.96775742616, 4.22568698788, 0.219686486452, -4.73781547117, -3.90690736715, 4.63861937546, -5.49689862569, 0.963561730308, 3.57441254429, 4.24056105166, -6.03443377457, -9.33786975830, -11.8893635232, -7.04252427141, -13.0398138120, -7.39504638297, -6.50728434006, -8.67247228685, -7.26558298022, -4.23299685560, -7.36658175599, -4.99338303655, 8.60717933673, -3.14490568256, -2.93284896764, -19.8582350703, -2.75213165922, -5.29810362710, -5.30466293646, 0.342721870139, 0.470523253304, -3.84237277717, -3.79629591723, -3.78922402605, -6.45874811277, -6.79811016906, -7.47507811941, -7.62228100824, -8.68936039712, -6.52606891117, -7.22139710446, -10.8203866155, -9.41793008863, }, { 3.81509686603, 2.43697755210, -5.55402788282, 8.35094501318, 4.82579845901, 4.96993552301, 11.0883737153, 15.2833215316, 13.6763017879, 16.5612410921, -10.6900502580, 6.94511364434, 4.96241427809, 5.08742069869, 7.18696222212, 16.5612410921, 3.32517390895, 3.53402648425, 1.92241176595, 0.606401472974, 1.19761159601, 3.53402648425, 4.68667942184, 6.98051591347, 7.18696222212, 3.32405577632, 4.90918856470, -7.53144107416, -10.6900502580, 98.7645681202, -13.2965885945, -0.928902843985, -4.44273544243, -3.82010252008, 8.83892629996, 3.80636994282, 11.0883737153, -7.53144107416, -13.2965885945, -18.8896883403, 8.35094501318, 1.02558937862, 5.08742069869, 1.53728882691, -3.81440143326, -3.41068706800, 4.96993552301, -5.29277408478, 0.691587687635, 1.19761159601, 13.6763017879, 3.32405577632, 1.36958351942, 1.53728882691, 4.90918856470, 15.2833215316, -5.55402788282, 8.38996332437, -0.928902843985, -3.81099339358, -3.78125589665, -3.81440143326, -4.44273544243, -7.03436867550, -7.03341058696, -9.33963865749, 1.15099202692, 0.606401472974, 2.43697755210, -4.86937681595, -5.72755448944, -6.53319254708, 0.493511139924, 1.15099202692, 0.691587687635, 3.32517390895, 2.78891110681, 4.68667942184, 4.96241427809, 1.36958351942, -3.78125589665, -3.49946492897, 4.82579845901, -5.33485524048, 0.493511139924, 1.92241176595, 3.81509686603, -6.40393467745, -12.4512214806, -9.79598600926, -12.4512214806, -5.72755448944, -7.03341058696, -6.35861885328, -7.53425426384, -8.67247228685, -6.40393467745, -4.86937681595, 8.38996332437, 1.02558937862, -5.33485524048, -5.29277408478, -18.8896883403, -3.81099339358, -7.03436867550, -6.26867919373, 3.80636994282, -1.38620940730, -3.49946492897, -3.41068706800, -3.82010252008, -6.26867919373, -6.35861885328, -7.93679465698, -9.79598600926, -6.53319254708, -9.33963865749, -7.93679465698, -8.67247228685, -10.7815827017, }, { -0.610894684855, 8.66481634482, 0.839919235494, 3.60249764016, -0.831516026082, -1.72833866992, -14.7625052036, 0.0688474955951, -1.05510526828, 1.17284223635, 3.17239108681, 1.42851903350, 0.624602508586, -0.523543280774, 0.313854286943, 7.54335481944, -1.52362951526, -0.486534657962, -1.92153663320, -10.7280805275, 7.75620353226, 8.03071032466, 1.78584284172, 1.80036779883, 1.83839328834, -1.18330443691, -0.424687356220, -32.3095409893, -14.7753124299, -13.2965885945, 95.5885613006, -0.775329098765, 0.401647588297, -0.737208484589, -15.0432881193, -15.3285798195, 4.72477703040, 3.84465259820, 3.27695081497, 2.67912768460, 2.94831173152, 1.56010340800, -0.518408162699, -0.0713480282070, -0.253091316952, -0.981000615935, 2.52120643985, -0.607028592293, 1.65895067518, 2.82235210499, -7.84888069700, 3.39335561421, 1.31823289283, 2.39181914006, -0.272497579815, 10.0730498543, 6.32770429109, 4.38149458079, -1.61785491827, -4.01214234100, -1.89452057505, 0.220846817197, -0.721810888033, -2.50966202192, -2.05191827869, 0.450688627235, -1.13007910406, -0.267792101053, 0.110396462681, -2.70812576928, -3.73188144194, -1.23652875064, -0.807975698449, 1.68797633181, -0.673633309049, -3.83870245603, -3.50345230039, -0.541588753301, -3.15515491248, -0.755931664233, -1.74089982198, -2.13442715547, 0.559476174582, -2.68666481829, 4.68499435657, 4.38226922329, 2.15730956894, -2.36678986350, -2.97318505675, 0.0872816773914, -0.405485447227, 0.306914586681, -0.234511347270, 0.768747418436, 0.493511139924, -1.39758341021, -2.52050917818, 4.42099749479, -1.34997010910, 2.44549621665, -1.32677197557, -1.19832194615, -14.7303964383, -1.65035733438, -0.701150313907, -1.74888357212, 2.66720371507, 2.17786885862, -1.45370351642, 0.752523437973, -2.02931849394, -4.10591299042, -1.01728261213, -0.655500619147, 0.648060105356, -1.31988516118, -2.42287091649, -1.79190636860, 0.963561730308, -0.822761627120, }, { 7.79473120283, 0.0698359663296, 2.38836929911, -0.329815234990, 1.05528116547, -0.159705863318, 0.119462679144, -14.2515233115, 2.56894077997, 4.18954888030, -0.453212325349,-0.00675287102232, -1.15408470499, -2.26824927103, 6.29032662774, -2.27483562655, -0.774776264366, -1.00719159757, -10.4459740465, -0.188438998761, 0.137554300282, 0.149580620670, 8.66578251209, 9.02880381129, -13.1120021898, -14.6112811453, -31.9189739166, -0.425236423370, -0.288350770806, -0.928902843985, -0.775329098765, 94.2552788108, -14.8356627079, -15.1465558918, -0.480848137140, -0.102612168783, -0.217621232298, 0.992142461532, -1.61785491827, -1.15480161496, 0.0824510449375, -0.324682637397, 1.72187882714, 2.73461452022, 2.76337481959, 2.63094122274, 2.76544260503, 3.75027773845, -0.0870870239659, -0.0567776177297, 0.514136212441, -9.90097087751, 1.20692085121, 1.84284292672, 9.55041595013, -1.16301986843, 0.503138444413, -0.377040242349, 5.66463862396, 7.71072711834, -1.38639355346, 0.208255474631, -3.32096648140, -3.09523932096, -0.332001041841, -2.49753689780, -0.00616635518708, 0.651265875292, 0.243514488529, -0.877376856169, 0.515781867353, -1.50142740200, 1.68797633181, -0.298831675023, 0.652888814807, -1.87628143369, -2.42952720868, -4.68783610204, -2.85326303442, -0.230667962931, -1.10748966817, -0.308055041427, -0.811815197803, -0.822099283250, -1.13007910406, 0.265231994911, 2.02872233283, 2.26535029574, 0.688957879569, -2.14215935276, 0.303358116588, 0.598478445137, 0.341986528276, 1.00101216412, 1.15099202692, 2.67602940790, 3.05921950333, -1.83309503743, 1.94203511105, -0.0846387143668, -2.03263840131, -2.27239000576, -0.379801943548, -15.2978841164, 0.982437868940, 1.83679897869, 0.277616118533, -0.354029801964, -0.532432213488, 1.12185793523, -1.83079589154, -1.08861127329, 0.625326118133, 0.00520850413772, -3.02221399632, 0.0530762724269, -0.380210961430, 0.0617025313115, -3.00379402614, -1.72460020986, }, { 8.12910672884, 0.840501237418, 2.05840148048, -0.374619659663, -0.288433360886, -1.49399239261, -1.32629124690, -18.5389743861, 4.01875400135, 2.73539255755, -2.80677249714, -2.02802672410, -1.67373580774, 8.86483341561, -6.47364612549, -3.88232908528, -1.49196964868, -4.21039938474, 9.35576439192, -0.156025669468, -1.29586693892, 0.0380088357487, -7.06529346522, 9.09063855211, 4.46226543485, 4.92079954057, -17.8574115966, -3.31243791773, -3.05018339346, -4.44273544243, 0.401647588297, -14.8356627079, 92.7853928095, -16.2402478326, 0.736566900475, 1.75832614461, -2.81004665660, -2.20778938257, -0.721810888033, 0.419196010992, -1.67990502431, 1.63743331504, -21.4912539598, -15.7388762514, -11.1390670812, 7.39312816784, 2.82072520664, 5.82889224441, -1.04954137496, -1.85841628415, -3.51454627695, -4.29947966233, 0.882177110707, -11.3978370566, -3.21798506775, -1.37163023510, -2.19163227797, -1.48564295720, -3.32096648140, -4.51946838500, -0.642532653427, 8.80731107037, 10.7779649759, 11.4159072685, 1.12338280046, 3.38103514287, -0.0870870239659, -0.876450614864, -0.0762330275188, 1.41674265601, 2.07207252862, 4.42154249574, -0.673633309049, 0.652888814807, -0.400893302745, -7.05793411218, -1.43426408258, -5.73844782065, -5.50478634897, -3.32897663818, 2.41906046605, 1.34710462072, -1.20360863110, 2.35700464670, 1.65895067518, -0.995124191103, 1.32144544549, -0.794133342961, 3.62078617725, 7.30349562037, 0.501243283029, 2.06949985359, 1.12502630644, 1.45528844758, 0.691587687635, 2.78643342225, 5.80288007867, -1.16880599602, -0.0334858524931, -1.39501835562, -2.88072342083, -2.65884432854, -2.04207166717, 1.47846360711, -15.9480158432, 3.26782880655, -0.601676628533, 1.72996653042, 1.40874140874, -0.966763684304, 0.0169954512305, 0.864511276649, 2.91476006270, 3.51830820868, -1.83170587234, 2.05301896597, 1.05158253708, 0.716863814499, -1.48303979002, -0.0424397035294, }, { 7.96997978451, -0.0789435747566, 2.13971609673, 0.0509280864459, -0.257197740859, -0.852923983700, -1.74931022596, -19.5588218250, 2.90487823575, 2.57472739991, -3.78922402605, -2.54663857301, 8.11963810962, -4.56923963793, -6.59806078449, -3.26077886935, -1.95176042081, -2.12699636533, 12.0459018356, 2.47431235715, 0.193453132463, -2.45376070600, 8.61627206225, -10.8310446324, 4.33952915306, 5.68294330736, -16.0949204373, -1.05123128530, -3.36354084830, -3.82010252008, -0.737208484589, -15.1465558918, -16.2402478326, 92.1365355516, 0.337099110791, 2.13648776433, -4.20846320503, -2.51407232447, -2.02931849394, -0.0310057129430, -2.70739810248, 1.44529123062, 2.98812055676, -1.14582454271, 7.17934350437, -12.4019770743, -16.9543023518, -12.6814395874, -1.49196964868, -3.90795863113, -3.40654646337, -4.40445015800, -10.0418795477, -0.172708307440, -5.79854447676, -6.03427973474, -3.04232718639, 4.81301106985, -1.83079589154, 1.83082030725, 10.3804109113, -2.34515277457, 0.0169954512305, 3.58769338251, 11.6325047244, 13.8527965563, -0.774776264366, -2.77795348368, -4.33004449477, 3.51366877414, 1.97189302591, 4.11048986679, -3.83870245603, -1.87628143369, -7.05793411218, -1.53071571540, -2.05718013166, -0.612057989473, -3.64730771509, -4.50485903284, 3.35790524138, 3.35728059368, -3.66840017366, 0.827377726153, -1.52362951526, -2.05981445593, -5.10130764631, 6.16196222431, 1.29179650177, 5.10925342427, 2.77259210961, 4.36501661673, 4.26622830396, 2.83654536530, 3.32517390895, 5.76091246408, 7.29488051492, -1.19922432959, -0.244222984889, -3.34650475961, -1.56432015213, -4.45236155393, -1.95883804573, 4.41797286516, 3.73619642794, -16.1553457842, -1.21452928814, 1.02050137931, 0.407242738726, -0.143948880618, 1.20436215200, 4.24731476814, 2.01415320722, 2.91896715975, -2.37033491174, 0.651472016818, 0.530475704477, 0.166041701236, -0.963704921350, 2.11615664827, }, { -0.195801329414, 7.73624059467, -1.32849163946, 2.51277142788, -1.01550367500, 0.359573676015, -16.3606587886, -1.50027454550, 0.304161354887, -3.27086927080, 5.19487052725, 1.38599815357, -0.873547681475, 0.241912282487, -0.206560379201, -3.27086927080, -2.05718013166, 9.16556607048, 2.61461575929, 11.0676035914, -7.83212364819, 9.16556607048, -1.41387342026, -0.675358718959, -0.206560379201, 1.50969080752, -0.0662381676393, -14.1007388423, 5.19487052725, 8.83892629996, -15.0432881193, -0.480848137140, 0.736566900475, 0.337099110791, 89.5751633170, -17.5987402266, -16.3606587886, -14.1007388423, -15.0432881193, 5.26249155547, 2.51277142788, 0.283448392275, 0.241912282487, -0.948512871545, 1.76478425866, -0.376870686323, 0.359573676015, -1.40296912034, -1.43426408258, -7.83212364819, 0.304161354887, 1.50969080752, -1.80231008148, -0.948512871545, -0.0662381676393, -1.50027454550, -1.32849163946, -4.05226447797, -0.480848137140, 0.733919099735, 1.31873349495, 1.76478425866, 0.736566900475, 0.586904825889, 1.50831284227, -1.39059221097, -2.42952720868, 11.0676035914, 7.73624059467, 6.33445073191, 0.0977904398822, -3.49650206722, -3.50345230039, -2.42952720868, -1.43426408258, -2.05718013166, -1.50120357998, -1.41387342026, -0.873547681475, -1.80231008148, 1.31873349495, -0.675888482944, -1.01550367500, -2.96608171915, -3.50345230039, 2.61461575929, -0.195801329414, -1.30327712967, 2.72940983215, -0.527049340161, 2.72940983215, 0.0977904398823, 1.50831284227, -1.29945312138, 2.78891110681, 1.43073220478, -1.30327712967, 6.33445073191, -4.05226447797, 0.283448392275, -2.96608171915, -1.40296912034, 5.26249155547, 0.733919099735, 0.586904825889, -0.156236616844, -17.5987402266, 0.220345800761, -0.675888482944, -0.376870686323, 0.337099110791, -0.156236616844, -1.29945312138, -3.12338044576, -0.527049340161, -3.49650206722, -1.39059221097, -3.12338044576, 1.43073220478, 0.170657990262, }, { 0.752358397718, 7.33279444374, -1.13547734156, 0.692207431452, 0.191498213269, 0.115820235337, -20.7829473955, -2.27303616948, -0.702321383383, -1.68292210904, 0.342721870139, 1.85902383774, -1.05467036139, -0.371207019862, -1.14299204712, -4.24027216807, 8.61627206225, -2.81745826544, 2.22376399657, 12.1289294635, 7.93840729882, -10.3530654949, -1.37831976503, -1.50296632734, -3.10671340685, 0.216651853125, -1.19535906150, -15.1668725173, 4.87083197795, 3.80636994282, -15.3285798195, -0.102612168783, 1.75832614461, 2.13648776433, -17.5987402266, 92.6578117154, 2.77691764137, -0.540637942149, 2.66720371507, -14.6463852485, -17.8481897204, -12.5737071842, -2.75853109518, -2.32574635157, 2.08159759315, 4.01280807894, -3.24361929777, 2.10113876234, -7.06529346522, -0.936251126037, -5.72021533230, -4.40138514720, 2.13889983533, -0.627258344381, -2.56168688630, -3.93903347767, -4.80044307096, 0.908235754809, 0.277616118533, 2.94467407897, 2.97337347268, -0.520669323459, -0.601676628533, 2.89820975974, 1.14597346545, 1.31728951722, 8.66578251209, -5.85849699332, -3.86961435551, 0.854745298683, 10.7287014056, 11.4442099056, -0.541588753301, -4.68783610204, -5.73844782065, -0.612057989473, -1.41387342026, -1.64566691985, -1.73724798100, -4.82797426774, 0.194605943195, 0.735988436246, -3.54614834121, 2.32430877087, 1.78584284172, -4.53452165872, -2.66162830552, 2.30547304932, 4.03107288934, 1.64544241710, 1.45683591274, 0.646018777457, 2.92767457208, 3.05266424708, 4.68667942184, 3.96775742616, 0.228970207248, 6.73360604526, -2.57697065912, -3.02612919136, -1.65265185841, -3.05199614679, 4.02652212184, -0.695741099095, 2.02175215248, 1.51405062145, 0.0681813707365, -15.1998571420, 1.19185087310, -2.65468288836, -1.21452928814, 2.71948844032, -0.614509431762, 2.04681763800, 1.27190685484, -3.04675227459, -0.642957914166, -1.40380767879, 3.00380912726, 2.33797744968, }, { 0.859606531259, -1.39535571638, 0.314755923607, 13.6325647973, 0.892384226942, 3.34668012401, 2.95258478977, 6.24180265424, 7.27804666997, 5.43369561992, 23.4873253383, -1.09564831427, 1.86609684761, 4.08962687016, 5.93887287961, 4.11196661190, -2.37033491174, 12.8234289622, 1.96844187389, -0.538823633149, 6.04429774214, 3.78761175390, 1.27190685484, 3.60711007986, 5.27981451917, 5.84810605862, 4.93464750296, 9.54021935880, -13.6004620130, 11.0883737153, 4.72477703040, -0.217621232298, -2.81004665660, -4.20846320503, -16.3606587886, 2.77691764137, 94.1372306530, -8.33851406616, -14.7625052036, 4.34231891950, -12.9037604338, -17.4134339546, 3.61354047806, 4.18885217231, -0.986603121024, -6.68837691359, 4.13254115806, -2.43434134683, -1.83170587234, 13.2137268024, 4.40043954301, 6.13080095654, 2.27346737812, 4.57598222658, 5.64432273403, 3.82132646761, 1.83617274451, -1.75773570496, 0.119462679144, -2.59637492575, -4.35783988847, -2.50206994411, -1.32629124690, -4.18361147861, -7.61785716243, -6.50929731674, -3.02221399632, 11.0796491579, 10.8670443194, -14.0912440427, -10.0869608861, -7.88809678529, 0.0872816773913, -2.14215935276, 7.30349562037, 5.10925342427, -0.527049340161, 1.64544241710, 2.12704020822, 2.54581189924, -2.66294670741, -8.02880140394, 3.06745698764, -3.52702931314, 0.648060105356, 2.40375639965, 2.27752614391, -3.42432463260, -7.90607148418, -5.10373631855, -5.83850222330, -3.58332670710, -3.45626513000, -8.49276272601, -9.79598600926, -11.8893635232, -3.76674627657, -4.26389011473, -3.45130216438, 10.1470993263, -3.57155025876, -1.46189605730, 0.659261570580, -0.607862524868, -3.35210644563, -5.14678983453, -20.7829473955, -2.00135462423, -4.09579126929, -2.04081972113, -1.74931022596, -4.91534081789, -8.56595466210, -7.84653437912, -7.61047757684, -5.03263931039, -5.37432696832, -6.20630988686, -7.62228100824, -6.79922199279, }, { -2.08846228834, 0.573983294049, 8.91907078347, 6.44221687032, -0.0206401687921, 2.28514157604, 9.54021935880, -5.29735570343, 15.5349777304, 12.3088134260, -9.37774635473, 7.06585597865, 3.09071169008, 5.24852905716, 7.02062231512, 6.09790724766, 2.77259210961, 13.2970436677, -0.685276785438, 2.71510318704, 5.59187838003, 3.07354155736, 1.45683591274, 2.92665381643, 4.98178812755, 5.85134547356, 6.53891567913, 9.59785708953, 8.69796976280, -7.53144107416, 3.84465259820, 0.992142461532, -2.20778938257, -2.51407232447, -14.1007388423, -0.540637942149, -8.33851406616, 102.739840617, -32.3095409893, -17.6100253304, 8.42273496448, -0.358971552026, 3.33357224677, 3.94431849865, -1.59619979390, -7.37680265761, 3.04775298559, -3.58084102688, 0.501243283029, 11.0614215636, 3.94284580098, 5.10529079514, 1.06590212299, 3.12219281403, 6.25670358802, 4.86683987463, 5.24659988964, -2.40015513230, -0.425236423370, -2.26857129554, -5.17763354174, -3.10406777656, -3.31243791773, -6.13678692008, -8.64938121805, -8.44202922569, 0.303358116589, 11.4762396034, -8.39291090002, 5.38238026713, -7.53423166744, -8.50314641749, -2.97318505675, 0.688957879569, 3.62078617726, 1.29179650177, 2.72940983215, 4.03107288934, 2.99488054707, 3.46667425859, -1.96636597240, -7.29749260730, 3.23350409469, -3.30981984540, -0.405485447228, 1.20036859623, 1.78089271632, -3.60435018208, -6.10713465110, -7.90607148418, -2.60446624975, -3.84681126387, -3.44409149145, -9.22655396238, -12.4512214806, -9.33786975830, -4.09790992519, -3.61315415637, 4.44558063180, 1.81852923469, -2.78206804744, -0.561114436965, 3.14499930424, -2.67538276240, -7.65647231212, -7.68846714904, -15.1668725173, -2.37328471558, -4.03545319173, -1.78235877809, -1.05123128530, -4.67353237935, -8.70938048563, -8.09631305473, -5.83850222330, -7.88914111836, -6.83419264548, -7.04349262793, -7.04252427141, -6.75964659113, }, { 2.15730956894, 0.110396462681, 6.32770429109, 2.94831173152, 0.559476174582, 2.52120643985, 4.72477703040, 10.0730498543, -7.84888069700, 7.54335481944, -14.7753124299, 1.42851903350, -3.15515491248, -0.518408162699, 1.83839328834, 1.17284223635, -3.83870245603, 8.03071032466, 4.38226922329, -0.267792101053, 2.82235210499, -0.486534657962, -0.541588753301, 1.80036779883, 0.313854286943, 3.39335561421, -0.272497579815, 3.84465259820, 3.17239108681, -13.2965885945, 3.27695081497, -1.61785491827, -0.721810888033, -2.02931849394, -15.0432881193, 2.66720371507, -14.7625052036, -32.3095409893, 95.5885613006, -14.7303964383, 3.60249764016, 2.44549621665, -0.523543280774, 2.39181914006, 0.220846817197, 0.752523437973, -1.72833866992, -1.19832194615, -0.673633309049, 7.75620353226, -1.05510526828, -1.18330443691, -0.755931664233, -0.0713480282071, -0.424687356220, 0.0688474955951, 0.839919235494, -1.34997010910, -0.775329098765, -1.65035733438, -1.74089982198, -0.253091316952, 0.401647588297, -0.701150313907, -0.234511347270, -2.42287091649, 1.68797633181, -10.7280805275, 8.66481634482, 4.42099749479, 0.306914586682, -1.31988516118, 4.68499435657, -1.13007910406, 1.65895067518, -1.52362951526, -3.50345230039, 1.78584284172, 0.624602508586, 1.31823289283, -1.89452057505, -1.45370351642, -0.831516026082, -1.32677197557, -0.807975698449, -1.92153663320, -0.610894684855, -2.52050917818, -0.405485447228, 0.648060105356, -2.97318505675, -3.73188144194, -2.05191827869, -1.01728261213, 0.493511139924, 0.963561730308, -2.36678986350, -2.70812576928, 4.38149458079, 1.56010340800, -2.68666481829, -0.607028592293, 2.67912768460, -4.01214234100, -2.50966202192, -4.10591299042, -15.3285798195, 2.17786885862, -2.13442715547, -0.981000615935, -0.737208484589, -1.74888357212, 0.768747418436, -1.79190636860, 0.0872816773914, -1.23652875064, 0.450688627235, -0.655500619147, -1.39758341021, -0.822761627120, }, { 2.86356084676, -0.491483243017, 7.13294881956, 0.934777145256, 2.87309717622, 1.19191624916, 0.659261570580, 8.54277559021, 9.88998691768, -9.39177531702, -19.8582350703, 2.31078513921, 1.72765665257, -0.344176823369, -4.19956382234, -4.40884437221, 12.0459018356, -5.30094184162, 3.56684831254, 0.829071607073, -0.230362026411, -0.850722933852, 2.22376399657, -1.69920580331, -0.622281335680, -0.0859737999384, -1.36735936182, 3.14499930424, 3.23042948793, -18.8896883403, 2.67912768460, -1.15480161496, 0.419196010992, -0.0310057129430, 5.26249155547, -14.6463852485, 4.34231891950, -17.6100253304, -14.7303964383, 92.4347819176, -15.5611255551, -11.7602653513, -1.08325212653, -0.0647828994834, -1.77000131659, 2.26290931654, -2.67053226402, 3.47037493945, 9.35576439192, -4.87087529660, -2.27640071874, -2.18365247431, -1.11372675128, -1.30237338382, -3.07743593625, -3.31927402712, -1.25286666352, 2.38263262964, -0.379801943548, 1.87872915877, -1.38754417573, -2.00355051992, -2.04207166717, 1.28248388672, 0.00817510064863, 1.87942139897, -10.4459740465, -4.10554906252, -5.02467448805, 0.592951516896, 11.7288926780, 12.9423641628, 4.38226922329, 0.265231994911, -0.995124191103, -2.05981445593, 2.61461575929, -4.53452165872, -3.29390863627, -0.0139864204816, -0.771434475411, 2.89791410635, -5.15925382175, 1.93512326132, -1.92153663320, -2.98718992499, -4.43349551400, 2.87699128121, 1.20036859623, 2.40375639965, -0.685276785438, -6.40891589527, -0.233985776625, 2.99608668066, 1.92241176595, 3.57441254429, -0.546162441077, -2.15700853736, 5.17250072782, -1.48444614454, -1.11357560461, -2.53679733505, 0.960378711611, -4.73130890527, -1.91084817595, -1.91776405385, 4.02652212184, -14.8400567409, -1.09661117536, -1.66259948970, -1.95883804573, 2.22998910694, 0.261943941164, 2.37060247004, 1.96844187389, -1.20420235933, 1.57698579440, 0.625586580876, 0.135824431576, 1.77926900938, }, { -0.548063667065, 0.723831726613, 0.795755172129, 13.1815685886, -0.503684885921, 2.24103669192, 13.6325647973, -0.338532291702, 1.39551041680, 5.44273872863, -0.0679883047309, 0.514937591235, 0.111484934528, 2.38840824158, 4.32886732400, 2.55730386708, 7.29488051492, 1.03203693157, -0.546162441077, 3.19550859524, 2.06849456445, 5.34531479332, 0.228970207248, 2.52173697735, 3.66237190690, 4.83644746149, 3.17949645052, 6.44221687032, -12.4658563158, 8.35094501318, 2.94831173152, 0.0824510449375, -1.67990502431, -2.70739810248, 2.51277142788, -17.8481897204, -12.9037604338, 8.42273496448, 3.60249764016, -15.5611255551, 96.4300399384, -35.4362488569, 2.94636891811, 3.69530622097, -1.37002058804, -3.93793507938, 2.61336859710, -3.44918321285, 5.80288007867, 1.02899668126, 3.11372650764, 5.39916098902, -0.838740155361, 1.99892364104, 4.26729074902, 1.88099997551, 1.54283271895, -2.88446862464, -0.329815234990, -2.12754545184, -3.39699380325, -0.288593708110, -0.374619659663, -3.04136462819, -5.59032944961, -2.11136224508, 3.05921950333, 0.466615290388, 2.03244291996, -2.23364079297, 3.95300330661, -13.9285718417, -2.36678986350, 2.26535029574, -0.794133342961, 6.16196222431, -1.30327712967, 2.30547304932, 1.54681324423, 2.92211067478, -1.99850697532, -4.08938603508, 1.53038477142, -4.37094940786, -2.52050917818, 2.87699128121, 1.74181938409, -3.95123677566, -3.60435018208, -3.42432463260, -4.09790992519, -1.82528689767, -1.43305365901, -7.18637400837, -6.40393467745, -6.03443377457, -3.12036899949, -3.64547457306, -2.54840826787, 8.87802925086, -3.31540906326, -0.299951186682, 0.934777145256, -0.222808488642, -2.90899564007, -4.34479292116, 0.692207431452, -21.4030642441, -4.48756391546,-0.00969180416605, 0.0509280864458, -4.11294492957, -6.87236432478, -3.20809872200, -3.76674627657, -3.52437410739, -3.16798642674, -4.27079623153, -4.23299685560, -3.80182453265, }, { 1.95882504879, 1.68554765668, 1.25294322978, 8.87802925086, 1.30130103982, 0.247177449112, 10.1470993263, 1.16047660536, 1.88772939286, -1.43661669760, 8.60717933673, -29.6934146419, 0.663691969363, 0.171732966065, -0.817545630271, -2.90571696531, 7.96997978451, -3.25072542614, 2.86356084676, 1.62075751509, 1.39656074305, -1.41314885590, 0.752358397718, -1.00718051189, -0.983369342872, 1.02605720546, 0.100981600673, 1.81852923469, -15.7714696397, 1.02558937862, 1.56010340800, -0.324682637397, 1.63743331504, 1.44529123062, 0.283448392274, -12.5737071842, -17.4134339546, -0.358971552026, 2.44549621665, -11.7602653513, -35.4362488569, 101.702796460, -2.05132354587, 0.317009408644, -1.21391220419, 3.58974770676, -4.19712666694, 3.01521299803, 8.12910672884, -4.14858224039, -4.09070881500, -1.74931105086, 1.08285467559, 0.121673303444, -1.83014139735, -3.96687513396, -5.36799149000, 3.47959864133, -0.0846387143668, 2.16993674850, -0.208344798672, -1.38665779695, -1.39501835562, 2.01281383095, 1.93731693654, 1.39654183047, 7.79473120283, -6.05454160848, -6.65812491595, 2.04238410188, -8.41395982155, 12.5879849047, 2.15730956894, 2.02872233283, 1.32144544549, -5.10130764631, -0.195801329414, -2.66162830552, -1.90101638341, 0.0967280348665, -1.55906670230, 2.43658406577, -4.77986206737, 2.28539648409, -0.610894684855, -4.43349551400, -4.26269341359, 1.74181938409, 1.78089271632, 2.27752614391, -2.08846228834, -2.88743618262, -5.44848887444, 2.17703943527, 3.81509686603, 4.24056105166, -0.548063667065, -2.05424388182, -2.90550450174, 5.44933609520, -1.07761585802, -2.34887107486, -1.48444614454, -2.13068687021, 0.835336974273, 1.01893534483, -3.02612919136, -13.8647322686, -1.16278277850, -3.80493410954, -3.34650475961, 1.70972351290, 2.22704751677, 1.61928012390, 0.859606531259, 0.590633792225, 1.26843494328, 0.788072126217, 1.72684525309, 1.90846053913, }, { -1.16278277850, 0.405950073013, 4.75341046185, 2.38840824158, -1.87300467473, 7.92839152050, 4.08962687016, 6.66691905449, 8.51096261755, -12.2432643529, 3.43150830196, 3.95757418947, -2.62487054875, 3.45654007290, 11.4112320403, 11.9233162716, 0.407242738726, 0.783079248832, -1.09661117536, 0.580982753522, 1.92792536871, 5.69324816715, 1.19185087310, 2.77936969810, -10.9696196737, 9.26811669461, 7.33859822326, 5.24852905716, 5.57269052947, 5.08742069869, -0.518408162699, 1.72187882714, -21.4912539598, 2.98812055676, 0.241912282487, -2.75853109518, 3.61354047806, 3.33357224677, -0.523543280774, -1.08325212653, 2.94636891811, -2.05132354587, 92.9081609273, -12.0586768221, -18.8945373099, 5.54952664487, -10.6187303080, -18.3575303507, 1.40874140874, 3.70110750688, 0.677327563698, -0.242624434201, -2.07282329380, 10.0677163024, 1.22098483369, 1.51214093103, 2.85356476469, -1.92029423174, -2.26824927103, -0.979733462898, -4.22320070153, 7.58738509851, 8.86483341561, -10.5458301759, -4.36964974991, -5.41431685967, -0.532432213488, 2.16723095516, 1.71359022390, -2.07073322809, -3.49052670024, -4.19782340310, -2.13442715547, -0.308055041427, 1.34710462072, 3.35728059368, -0.675888482944, 0.735988436246, 5.95579816464, 3.60317294936, -5.64241517623, -3.59775002064, 3.90350490143, -6.24502277907, -1.45370351642, 2.89791410635, 2.43658406577, -4.08938603508, -7.29749260730, -8.02880140394, -4.03545319173, -2.92596621497, -2.53196272433, -4.23601380227, -3.49946492897, -3.90690736715, -4.48756391546, -2.30497741046, 2.55767805912, 0.171732966065, -4.31705493911, 5.99953633686, -0.344176823369, 1.78263563452, -21.0330481220, 1.73375230332, -0.371207019862, -3.45806031990, -1.17578717837, -5.42499548254, -4.56923963793, -5.67174203167, -3.19563732100, -4.70358055171, -4.09579126929, -3.08366691349, -3.12264250823, -5.08978296436, -3.84237277717, -4.80906526575, }, { -0.208344798672, 0.827827410776, 4.62640633331, 1.99892364104, 6.70357901341, -0.330263365747, 4.57598222658, 6.95343835880, -11.2505893766, 7.91720330292, 3.17903115692, 3.37243472607, -9.04793938552, 10.0677163024, 0.823733923179, 1.07416732004, 10.3804109113, 9.16691233076, -1.38754417573, -0.295170575584, 2.25917246856, 4.67724015175, 2.97337347268, 0.888231594353, 6.65935094182, -12.2102995519, 6.06537020449, 3.12219281403, 1.67444252606, 1.53728882691, -0.0713480282071, 2.73461452022, -15.7388762514, -1.14582454271, -0.948512871545, -2.32574635157, 4.18885217231, 3.94431849865, 2.39181914006, -0.0647828994834, 3.69530622097, 0.317009408644, -12.0586768221, 97.5106165352, -34.1516756924, -19.3172377973, 3.72198225871, 3.18700577505, -0.642532653427, 1.41439353302, 1.06752938523, 1.32288537996, 1.18069247113, 6.93429729132, 3.10256892136, 3.37896290047, 1.23620042522, -1.79665727600, 1.84284292672, -2.18819474404, -0.586681818738, 7.45957428690, -11.3978370566, 4.48066186429, -2.79810435903, -3.07052267766, -1.38639355346, 1.04860798325, 0.301302209952, -2.98199746189, -4.39348055773, -5.04394247808, -1.74089982198, -1.10748966817, 2.41906046605, 3.35790524138, 1.31873349495, 0.194605943195, 2.14946668185, 1.33472273249, -3.22786966042, -5.64241517623, 0.719583277667, 3.33342800563, -1.89452057505, -0.771434475411, -1.55906670230, -1.99850697532, -1.96636597240, -2.66294670741, -5.17763354174, -3.96916466957, -5.35965896485, -3.08262042966, -3.78125589665, -4.73781547117, -3.39699380325, -3.11650166621, 2.74121610464, 0.121673303444, 3.37785124710, -2.20848872348, -1.30237338382, 1.65480029254, -18.0169750810, -0.768481463569, -0.627258344381, -2.70772471001, -4.22320070153, -2.54666298514, -0.172708307440, -3.96373655670, -6.28473382085, -6.02998849958, -4.35783988847, -3.21707086342, -4.11852072757, -1.78446843887, -2.99515736580, -3.35179369511, }, { 1.08285467559, 1.55270079570, 3.11848761998, -0.288593708110, 6.85809515971, -1.77477694233, -2.50206994411, 1.20670176701, -16.9846587415, 2.48195738147, -2.76899080156, -2.02151439206, 9.13690958564, 7.58738509851, -4.70149806626, -3.82849120087, -10.0418795477, 5.60836397767, -1.11372675128, -0.201661053047, -2.64461858054, -0.624657997254, 2.13889983533, -0.726464919442, 1.03529123844, -18.0786209612, 0.532469675084, -3.10406777656, -3.37577633747, -3.81440143326, -0.253091316952, 2.76337481959, -11.1390670812, 7.17934350437, 1.76478425866, 2.08159759315, -0.986603121024, -1.59619979390, 0.220846817197, -1.77000131659, -1.37002058804, -1.21391220419, -18.8945373099, -34.1516756924, 97.9279254243, -11.3999775314, 4.70409238607, 4.66367182442, 0.882177110707, -2.78247617573, -2.68209384482, -4.32478909853, -1.41292452560, 7.45957428690, -4.94217489682, -4.27782577163, -2.67167545957, 0.909198892731, 0.208255474631, 0.292564966958, 1.18069247113, -11.5051519493, 8.80731107037, 8.64381642659, 1.01326108039, 0.0849587942870, 1.20692085121, -2.48488946318, -2.29004601420, 0.831206512909, 3.59856635699, 2.73971784574, -0.755931664233, -0.230667962931, -3.32897663818, -4.50485903284, -1.80231008148, -4.82797426774, -8.65304489492, -3.16965487642, 1.33472273249, 3.60317294936, 2.62950027646, -1.03526516990, 1.31823289283, -0.0139864204816, 0.0967280348665, 2.92211067478, 3.46667425859, 2.54581189924, 1.06590212299, 1.81135952795, 0.821853551219, 2.25691717471, 1.36958351942, 0.219686486452, -0.838740155361, -0.0946103506733, 0.448765444898, -1.38665779695, 5.75150332245, -3.29214336856, -2.00355051992, 0.279843608035, -12.7497104077, 4.85576722241, -0.520669323459, 0.657839132651, -2.07282329380, -1.13586621270, -2.34515277457, 0.493403977793, 1.12394241249, -0.580323425396, 2.27346737812, 2.71151189023, 1.61158816726, 3.62606894482, 3.26675519699, 2.02183256873, }, { 0.663691969363, 1.06176307263, 3.20833846878,-0.00969180416605, 7.51502639263, -1.78976586390, -2.04081972113, 1.18570542996, -18.3629095634, 1.55758494558, -3.79629591723, -3.35031062359, 18.2660662821, -5.42499548254, -4.03303910361, -3.78271517431, 8.11963810962, -10.9041161162, 1.72765665257, 1.60500993770, -0.901028953118, -3.18226111466, -1.05467036139, -1.28902728442, 2.34564145219, -17.7214813554, 1.35133816440, -1.78235877809, -2.61517726585, -3.41068706800, -0.981000615935, 2.63094122274, 7.39312816784, -12.4019770743, -0.376870686323, 4.01280807894, -6.68837691359, -7.37680265761, 0.752523437973, 2.26290931654, -3.93793507938, 3.58974770676, 5.54952664487, -19.3172377973, -11.3999775314, 96.2328823514, -18.0301307705, -10.8751916175, -1.67373580774, -2.74395919415, -3.83821499890, -3.38273805882, 9.13690958564, -2.54666298514, -3.62453739721, -3.06099501395, -1.88530104907, 2.11540301866, 1.12185793523, 0.897125204738, -9.04793938552, -1.13586621270, -0.966763684304, -0.158319857919, 11.3982255953, 10.3977310850, -1.15408470499, -2.98679387144, -1.71528642262, 2.00594589649, 1.63364398023, 0.660741621798, -3.15515491248, -2.85326303442, -5.50478634897, -3.64730771509, -0.873547681475, -1.73724798100, -2.69413426189, -8.65304489492, 2.14946668185, 5.95579816464, -6.22632330604, 3.81386715783, 0.624602508586, -3.29390863627, -1.90101638341, 1.54681324423, 2.99488054707, 2.12704020822, 3.09071169008, 3.18541284620, 2.68655900288, 4.09190734571, 4.96241427809, 4.22568698788, 0.111484934528, 0.248275334921, 0.842927830720, -3.80493410954, 6.43466143584, -4.42205372104, -1.66259948970, 2.37222909638, 7.54195229339, -14.7745897265, -2.65468288836, 1.65867317606, -2.62487054875, -1.03267698428, -0.143948880618, 2.84939790460, -0.175364901065, -0.497817484562, 1.86609684761, 2.34670913657, 1.97210592684, 3.01638553195, 3.35725030544, 2.61850268380, }, { -1.07761585802, -0.0823657666344, 3.72152299620, 2.24103669192, -1.29869010121, 8.01997590090, 3.34668012401, 4.96574729528, 7.19934538749, -11.6729786631, 2.76355973272, 3.97585019365, 6.43466143584, 7.92839152050, -7.09732086170, 13.3534507787, -1.56432015213, 3.03302590491, -1.11357560461, 1.55050062551, 4.62879146440, 1.73634316499, -1.65265185841, 3.04187382428, -11.2385279478, 4.27517288855, 2.28500868480, 2.28514157604, 6.04967090955, 4.96993552301, 2.52120643985, 2.76544260503, 2.82072520664, -16.9543023518, 0.359573676015, -3.24361929777, 4.13254115806, 3.04775298559, -1.72833866992, -2.67053226402, 2.61336859710, -4.19712666694, -10.6187303080, 3.72198225871, 4.70409238607, -18.0301307705, 98.0986307305, -36.2386704698, -2.88072342083, 1.10735995817, 2.96750226889, 3.85417816513, 5.75150332245, -0.330263365747, 4.35351409207, 3.36886108025, 1.89214896281, -4.56409239301, -0.159705863318, -0.973849166874, 3.37785124710, -1.77477694233, -1.49399239261, -2.99859433160, 6.34108150200, -13.1943048089, -2.03263840131, 1.12297208977, 3.51750054562, -2.85350911338, -3.78301578534, -1.97808516555, -2.68666481829, -0.822099283250, 2.35700464670, 0.827377726153, -2.96608171915, 2.32430877087, 3.81386715783, -1.03526516990, 3.33342800563, -6.24502277907, 1.77456287105, -5.22527665799, -1.32677197557, 1.93512326132, 2.28539648409, -4.37094940786, -3.30981984540, -3.52702931314, -2.78206804744, -0.402406864486, 0.888583249480, -4.33829916575, -5.33485524048, -5.49689862569, -3.31540906326, -2.56428697012, 2.16874029149, 0.247177449112, -4.73421493710, 6.12522600352, 1.19191624916, 1.88972013476, 0.702694944772, -18.1647344400, 0.115820235337, -4.74087329353, -4.31705493911, -1.78976586390, -0.852923983700, -6.13796778300, -4.77212084362, -2.90566379430, -3.57155025876, -2.90479889313, -1.63606896922, -3.99370888359, -3.14490568256, -3.31381710689, }, { 1.30130103982, 0.613440673968, 2.87816600487, -0.299951186682, 0.339061376455, 6.12522600352, -1.46189605730, 1.30519160208, 2.52869602862, -16.7634577374, -2.93284896764, -2.00425841399, 7.51502639263, 5.99953633686, 6.35850336621, -11.9243045226, -0.257197740859, -1.48524032158, 2.87309717622, 0.429846443576, 0.618454666887, -2.77501741267, 0.191498213268, -1.74755203283, -17.3542721770, 5.30877759488, 3.91173751298, -0.561114436965, -4.17525572483, -5.29277408478, -0.607028592293, 3.75027773845, 5.82889224441, -12.6814395874, -1.40296912034, 2.10113876234, -2.43434134683, -3.58084102688, -1.19832194615, 3.47037493945, -3.44918321285, 3.01521299803, -18.3575303507, 3.18700577505, 4.66367182442, -10.8751916175, -36.2386704698, 98.2195915061, -0.288433360886, -4.73280164616, -1.61502794398, -4.70370169779, 6.85809515971, -2.20848872348, -3.78092960240, -0.537906001096, -2.36940709009, 3.27367538387, -2.27239000576, 1.65442854956, 6.70357901341, -3.29214336856, -2.65884432854, 1.96270324942, -7.23976744124, 11.9416522898, 1.05528116547, -2.55234384466, -4.22796727586, 1.32988350128, 4.27652301649, 2.06125308493, 0.559476174582, -0.811815197803, -1.20360863110, -3.66840017366, -1.01550367500, -3.54614834121, -6.22632330604, 2.62950027646, 0.719583277667, 3.90350490143, -5.34623743353, 1.77456287105, -0.831516026082, -5.15925382175, -4.77986206737, 1.53038477142, 3.23350409469, 3.06745698764, -0.0206401687921, -1.77820375188, 0.266964585737, 1.39081975589, 4.82579845901, 4.63861937546, -0.503684885921, -0.818593816318, 0.516993015810, -2.34887107486, -1.29869010121, 2.94669958734, -2.53679733505, 1.63938994047, 4.48072367247, -12.6457044171, -3.05199614679, 1.70988267819, -1.87300467473, -4.42205372104, -4.45236155393, 0.124039501753, 3.95791893946, 1.77152941632, 0.892384226942, 0.934294689249, 2.93182498382, 1.17416486145, 2.76659868630, 2.64266037378, }, { 1.63743331504, -1.48564295720, 1.41674265601, -0.794133342961, 5.82889224441, 2.35700464670, 7.30349562037, 4.42154249574, 3.38103514287, 3.51830820868, 2.78643342225, -0.0424397035294, 7.39312816784, 1.34710462072, 1.45528844758, 0.716863814499, -16.2402478326, 3.26782880655, 0.419196010992, -4.51946838500, 11.4159072685, 0.864511276649, 1.75832614461, 1.72996653042, 2.91476006270, 1.12338280046, 2.07207252862, 3.62078617726, -1.48303979002, 0.691587687635, 1.65895067518, -0.0870870239659, -1.04954137496, -1.49196964868, -1.43426408258, -7.06529346522, -1.83170587234, 0.501243283029, -0.673633309049, 9.35576439192, 5.80288007867, 8.12910672884, 1.40874140874, -0.642532653427, 0.882177110707, -1.67373580774, -2.88072342083, -0.288433360886, 92.7853928095, -15.9480158432, 1.05158253708, 1.12502630644, -11.1390670812, 2.41906046605, 2.06949985359, 2.05301896597, -1.16880599602, 0.840501237418, 0.652888814807, -0.156025669468, -15.7388762514, -3.32897663818, -0.400893302745, -1.29586693892, 4.92079954057, 4.01875400135, -14.8356627079, 1.47846360711, -0.0334858524931, 2.05840148048, -17.8574115966, -18.5389743861, -0.721810888033, -3.32096648140, 10.7779649759, 0.0169954512305, 0.736566900475, -0.601676628533, -0.966763684304, 8.80731107037, -11.3978370566, 8.86483341561, -2.65884432854, -1.49399239261, 0.401647588297, -2.04207166717, -1.39501835562, -0.374619659663, -3.31243791773, -1.32629124690, -2.20778938257, -3.21798506775, -4.29947966233, -6.47364612549, -4.44273544243, -2.80677249714, -1.67990502431, -2.19163227797, -0.0762330275188, 1.32144544549, 2.82072520664, -1.20360863110, -0.995124191103, -0.876450614864, -1.85841628415, -4.21039938474, -5.73844782065, 9.09063855211, -21.4912539598, -5.50478634897, -7.05793411218, 0.0380088357487, 4.46226543485, 2.73539255755, -2.81004665660, -1.37163023510, -3.51454627695, -3.88232908528, -3.05018339346, -2.02802672410, }, { 0.835336974273, -2.35072651678, -0.940801877032, 2.06849456445, 4.48072367247, 4.62879146440, 6.04429774214, 4.61452225228, 4.05940570669, 8.26954420328, 2.67799341696, 4.15892129831, 7.54195229339, 1.92792536871, 2.87287451220, 3.00527857918, 3.73619642794, -14.3750955712, -1.91084817595, -3.19998558894, 11.0067261524, 2.99133463145, 2.02175215248, 3.44568326186, 4.70811456921, 2.13910789756, 2.69155885333, 5.59187838003, 2.09320522335, 1.19761159601, 2.82235210499, -0.0567776177297, -1.85841628415, -3.90795863113, -7.83212364819, -0.936251126037, 13.2137268024, 11.0614215636, 7.75620353226, -4.87087529660, 1.02899668126, -4.14858224039, 3.70110750688, 1.41439353302, -2.78247617573, -2.74395919415, 1.10735995817, -4.73280164616, -15.9480158432, 92.7490309898, 3.61855263797, 3.05273950099, -12.7497104077, 2.25917246856, 3.49246198396, 4.07022363329, 2.93931202527, -2.15868159775, 0.137554300282, -1.53452144760, -18.0169750810, -2.64461858054, -1.29586693892, -2.50996423442, 1.21387395923, 5.02034622785, 0.982437868940, -15.7905603561, -12.3582958452, -18.0874436684, -3.79742931057, 0.846182241218, -2.50966202192, -3.09523932096, 11.4159072685, 3.58769338251, 0.586904825889, 2.89820975974, -0.158319857919, 8.64381642659, 4.48066186429, -10.5458301759, 1.96270324942, -2.99859433160, -0.701150313907, 1.28248388672, 2.01281383095, -3.04136462819, -6.13678692008, -4.18361147861, -7.65647231212, -3.88179659482, -7.34212250355, -3.76698308645, -7.03436867550, -5.51170646267, -2.90899564007, -2.75719522516, 1.81968452702, 1.39656074305, 0.702694944772, 0.618454666887, -0.230362026411, -1.46089485254, -2.73796049663, -6.71315349486, 7.93840729882, -5.25391663395, -21.0330481220, -0.901028953118, 0.193453132463, -5.14903647973, -3.89444925619, -0.0438466036696, -3.35210644563, -2.10738078932, -6.23340209851, -4.43922102010, -5.29810362710, -4.21925717124, }, { 1.26843494328, -5.88796619628, 0.0209809415685, 1.39551041680, 2.93182498382, 7.19934538749, 7.27804666997, 5.64722424249, 7.36241256775, 6.85570362359, 6.14401133253, 5.80496011766, 1.97210592684, 8.51096261755, 6.80378366108, -12.6839240768, 0.530475704478, 2.26907424018, 1.57698579440, -1.37410684853, 4.05940570669, 14.8468941777, -0.642957914166, 2.72936358630, 3.47335810570, 4.15777877683, 2.52357226846, 15.5349777304, 13.2818405765, 13.6763017879, -7.84888069700, 0.514136212441, -3.51454627695, -3.40654646337, 0.304161354887, -5.72021533230, 4.40043954301, 3.94284580098, -1.05510526828, -2.27640071874, 3.11372650763, -4.09070881500, 0.677327563698, 1.06752938523, -2.68209384482, -3.83821499890, 2.96750226889, -1.61502794398, 1.05158253708, 3.61855263797, 96.4518701114, -12.0089431300, 1.61158816726, -11.2505893766, 7.21247353087, -11.4937924601, -10.4179101369, -17.3220171221, 2.56894077997, 3.79095739238, -4.11852072757, -16.9846587415, 4.01875400135, 5.02034622785, -6.01767315498, -3.20219830206, -0.380210961430, 2.17686565290, 2.46532995184, -3.63980243567, -9.94818435373, -6.72390343177, 0.450688627235, -2.49753689780, 3.38103514287, 13.8527965563, -1.39059221097, 1.31728951722, 10.3977310850, 0.0849587942869, -3.07052267766, -5.41431685967, 11.9416522898, -13.1943048089, -2.42287091649, 1.87942139897, 1.39654183047, -2.11136224508, -8.44202922569, -6.50929731674, -6.83419264548, -4.70767664646, -7.00279693580, -7.33354399261, -9.33963865749, -6.57582963161, -3.16798642674, -2.09613711355, 0.545331558958, 1.88772939286, -1.63606896922, 2.52869602862, 9.88998691768, -2.30163312917, -6.23340209851, -3.86241095315, -0.702321383383, -6.49664214697, -3.12264250823, -18.3629095634, 2.90487823575, -0.479123945235, -8.74645850396, -9.62141229527, -5.37432696832, -4.05435495795, -6.61848412260, -6.19424392149, -6.52606891117, -4.70076357543, }, { -5.44848887444, 0.116066517666, 1.34264207773, 4.83644746149, 0.266964585737, 4.27517288855, 5.84810605862, 2.18987516681, 4.15777877683, 3.23790008991, 3.49249165404, 5.64316448556, 2.68655900288, 9.26811669461, -12.0020462898, 9.42849253750, 4.26622830396, 4.82287665170, -0.233985776625, 1.14479443151, 2.13910789756, 12.5784802369, 2.92767457208, 1.57770453761, 14.1327613027, 15.1580747943, 13.8048763306, 5.85134547356, 5.42245148490, 3.32405577632, 3.39335561421, -9.90097087751, -4.29947966233, -4.40445015800, 1.50969080752, -4.40138514720, 6.13080095654, 5.10529079514, -1.18330443691, -2.18365247431, 5.39916098902, -1.74931105086, -0.242624434201, 1.32288537996, -4.32478909853, -3.38273805882, 3.85417816513, -4.70370169779, 1.12502630644, 3.05273950099, -12.0089431300, 94.7298696159, 0.821853551219, -12.2102995519, -8.61710023958, 11.7034791276, 7.85572434880, 0.926481665246, -14.6112811453, -18.7096452661, -5.35965896485, -18.0786209612, 4.92079954057, 1.21387395923, -6.28804067827, -6.01767315498, 0.341986528276, 2.60278409476, 3.72182254444, -2.42109281648, -7.06730433692, -7.35459035667, -2.05191827869, -0.332001041841, 1.12338280046, 11.6325047244, 1.50831284227, 1.14597346545, 11.3982255953, 1.01326108039, -2.79810435903, -4.36964974991, -7.23976744124, 6.34108150200, -0.234511347270, 0.00817510064861, 1.93731693654, -5.59032944961, -8.64938121805, -7.61785716243, -3.44409149145, -6.47950333593, -8.41736996603, -7.81212664565, -7.03341058696, -6.46198437092, -1.43305365901, -3.77733627693, -2.37331479701, 1.02605720546, 0.888583249480, 5.30877759488, -0.0859737999384, 7.59505512494, -7.34212250355, -5.52024849453, 0.216651853125, -5.75346587156, -2.53196272433, -17.7214813554, 5.68294330736, -3.35219702054, -11.4856321658, -7.15385672093, -3.45626513000, -5.70466629849, -7.00279693580, -6.93544144105, -7.39504638297, -5.73626900280, }, { -1.21391220419, 0.909198892731, 0.831206512909, 2.92211067478, 4.66367182442, -1.03526516990, 2.54581189924, 2.73971784574, 0.0849587942870, -0.580323425396, 0.219686486452, 2.02183256873, -11.3999775314, 3.60317294936, 2.25691717471, 3.62606894482, 7.17934350437, 4.85576722241, -1.77000131659, 0.292564966958, 8.64381642659, 0.493403977793, 2.08159759315, 0.657839132651, 1.12394241249, 1.01326108039, 3.59856635699, 3.46667425859, 3.26675519699, 1.36958351942, 1.31823289283, 1.20692085121, 0.882177110707, -10.0418795477, -1.80231008148, 2.13889983533, 2.27346737812, 1.06590212299, -0.755931664233, -1.11372675128, -0.838740155361, 1.08285467559, -2.07282329380, 1.18069247113, -1.41292452560, 9.13690958564, 5.75150332245, 6.85809515971, -11.1390670812, -12.7497104077, 1.61158816726, 0.821853551219, 97.9279254243, 1.33472273249, 1.81135952795, 2.71151189023, -0.0946103506732, 1.55270079570, -0.230667962931, -0.201661053047, -34.1516756924, -3.16965487642, -3.32897663818, -2.64461858054, -18.0786209612, -16.9846587415, 2.76337481959, 0.279843608035, 0.448765444898, 3.11848761998, 0.532469675084, 1.20670176701, 0.220846817197, 0.208255474631, 8.80731107037, -2.34515277457, 1.76478425866, -0.520669323459, -1.13586621270, -11.5051519493, 7.45957428690, 7.58738509851, -3.29214336856, -1.77477694233, -0.253091316952, -2.00355051992, -1.38665779695, -0.288593708110, -3.10406777656, -2.50206994411, -1.59619979390, -4.94217489682, -4.32478909853, -4.70149806626, -3.81440143326, -2.76899080156, -1.37002058804, -2.67167545957, -2.29004601420, 0.0967280348665, 4.70409238607, 2.62950027646, -0.0139864204816, -2.48488946318, -2.78247617573, 5.60836397767, -4.82797426774, -0.726464919442, -18.8945373099, -8.65304489492, -4.50485903284, -0.624657997254, 1.03529123844, 2.48195738147, -0.986603121024, -4.27782577163, -2.68209384482, -3.82849120087, -3.37577633747, -2.02151439206, }, { -1.55906670230, 0.301302209952, 1.23620042522, 3.69530622097, 0.719583277667, 3.72198225871, 4.18885217231, 3.37896290047, 1.06752938523, 1.07416732004, 1.67444252606, 3.37243472607, 2.14946668185, -12.0586768221, 6.65935094182, 7.91720330292, 3.35790524138, 4.67724015175, -0.771434475411, 1.04860798325, 1.41439353302, 9.16691233076, 0.194605943195, 0.888231594353, 0.823733923179, 1.32288537996, 3.10256892136, 3.94431849865, 3.17903115692, 1.53728882691, 2.39181914006, 1.84284292672, -11.3978370566, -0.172708307440, -0.948512871545, -0.627258344381, 4.57598222658, 3.12219281403, -0.0713480282071, -1.30237338382, 1.99892364104, 0.121673303444, 10.0677163024, 6.93429729132, 7.45957428690, -2.54666298514, -0.330263365747, -2.20848872348, 2.41906046605, 2.25917246856, -11.2505893766, -12.2102995519, 1.33472273249, 97.5106165352, 6.06537020449, 6.95343835880, 4.62640633331, 2.74121610464, 2.73461452022, 1.65480029254, -3.22786966042, -34.1516756924, -15.7388762514, -18.0169750810, -5.35965896485, -4.11852072757, -1.10748966817, -0.295170575584, 0.827827410776, -3.11650166621, -3.96916466957, -3.21707086342, -1.89452057505, -1.38639355346, -0.642532653427, 10.3804109113, 1.31873349495, 2.97337347268, -9.04793938552, 1.18069247113, -0.586681818738, -4.22320070153, 6.70357901341, 3.37785124710, -1.74089982198, -1.38754417573, -0.208344798672, -3.39699380325, -5.17763354174, -4.35783988847, -1.96636597240, -4.39348055773, -2.79810435903, -6.28473382085, -3.78125589665, -2.99515736580, -1.99850697532, -2.98199746189, -1.79665727600, 0.317009408644, 3.33342800563, 3.18700577505, -0.0647828994834, -2.18819474404, 4.48066186429, -3.96373655670, -2.32574635157, -2.70772471001, -5.64241517623, -19.3172377973, -1.14582454271, -0.768481463569, -3.08262042966, -1.78446843887, -2.66294670741, -5.04394247808, -3.07052267766, -6.02998849958, -4.73781547117, -3.35179369511, }, { -2.88743618262, 2.59871803433, 2.90077588087, 3.17949645052, -1.77820375188, 2.28500868480, 4.93464750296, 4.91037153642, 2.52357226846, 2.33851044078, 5.11985745270, 5.36585346694, 3.18541284620, 7.33859822326, -7.46208658743, 9.29575996071, 4.36501661673, 5.49448637986, -6.40891589527, 1.48147473050, 2.69155885333, 2.44550709798, 0.646018777457, 10.7075152535, 11.2369380302, 13.8048763306, -5.21236288663, 6.53891567913, 5.25351092114, 4.90918856470, -0.272497579815, 9.55041595013, -3.21798506775, -5.79854447676, -0.0662381676393, -2.56168688630, 5.64432273403, 6.25670358802, -0.424687356220, -3.07743593625, 4.26729074902, -1.83014139735, 1.22098483369, 3.10256892136, -4.94217489682, -3.62453739721, 4.35351409207, -3.78092960240, 2.06949985359, 3.49246198396, 7.21247353087, -8.61710023958, 1.81135952795, 6.06537020449, 102.873000337, -8.29754156395, 6.91329582535, -0.0622295296345, -31.9189739166, -17.8224916068, -3.96916466957, 0.532469675084, -17.8574115966, -3.79742931057, -7.06730433692, -9.94818435373, 0.598478445137, 2.46454329810, 2.82412258514, -4.06087251037, -5.19815138695, -8.52814552557, -3.73188144194, 0.515781867353, 2.07207252862, 1.97189302591, 0.0977904398822, 10.7287014056, 1.63364398023, 3.59856635699, -4.39348055773, -3.49052670024, 4.27652301649, -3.78301578534, 0.306914586682, 11.7288926780, -8.41395982155, 3.95300330661, -7.53423166744, -10.0869608861, -3.84681126387, -4.33084423350, -6.47950333593, -5.77589734195, -5.72755448944, -6.78794619835, -1.82528689767, -0.644118167803, 0.110396186431, 0.100981600673, -0.402406864486, 3.91173751298, -1.36735936182, 7.67248056184, -3.88179659482, -7.13738360177, -1.19535906150, -3.49132852619, -2.92596621497, 1.35133816440, -16.0949204373, -1.80161412778, -5.38655433290, -6.79002948435, -3.58332670710, -3.00247208670, -4.70767664646, -8.51024383753, -13.0398138120, -10.1740482357, }, { 0.590633792225, 0.112462804622, 1.57307864629, -0.338532291702, 0.934294689249, 4.96574729528, 6.24180265424, 8.60637122639, 5.64722424249, 5.96833742143, 7.80962418292, 5.44249526303, 2.34670913657, 6.66691905449, 11.4517516335, -12.8169778043, 0.651472016818, 2.84956457467, -1.20420235933, -4.57224088644, 4.61452225228, 4.70113281529, -3.04675227459, 12.1325078736, 1.26119834948, 2.18987516681, 4.91037153642, -5.29735570343, 13.1379198417, 15.2833215316, 10.0730498543, -1.16301986843, -1.37163023510, -6.03427973474, -1.50027454550, -3.93903347767, 3.82132646761, 4.86683987463, 0.0688474955952, -3.31927402712, 1.88099997551, -3.96687513396, 1.51214093103, 3.37896290047, -4.27782577163, -3.06099501395, 3.36886108025, -0.537906001096, 2.05301896597, 4.07022363329, -11.4937924601, 11.7034791276, 2.71151189023, 6.95343835880, -8.29754156395, 95.8253560915, -11.3771881230, -18.3976865898, -14.2515233115, 3.97463653510, -3.21707086342, 1.20670176701, -18.5389743861, 0.846182241218, -7.35459035667, -6.72390343177, 0.0530762724270, 1.95804453141, 1.63728269312, -5.53141230965, -8.52814552557, -7.36238199152, -1.23652875064, -1.50142740200, 4.42154249574, 4.11048986679, -3.49650206722, 11.4442099056, 0.660741621798, 2.73971784574, -5.04394247808, -4.19782340310, 2.06125308493, -1.97808516555, -1.31988516118, 12.9423641628, 12.5879849047, -13.9285718417, -8.50314641749, -7.88809678529, -7.88914111836, -3.00247208670, -5.70466629849, -4.53722062451, -6.53319254708, -7.42705630041, -3.52437410739, 0.722311796191, 2.91434752106, 1.16047660536, -2.90479889313, 1.30519160208, 8.54277559021, -2.61762276351, -2.10738078932, -5.97302395553, -2.27303616948, -3.78877759863, -3.08366691349, 1.18570542996, -19.5588218250, 0.699673230686, -5.44641221973, -6.30970603601, -5.03263931039, -0.725226738072, -4.05435495795, -8.15841326488, -8.68936039711, -13.5953439229, }, { -2.05424388182, 2.91664946903, 1.51640273628, 0.795755172129, -0.818593816318, 3.72152299620, 0.314755923607, 1.57307864629, 0.0209809415685, 2.44544825138, 7.68438220043, 3.95863320677, 0.248275334921, 4.75341046185, 7.42132958226, -11.1977046007, -1.19922432959, 2.37667671700, -2.15700853736, 0.401277785420, -0.940801877032, 4.39505757541, 6.73360604526, 0.866154454190, 2.75496955568, 1.34264207773, 2.90077588087, 8.91907078347, 12.0368225525, -5.55402788282, 6.32770429109, 0.503138444413, -2.19163227797, -3.04232718639, -1.32849163946, -4.80044307096, 1.83617274451, 5.24659988964, 0.839919235494, -1.25286666352, 1.54283271895, -5.36799149000, 2.85356476469, 1.23620042522, -2.67167545957, -1.88530104907, 1.89214896281, -2.36940709009, -1.16880599602, 2.93931202527, -10.4179101369, 7.85572434880, -0.0946103506733, 4.62640633331, 6.91329582535, -11.3771881230, 98.0501238084, -36.1948023840, 2.38836929911, -17.0216252500, -3.11650166621, 3.11848761998, 2.05840148048, -18.0874436684, -2.42109281648, -3.63980243567, -1.83309503743, 3.22581106136, 1.91572793238, -4.99880484738, -4.06087251037, -5.53141230965, -2.70812576928, -0.877376856169, 1.41674265601, 3.51366877414, 6.33445073191, 0.854745298683, 2.00594589649, 0.831206512909, -2.98199746189, -2.07073322809, 1.32988350128, -2.85350911338, 4.42099749479, 0.592951516896, 2.04238410188, -2.23364079297, 5.38238026713, -14.0912440427, -3.61315415637, -0.644118167803, -3.77733627693, -3.06686059009, -4.86937681595, -3.04768959184, -3.64547457306, 2.66041333492, 1.40809620370, 1.25294322978, -2.56428697012, 2.87816600487, 7.13294881956, 0.0555678467830, -2.75719522516, -3.61884557138, -1.13547734156, -3.91494167754, -2.30497741046, 3.20833846878, 2.13971609673, -17.9660620096, -2.87516480264, -4.14106321047, -4.26389011473, 0.722311796191, -2.09613711355, -6.04286677972, -7.36658175599, -5.32764231058, }, { 1.68554765668, 2.18345616634, 1.40809620370, -2.54840826787, 0.613440673968, 2.16874029149, -3.45130216438, 2.91434752106, 0.545331558958, -4.22556084587, -4.99338303655, -4.69893147886, 1.06176307263, 2.55767805912, 1.88241502240, -16.7877815213, -0.0789435747566, -2.11393300786, -0.491483243017, 0.918782591640, 1.81968452702, -5.60682842900, 7.33279444374, -3.27561900621, -2.22568304570, -2.37331479701, 0.110396186431, 4.44558063180, -12.7359922823, 8.38996332437, 4.38149458079, -0.377040242349, -1.48564295720, 4.81301106985, -4.05226447797, 0.908235754809, -1.75773570496, -2.40015513230, -1.34997010910, 2.38263262964, -2.88446862464, 3.47959864133, -1.92029423174, -1.79665727600, 0.909198892731, 2.11540301866, -4.56409239301, 3.27367538387, 0.840501237418, -2.15868159775, -17.3220171221, 0.926481665246, 1.55270079570, 2.74121610464, -0.0622295296345, -18.3976865898, -36.1948023840, 98.3558345997, 1.94203511105, -10.8343835093, 0.827827410776, 0.448765444898, -0.0334858524931, -12.3582958452, 3.72182254444, 2.46532995184, 0.0698359663296, -4.48983028873, -5.29037912148, 1.91572793238, 2.82412258514, 1.63728269312, 0.110396462682, 0.243514488529, -0.0762330275188, -4.33004449477, 7.73624059467, -3.86961435551, -1.71528642262, -2.29004601420, 0.301302209952, 1.71359022390, -4.22796727586, 3.51750054562, 8.66481634482, -5.02467448805, -6.65812491595, 2.03244291996, -8.39291090002, 10.8670443194, 0.573983294049, 2.59871803433, 0.116066517666, 1.76170682652, 2.43697755210, 0.283315126158, 0.723831726613, 2.91664946903, 1.38687323822, -2.90550450174, -0.0823657666344, 0.516993015810, 5.17250072782, -1.28003934163, -2.35072651678, 3.99144669601, -2.57697065912, 1.40680050611, 0.405950073014, 0.842927830720, -0.244222984889, -12.7603680586, 3.51283765151, 2.18522773610, -1.39535571638, 0.112462804622, -5.88796619628, 3.87026004778, 5.51065378265, 3.32191661492, }, { 2.02872233283, 0.243514488529, 0.503138444413, 0.0824510449375, -0.811815197803, 2.76544260503, -0.217621232298, -1.16301986843, 0.514136212441, -2.27483562655, -0.288350770806,-0.00675287102233, -2.85326303442, 1.72187882714, -13.1120021898, 4.18954888030, -1.87628143369, 0.149580620670, 0.265231994911, 0.651265875292, -0.0567776177298, -1.00719159757, -4.68783610204, 9.02880381129, 6.29032662774, -9.90097087751, 9.55041595013, 0.992142461532, -0.453212325349, -0.928902843985, -1.61785491827, 5.66463862396, -3.32096648140, -1.83079589154, -0.480848137140, 0.277616118533, 0.119462679144, -0.425236423370, -0.775329098765, -0.379801943548, -0.329815234990, -0.0846387143669, -2.26824927103, 1.84284292672, 0.208255474631, 1.12185793523, -0.159705863318, -2.27239000576, 0.652888814807, 0.137554300282, 2.56894077997, -14.6112811453, -0.230667962931, 2.73461452022, -31.9189739166, -14.2515233115, 2.38836929911, 1.94203511105, 94.2552788108, -15.2978841164, -1.10748966817, 2.76337481959, -14.8356627079, 0.982437868940, 0.341986528276, -0.380210961430, -0.298831675023, -0.188438998761, 0.0698359663295, -1.83309503743, 0.598478445137, 0.0530762724269, -1.13007910406,-0.00616635518711, -0.0870870239659, -0.774776264366, -2.42952720868, 8.66578251209, -1.15408470499, 1.20692085121, -1.38639355346, -0.532432213488, 1.05528116547, -2.03263840131, 1.68797633181, -10.4459740465, 7.79473120283, 3.05921950333, 0.303358116589, -3.02221399632, 0.688957879569, 0.515781867353, -0.332001041841, 0.625326118133, 1.15099202692, -3.00379402614, 2.26535029574, -0.877376856169, -0.377040242349, -0.324682637397, -0.822099283250, 3.75027773845, -1.15480161496, 7.71072711834, -3.09523932096, -1.08861127329, -0.102612168783, -0.354029801964, -0.308055041427, 2.63094122274, -15.1465558918, 1.83679897869, 1.00101216412, 0.0617025313115, -2.14215935276, -1.50142740200, -2.49753689780, 0.00520850413778, 2.67602940790, -1.72460020986, }, { 1.62075751509, 0.918782591640, 0.0555678467829, -0.222808488642, 0.429846443576, 1.88972013476, -0.607862524868, -2.61762276351, -2.30163312917, -2.45959713642, -2.75213165922, -1.69030572390, 1.60500993770, 1.78263563452, -21.5884745239, 1.70108151577, 2.47431235715, -1.76475194051, 0.829071607073, -0.0582642072911, -1.46089485254, -3.41769576679, 12.1289294635, -7.69733034196, -11.8168960818, 7.59505512494, 7.67248056184, -2.67538276240, -3.15950591385, -3.81099339358, -4.01214234100, 7.71072711834, -4.51946838500, 1.83082030725, 0.733919099735, 2.94467407897, -2.59637492575, -2.26857129554, -1.65035733438, 1.87872915877, -2.12754545184, 2.16993674850, -0.979733462898, -2.18819474404, 0.292564966958, 0.897125204738, -0.973849166874, 1.65442854956, -0.156025669468, -1.53452144760, 3.79095739238, -18.7096452661, -0.201661053047, 1.65480029254, -17.8224916068, 3.97463653510, -17.0216252500, -10.8343835093, -15.2978841164, 93.6426102094, -0.295170575584, 0.279843608035, 1.47846360711, -15.7905603561, 2.60278409476, 2.17686565290, -0.188438998761, -1.91383293954, -4.48983028873, 3.22581106136, 2.46454329810, 1.95804453141, -0.267792101053, 0.651265875292, -0.876450614864, -2.77795348368, 11.0676035914, -5.85849699332, -2.98679387144, -2.48488946318, 1.04860798325, 2.16723095516, -2.55234384466, 1.12297208977, -10.7280805275, -4.10554906252, -6.05454160848, 0.466615290388, 11.4762396034, 11.0796491579, 2.71510318704, 1.48147473050, 1.14479443151, 2.00550909998, 0.606401472974, 1.17390695484, 3.19550859524, 0.401277785420, -1.28003934163, -2.13068687021, 1.55050062551, 1.63938994047, -4.73130890527, 9.06274797268, -3.19998558894, 2.47930316206, -0.695741099095, 1.68664098403, 0.580982753522, 2.37222909638, 4.41797286516, -14.9716998052, 2.25972447542, 2.18580016393, -0.538823633149, -4.57224088644, -1.37410684853, 4.26348616172, 2.38818731746, 3.10532137185, }, { 0.317009408644, -1.79665727600, -2.98199746189, -1.99850697532, 3.18700577505, 3.33342800563, -2.66294670741, -5.04394247808, -3.07052267766, -6.02998849958, -4.73781547117, -3.35179369511, -19.3172377973, -5.64241517623, -3.08262042966, -1.78446843887, -1.14582454271, -0.768481463569, -0.0647828994834, -2.18819474404, 4.48066186429, -3.96373655670, -2.32574635157, -2.70772471001, -6.28473382085, -2.79810435903, -4.39348055773, -1.96636597240, -2.99515736580, -3.78125589665, -1.89452057505, -1.38639355346, -0.642532653427, 10.3804109113, 1.31873349495, 2.97337347268, -4.35783988847, -5.17763354174, -1.74089982198, -1.38754417573, -3.39699380325, -0.208344798672, -4.22320070153, -0.586681818738, 1.18069247113, -9.04793938552, 3.37785124710, 6.70357901341, -15.7388762514, -18.0169750810, -4.11852072757, -5.35965896485, -34.1516756924, -3.22786966042, -3.96916466957, -3.21707086342, -3.11650166621, 0.827827410776, -1.10748966817, -0.295170575584, 97.5106165352, 1.33472273249, 2.41906046605, 2.25917246856, -12.2102995519, -11.2505893766, 2.73461452022, 1.65480029254, 2.74121610464, 4.62640633331, 6.06537020449, 6.95343835880, 2.39181914006, 1.84284292672, -11.3978370566, -0.172708307440, -0.948512871545, -0.627258344381, -2.54666298514, 7.45957428690, 6.93429729132, 10.0677163024, -2.20848872348, -0.330263365747, -0.0713480282071, -1.30237338382, 0.121673303444, 1.99892364104, 3.12219281403, 4.57598222658, 3.94431849865, 3.10256892136, 1.32288537996, 0.823733923179, 1.53728882691, 3.17903115692, 3.69530622097, 1.23620042522, 0.301302209952, -1.55906670230, 3.72198225871, 0.719583277667, -0.771434475411, 1.04860798325, 1.41439353302, 9.16691233076, 0.194605943195, 0.888231594353, -12.0586768221, 2.14946668185, 3.35790524138, 4.67724015175, 6.65935094182, 7.91720330292, 4.18885217231, 3.37896290047, 1.06752938523, 1.07416732004, 1.67444252606, 3.37243472607, }, { 0.0967280348665, -2.29004601420, -2.67167545957, -1.37002058804, 2.62950027646, 4.70409238607, -0.986603121024, -4.27782577163, -2.68209384482, -3.82849120087, -3.37577633747, -2.02151439206, -8.65304489492, -18.8945373099, 1.03529123844, 2.48195738147, -4.50485903284, -0.624657997254, -0.0139864204816, -2.48488946318, -2.78247617573, 5.60836397767, -4.82797426774, -0.726464919442, -4.70149806626, -4.32478909853, -4.94217489682, -1.59619979390, -2.76899080156, -3.81440143326, 0.220846817197, 0.208255474631, 8.80731107037, -2.34515277457, 1.76478425866, -0.520669323459, -2.50206994411, -3.10406777656, -0.253091316952, -2.00355051992, -0.288593708110, -1.38665779695, 7.58738509851, 7.45957428690, -11.5051519493, -1.13586621270, -1.77477694233, -3.29214336856, -3.32897663818, -2.64461858054, -16.9846587415, -18.0786209612, -3.16965487642, -34.1516756924, 0.532469675084, 1.20670176701, 3.11848761998, 0.448765444898, 2.76337481959, 0.279843608035, 1.33472273249, 97.9279254243, -11.1390670812, -12.7497104077, 0.821853551219, 1.61158816726, -0.230667962931, -0.201661053047, 1.55270079570, -0.0946103506733, 1.81135952795, 2.71151189023, 1.31823289283, 1.20692085121, 0.882177110707, -10.0418795477, -1.80231008148, 2.13889983533, 9.13690958564, -1.41292452560, 1.18069247113, -2.07282329380, 6.85809515971, 5.75150332245, -0.755931664233, -1.11372675128, 1.08285467559, -0.838740155361, 1.06590212299, 2.27346737812, 3.46667425859, 3.59856635699, 1.01326108039, 1.12394241249, 1.36958351942, 3.26675519699, 2.92211067478, 0.831206512909, 0.909198892731, -1.21391220419, -1.03526516990, 4.66367182442, -1.77000131659, 0.292564966958, 8.64381642659, 0.493403977792, 2.08159759315, 0.657839132651, 3.60317294936, -11.3999775314, 7.17934350437, 4.85576722241, 2.25691717471, 3.62606894482, 2.54581189924, 2.73971784574, 0.0849587942870, -0.580323425396, 0.219686486452, 2.02183256873, }, { 1.32144544549, -0.0762330275188, -2.19163227797, -1.67990502431, -1.20360863110, 2.82072520664, -2.81004665660, -1.37163023510, -3.51454627695, -3.88232908528, -3.05018339346, -2.02802672410, -5.50478634897, -21.4912539598, 4.46226543485, 2.73539255755, -7.05793411218, 0.0380088357487, -0.995124191103, -0.876450614864, -1.85841628415, -4.21039938474, -5.73844782065, 9.09063855211, -6.47364612549, -4.29947966233, -3.21798506775, -2.20778938257, -2.80677249714, -4.44273544243, -0.721810888033, -3.32096648140, 10.7779649759, 0.0169954512305, 0.736566900475, -0.601676628533, -1.32629124690, -3.31243791773, 0.401647588297, -2.04207166717, -0.374619659663, -1.39501835562, 8.86483341561, -11.3978370566, 8.80731107037, -0.966763684304, -1.49399239261, -2.65884432854, -0.400893302745, -1.29586693892, 4.01875400135, 4.92079954057, -3.32897663818, -15.7388762514, -17.8574115966, -18.5389743861, 2.05840148048, -0.0334858524931, -14.8356627079, 1.47846360711, 2.41906046605, -11.1390670812, 92.7853928095, -15.9480158432, 1.12502630644, 1.05158253708, 0.652888814807, -0.156025669468, 0.840501237418, -1.16880599602, 2.06949985359, 2.05301896597, 1.65895067518, -0.0870870239659, -1.04954137496, -1.49196964868, -1.43426408258, -7.06529346522, -1.67373580774, 0.882177110707, -0.642532653427, 1.40874140874, -0.288433360886, -2.88072342083, -0.673633309049, 9.35576439192, 8.12910672884, 5.80288007867, 0.501243283029, -1.83170587234, 3.62078617726, 2.07207252862, 1.12338280046, 2.91476006270, 0.691587687635, -1.48303979002, -0.794133342961, 1.41674265601, -1.48564295720, 1.63743331504, 2.35700464670, 5.82889224441, 0.419196010992, -4.51946838500, 11.4159072685, 0.864511276649, 1.75832614461, 1.72996653042, 1.34710462072, 7.39312816784, -16.2402478326, 3.26782880655, 1.45528844758, 0.716863814499, 7.30349562037, 4.42154249574, 3.38103514287, 3.51830820868, 2.78643342225, -0.0424397035294, }, { 1.39656074305, 1.81968452702, -2.75719522516, -2.90899564007, 0.618454666887, 0.702694944772, -3.35210644563, -2.10738078932, -6.23340209851, -4.43922102010, -5.29810362710, -4.21925717124, -0.901028953118, -21.0330481220, -3.89444925619, -0.0438466036696, 0.193453132463, -5.14903647973, -0.230362026411, -1.46089485254, -2.73796049663, -6.71315349486, 7.93840729882, -5.25391663395, -3.76698308645, -7.34212250355, -3.88179659482, -7.65647231212, -5.51170646267, -7.03436867550, -2.50966202192, -3.09523932096, 11.4159072685, 3.58769338251, 0.586904825889, 2.89820975974, -4.18361147861, -6.13678692008, -0.701150313907, 1.28248388672, -3.04136462819, 2.01281383095, -10.5458301759, 4.48066186429, 8.64381642659, -0.158319857919, -2.99859433160, 1.96270324942, -1.29586693892, -2.50996423442, 5.02034622785, 1.21387395923, -2.64461858054, -18.0169750810, -3.79742931057, 0.846182241218, -18.0874436684, -12.3582958452, 0.982437868940, -15.7905603561, 2.25917246856, -12.7497104077, -15.9480158432, 92.7490309898, 3.05273950099, 3.61855263797, 0.137554300282, -1.53452144760, -2.15868159775, 2.93931202527, 3.49246198396, 4.07022363329, 2.82235210499, -0.0567776177297, -1.85841628415, -3.90795863113, -7.83212364819, -0.936251126036, -2.74395919415, -2.78247617573, 1.41439353302, 3.70110750688, -4.73280164616, 1.10735995817, 7.75620353226, -4.87087529660, -4.14858224039, 1.02899668126, 11.0614215636, 13.2137268024, 5.59187838003, 2.69155885333, 2.13910789756, 4.70811456921, 1.19761159601, 2.09320522335, 2.06849456445, -0.940801877032, -2.35072651678, 0.835336974273, 4.62879146440, 4.48072367247, -1.91084817595, -3.19998558894, 11.0067261524, 2.99133463145, 2.02175215248, 3.44568326186, 1.92792536871, 7.54195229339, 3.73619642794, -14.3750955712, 2.87287451220, 3.00527857918, 6.04429774214, 4.61452225228, 4.05940570669, 8.26954420328, 2.67799341696, 4.15892129831, }, { 1.02605720546, -2.37331479701, -3.77733627693, -1.43305365901, 5.30877759488, 0.888583249480, -3.45626513000, -5.70466629849, -7.00279693580, -6.93544144105, -7.39504638297, -5.73626900280, -17.7214813554, -2.53196272433, -11.4856321658, -7.15385672093, 5.68294330736, -3.35219702054, -0.0859737999385, 7.59505512494, -7.34212250355, -5.52024849453, 0.216651853125, -5.75346587156, -7.81212664565, -8.41736996603, -6.47950333593, -3.44409149145, -6.46198437092, -7.03341058696, -2.05191827869, -0.332001041841, 1.12338280046, 11.6325047244, 1.50831284227, 1.14597346545, -7.61785716243, -8.64938121805, -0.234511347270, 0.00817510064862, -5.59032944961, 1.93731693654, -4.36964974991, -2.79810435903, 1.01326108039, 11.3982255953, 6.34108150200, -7.23976744124, 4.92079954057, 1.21387395923, -6.01767315498, -6.28804067827, -18.0786209612, -5.35965896485, -7.06730433692, -7.35459035667, -2.42109281648, 3.72182254444, 0.341986528276, 2.60278409476, -12.2102995519, 0.821853551219, 1.12502630644, 3.05273950099, 94.7298696159, -12.0089431300, -14.6112811453, -18.7096452661, 0.926481665246, 7.85572434880, -8.61710023958, 11.7034791276, 3.39335561421, -9.90097087751, -4.29947966233, -4.40445015800, 1.50969080752, -4.40138514720, -3.38273805882, -4.32478909853, 1.32288537996, -0.242624434201, -4.70370169779, 3.85417816513, -1.18330443691, -2.18365247431, -1.74931105086, 5.39916098902, 5.10529079514, 6.13080095654, 5.85134547356, 13.8048763306, 15.1580747943, 14.1327613027, 3.32405577632, 5.42245148490, 4.83644746149, 1.34264207773, 0.116066517666, -5.44848887444, 4.27517288855, 0.266964585737, -0.233985776625, 1.14479443151, 2.13910789756, 12.5784802369, 2.92767457208, 1.57770453761, 9.26811669461, 2.68655900288, 4.26622830396, 4.82287665170, -12.0020462898, 9.42849253750, 5.84810605862, 2.18987516681, 4.15777877683, 3.23790008991, 3.49249165404, 5.64316448556, }, { 1.88772939286, 0.545331558958, -2.09613711355, -3.16798642674, 2.52869602862, -1.63606896922, -5.37432696832, -4.05435495795, -6.61848412260, -6.19424392149, -6.52606891117, -4.70076357543, -18.3629095634, -3.12264250823, -8.74645850396, -9.62141229527, 2.90487823575, -0.479123945235, 9.88998691768, -2.30163312917, -6.23340209851, -3.86241095315, -0.702321383383, -6.49664214697, -7.33354399261, -7.00279693580, -4.70767664646, -6.83419264548, -6.57582963161, -9.33963865749, 0.450688627235, -2.49753689780, 3.38103514287, 13.8527965563, -1.39059221097, 1.31728951722, -6.50929731674, -8.44202922569, -2.42287091649, 1.87942139897, -2.11136224508, 1.39654183047, -5.41431685967, -3.07052267766, 0.0849587942870, 10.3977310850, -13.1943048089, 11.9416522898, 4.01875400135, 5.02034622785, -3.20219830206, -6.01767315498, -16.9846587415, -4.11852072757, -9.94818435373, -6.72390343177, -3.63980243567, 2.46532995184, -0.380210961430, 2.17686565290, -11.2505893766, 1.61158816726, 1.05158253708, 3.61855263797, -12.0089431300, 96.4518701114, 2.56894077997, 3.79095739238, -17.3220171221, -10.4179101369, 7.21247353087, -11.4937924601, -7.84888069700, 0.514136212441, -3.51454627695, -3.40654646337, 0.304161354887, -5.72021533230, -3.83821499890, -2.68209384482, 1.06752938523, 0.677327563698, -1.61502794398, 2.96750226889, -1.05510526828, -2.27640071874, -4.09070881500, 3.11372650763, 3.94284580098, 4.40043954301, 15.5349777304, 2.52357226846, 4.15777877683, 3.47335810570, 13.6763017879, 13.2818405765, 1.39551041680, 0.0209809415685, -5.88796619628, 1.26843494328, 7.19934538749, 2.93182498382, 1.57698579440, -1.37410684853, 4.05940570669, 14.8468941777, -0.642957914166, 2.72936358630, 8.51096261755, 1.97210592684, 0.530475704477, 2.26907424018, 6.80378366108, -12.6839240768, 7.27804666997, 5.64722424249, 7.36241256775, 6.85570362359, 6.14401133253, 5.80496011766, }, { -0.324682637397, -0.377040242349, -0.877376856169, 2.26535029574, 3.75027773845, -0.822099283250, -2.14215935276, -1.50142740200, -2.49753689780, 0.00520850413778, 2.67602940790, -1.72460020986, 2.63094122274, -0.308055041427, 1.00101216412, 0.0617025313115, -15.1465558918, 1.83679897869, -1.15480161496, 7.71072711834, -3.09523932096, -1.08861127329, -0.102612168783, -0.354029801964, 0.625326118133, -0.332001041841, 0.515781867353, 0.688957879569, -3.00379402614, 1.15099202692, -1.13007910406,-0.00616635518705, -0.0870870239659, -0.774776264366, -2.42952720868, 8.66578251209, -3.02221399632, 0.303358116588, 1.68797633181, -10.4459740465, 3.05921950333, 7.79473120283, -0.532432213488, -1.38639355346, 1.20692085120, -1.15408470499, -2.03263840131, 1.05528116547, -14.8356627079, 0.982437868940, -0.380210961430, 0.341986528276, 2.76337481959, -1.10748966817, 0.598478445137, 0.0530762724270, -1.83309503743, 0.0698359663296, -0.298831675023, -0.188438998761, 2.73461452022, -0.230667962931, 0.652888814807, 0.137554300282, -14.6112811453, 2.56894077997, 94.2552788108, -15.2978841164, 1.94203511105, 2.38836929911, -31.9189739166, -14.2515233115, -1.61785491827, 5.66463862396, -3.32096648140, -1.83079589154, -0.480848137140, 0.277616118533, 1.12185793523, 0.208255474631, 1.84284292672, -2.26824927103, -2.27239000576, -0.159705863318, -0.775329098765, -0.379801943548, -0.0846387143668, -0.329815234990, -0.425236423370, 0.119462679144, 0.992142461532, 9.55041595013, -9.90097087751, 6.29032662774, -0.928902843985, -0.453212325349, 0.0824510449375, 0.503138444413, 0.243514488529, 2.02872233283, 2.76544260503, -0.811815197803, 0.265231994911, 0.651265875292, -0.0567776177297, -1.00719159757, -4.68783610204, 9.02880381129, 1.72187882714, -2.85326303442, -1.87628143369, 0.149580620670, -13.1120021898, 4.18954888030, -0.217621232298, -1.16301986843, 0.514136212441, -2.27483562655, -0.288350770806,-0.00675287102232, }, { -2.13068687021, -1.28003934163, 0.401277785420, 3.19550859524, 1.63938994047, 1.55050062551, -0.538823633149, -4.57224088644, -1.37410684853, 4.26348616172, 2.38818731746, 3.10532137185, 2.37222909638, 0.580982753522, 2.25972447542, 2.18580016393, 4.41797286516, -14.9716998052, -4.73130890527, 9.06274797268, -3.19998558894, 2.47930316206, -0.695741099095, 1.68664098403, 2.00550909998, 1.14479443151, 1.48147473050, 2.71510318704, 1.17390695484, 0.606401472974, -0.267792101053, 0.651265875292, -0.876450614864, -2.77795348368, 11.0676035914, -5.85849699332, 11.0796491579, 11.4762396034, -10.7280805275, -4.10554906252, 0.466615290388, -6.05454160848, 2.16723095516, 1.04860798325, -2.48488946318, -2.98679387144, 1.12297208977, -2.55234384466, 1.47846360711, -15.7905603561, 2.17686565290, 2.60278409476, 0.279843608035, -0.295170575584, 2.46454329810, 1.95804453141, 3.22581106136, -4.48983028873, -0.188438998761, -1.91383293954, 1.65480029254, -0.201661053047, -0.156025669468, -1.53452144760, -18.7096452661, 3.79095739238, -15.2978841164, 93.6426102094, -10.8343835093, -17.0216252500, -17.8224916068, 3.97463653510, -4.01214234100, 7.71072711834, -4.51946838500, 1.83082030725, 0.733919099735, 2.94467407897, 0.897125204738, 0.292564966958, -2.18819474404, -0.979733462898, 1.65442854956, -0.973849166874, -1.65035733438, 1.87872915877, 2.16993674850, -2.12754545184, -2.26857129554, -2.59637492575, -2.67538276240, 7.67248056184, 7.59505512494, -11.8168960818, -3.81099339358, -3.15950591385, -0.222808488642, 0.0555678467829, 0.918782591640, 1.62075751509, 1.88972013476, 0.429846443576, 0.829071607073, -0.0582642072911, -1.46089485254, -3.41769576679, 12.1289294635, -7.69733034196, 1.78263563452, 1.60500993770, 2.47431235715, -1.76475194051, -21.5884745239, 1.70108151577, -0.607862524868, -2.61762276351, -2.30163312917, -2.45959713642, -2.75213165922, -1.69030572390, }, { -2.90550450174, 1.38687323822, 2.91664946903, 0.723831726613, 0.516993015810, -0.0823657666345, -1.39535571638, 0.112462804622, -5.88796619628, 3.87026004778, 5.51065378265, 3.32191661492, 0.842927830720, 0.405950073014, 3.51283765151, 2.18522773610, -0.244222984889, -12.7603680586, 5.17250072782, -1.28003934163, -2.35072651678, 3.99144669601, -2.57697065912, 1.40680050611, 1.76170682652, 0.116066517666, 2.59871803433, 0.573983294049, 0.283315126158, 2.43697755210, 0.110396462681, 0.243514488529, -0.0762330275188, -4.33004449477, 7.73624059467, -3.86961435551, 10.8670443194, -8.39291090002, 8.66481634482, -5.02467448805, 2.03244291996, -6.65812491595, 1.71359022390, 0.301302209952, -2.29004601420, -1.71528642262, 3.51750054562, -4.22796727586, -0.0334858524931, -12.3582958452, 2.46532995184, 3.72182254444, 0.448765444898, 0.827827410776, 2.82412258514, 1.63728269312, 1.91572793238, -5.29037912148, 0.0698359663296, -4.48983028873, 2.74121610464, 1.55270079570, 0.840501237418, -2.15868159775, 0.926481665246, -17.3220171221, 1.94203511105, -10.8343835093, 98.3558345997, -36.1948023840, -0.0622295296345, -18.3976865898, 4.38149458079, -0.377040242349, -1.48564295720, 4.81301106985, -4.05226447797, 0.908235754809, 2.11540301866, 0.909198892731, -1.79665727600, -1.92029423174, 3.27367538387, -4.56409239301, -1.34997010910, 2.38263262964, 3.47959864133, -2.88446862464, -2.40015513230, -1.75773570496, 4.44558063180, 0.110396186431, -2.37331479701, -2.22568304570, 8.38996332437, -12.7359922823, -2.54840826787, 1.40809620370, 2.18345616634, 1.68554765668, 2.16874029149, 0.613440673968, -0.491483243017, 0.918782591640, 1.81968452702, -5.60682842900, 7.33279444374, -3.27561900621, 2.55767805912, 1.06176307263, -0.0789435747566, -2.11393300786, 1.88241502240, -16.7877815213, -3.45130216438, 2.91434752106, 0.545331558958, -4.22556084587, -4.99338303655, -4.69893147886, }, { 1.25294322978, 1.40809620370, 2.66041333492, -3.64547457306, 2.87816600487, -2.56428697012, -4.26389011473, 0.722311796191, -2.09613711355, -6.04286677972, -7.36658175599, -5.32764231058, 3.20833846878, -2.30497741046, -2.87516480264, -4.14106321047, 2.13971609673, -17.9660620096, 7.13294881956, 0.0555678467829, -2.75719522516, -3.61884557138, -1.13547734156, -3.91494167754, -3.06686059009, -3.77733627693, -0.644118167803, -3.61315415637, -3.04768959184, -4.86937681595, -2.70812576928, -0.877376856169, 1.41674265601, 3.51366877414, 6.33445073191, 0.854745298683, -14.0912440427, 5.38238026713, 4.42099749479, 0.592951516896, -2.23364079297, 2.04238410188, -2.07073322809, -2.98199746189, 0.831206512909, 2.00594589649, -2.85350911338, 1.32988350128, 2.05840148048, -18.0874436684, -3.63980243567, -2.42109281648, 3.11848761998, -3.11650166621, -4.06087251037, -5.53141230965, -4.99880484738, 1.91572793238, -1.83309503743, 3.22581106136, 4.62640633331, -0.0946103506733, -1.16880599602, 2.93931202527, 7.85572434880, -10.4179101369, 2.38836929911, -17.0216252500, -36.1948023840, 98.0501238084, 6.91329582535, -11.3771881230, 6.32770429109, 0.503138444413, -2.19163227797, -3.04232718639, -1.32849163946, -4.80044307096, -1.88530104907, -2.67167545957, 1.23620042522, 2.85356476469, -2.36940709009, 1.89214896281, 0.839919235494, -1.25286666352, -5.36799149000, 1.54283271895, 5.24659988964, 1.83617274451, 8.91907078347, 2.90077588087, 1.34264207773, 2.75496955568, -5.55402788282, 12.0368225525, 0.795755172129, 1.51640273628, 2.91664946903, -2.05424388182, 3.72152299620, -0.818593816318, -2.15700853736, 0.401277785420, -0.940801877032, 4.39505757541, 6.73360604526, 0.866154454190, 4.75341046185, 0.248275334921, -1.19922432959, 2.37667671700, 7.42132958226, -11.1977046007, 0.314755923607, 1.57307864629, 0.0209809415685, 2.44544825138, 7.68438220043, 3.95863320677, }, { 0.100981600673, 0.110396186431, -0.644118167803, -1.82528689767, 3.91173751298, -0.402406864486, -3.58332670710, -3.00247208670, -4.70767664646, -8.51024383753, -13.0398138120, -10.1740482357, 1.35133816440, -2.92596621497, -5.38655433290, -6.79002948435, -16.0949204373, -1.80161412778, -1.36735936182, 7.67248056184, -3.88179659482, -7.13738360177, -1.19535906150, -3.49132852619, -5.77589734195, -6.47950333593, -4.33084423350, -3.84681126387, -6.78794619835, -5.72755448944, -3.73188144194, 0.515781867353, 2.07207252862, 1.97189302591, 0.0977904398822, 10.7287014056, -10.0869608861, -7.53423166744, 0.306914586681, 11.7288926780, 3.95300330661, -8.41395982155, -3.49052670024, -4.39348055773, 3.59856635699, 1.63364398023, -3.78301578534, 4.27652301649, -17.8574115966, -3.79742931057, -9.94818435373, -7.06730433692, 0.532469675084, -3.96916466957, -5.19815138695, -8.52814552557, -4.06087251037, 2.82412258514, 0.598478445137, 2.46454329810, 6.06537020449, 1.81135952795, 2.06949985359, 3.49246198396, -8.61710023958, 7.21247353087, -31.9189739166, -17.8224916068, -0.0622295296344, 6.91329582535, 102.873000337, -8.29754156395, -0.272497579815, 9.55041595013, -3.21798506775, -5.79854447676, -0.0662381676393, -2.56168688630, -3.62453739721, -4.94217489682, 3.10256892136, 1.22098483369, -3.78092960240, 4.35351409207, -0.424687356220, -3.07743593625, -1.83014139735, 4.26729074902, 6.25670358802, 5.64432273403, 6.53891567913, -5.21236288663, 13.8048763306, 11.2369380302, 4.90918856470, 5.25351092114, 3.17949645052, 2.90077588087, 2.59871803433, -2.88743618262, 2.28500868480, -1.77820375188, -6.40891589527, 1.48147473050, 2.69155885333, 2.44550709798, 0.646018777457, 10.7075152535, 7.33859822326, 3.18541284620, 4.36501661673, 5.49448637986, -7.46208658743, 9.29575996071, 4.93464750296, 4.91037153642, 2.52357226846, 2.33851044078, 5.11985745270, 5.36585346694, }, { 1.16047660536, 2.91434752106, 0.722311796191, -3.52437410739, 1.30519160208, -2.90479889313, -5.03263931039, -0.725226738072, -4.05435495795, -8.15841326488, -8.68936039711, -13.5953439229, 1.18570542996, -3.08366691349, -5.44641221973, -6.30970603601, -19.5588218250, 0.699673230686, 8.54277559021, -2.61762276351, -2.10738078932, -5.97302395553, -2.27303616948, -3.78877759863, -4.53722062451, -5.70466629849, -3.00247208670, -7.88914111836, -7.42705630041, -6.53319254708, -1.23652875064, -1.50142740200, 4.42154249574, 4.11048986679, -3.49650206722, 11.4442099056, -7.88809678529, -8.50314641749, -1.31988516118, 12.9423641628, -13.9285718417, 12.5879849047, -4.19782340310, -5.04394247808, 2.73971784574, 0.660741621798, -1.97808516555, 2.06125308493, -18.5389743861, 0.846182241218, -6.72390343177, -7.35459035667, 1.20670176701, -3.21707086342, -8.52814552557, -7.36238199152, -5.53141230965, 1.63728269312, 0.0530762724270, 1.95804453141, 6.95343835880, 2.71151189023, 2.05301896597, 4.07022363329, 11.7034791276, -11.4937924601, -14.2515233115, 3.97463653510, -18.3976865898, -11.3771881230, -8.29754156395, 95.8253560915, 10.0730498543, -1.16301986843, -1.37163023510, -6.03427973474, -1.50027454550, -3.93903347767, -3.06099501395, -4.27782577163, 3.37896290047, 1.51214093103, -0.537906001096, 3.36886108025, 0.0688474955951, -3.31927402712, -3.96687513396, 1.88099997551, 4.86683987463, 3.82132646761, -5.29735570343, 4.91037153642, 2.18987516681, 1.26119834948, 15.2833215316, 13.1379198417, -0.338532291702, 1.57307864629, 0.112462804622, 0.590633792225, 4.96574729528, 0.934294689249, -1.20420235933, -4.57224088644, 4.61452225228, 4.70113281529, -3.04675227459, 12.1325078736, 6.66691905449, 2.34670913657, 0.651472016817, 2.84956457467, 11.4517516335, -12.8169778043, 6.24180265424, 8.60637122639, 5.64722424249, 5.96833742143, 7.80962418292, 5.44249526303, }, { 2.44549621665, -1.34997010910, 4.42099749479, -2.52050917818, -1.19832194615, -1.32677197557, 0.648060105356, -1.31988516118, -2.42287091649, -1.79190636860, 0.963561730308, -0.822761627120, 0.752523437973, -1.45370351642, -1.01728261213, -0.655500619147, -2.02931849394, -4.10591299042, -14.7303964383, -1.65035733438, -0.701150313907, -1.74888357212, 2.66720371507, 2.17786885862, 0.768747418436, -0.234511347270, 0.306914586681, -0.405485447227, -1.39758341021, 0.493511139924, -0.807975698449, 1.68797633181, -0.673633309049, -3.83870245603, -3.50345230039, -0.541588753301, 0.0872816773914, -2.97318505675, 4.68499435657, 4.38226922329, -2.36678986350, 2.15730956894, -2.13442715547, -1.74089982198, -0.755931664233, -3.15515491248, -2.68666481829, 0.559476174582, -0.721810888033, -2.50966202192, 0.450688627235, -2.05191827869, 0.220846817197, -1.89452057505, -3.73188144194, -1.23652875064, -2.70812576928, 0.110396462682, -1.13007910406, -0.267792101053, 2.39181914006, 1.31823289283, 1.65895067518, 2.82235210499, 3.39335561421, -7.84888069700, -1.61785491827, -4.01214234100, 4.38149458079, 6.32770429109, -0.272497579815, 10.0730498543, 95.5885613006, -0.775329098765, 0.401647588297, -0.737208484589, -15.0432881193, -15.3285798195, -0.981000615935, -0.253091316952, -0.0713480282071, -0.518408162699, -0.607028592293, 2.52120643985, 3.27695081497, 2.67912768460, 1.56010340800, 2.94831173152, 3.84465259820, 4.72477703040, -32.3095409893, -0.424687356220, -1.18330443691, 1.83839328834, -13.2965885945, -14.7753124299, 3.60249764016, 0.839919235494, 8.66481634482, -0.610894684855, -1.72833866992, -0.831516026082, -1.92153663320, -10.7280805275, 7.75620353226, 8.03071032466, 1.78584284172, 1.80036779883, -0.523543280774, 0.624602508586, -1.52362951526, -0.486534657962, 0.313854286943, 7.54335481944, -14.7625052036, 0.0688474955951, -1.05510526828, 1.17284223635, 3.17239108681, 1.42851903350, }, { -0.0846387143669, 1.94203511105, -1.83309503743, 3.05921950333, -2.27239000576, -2.03263840131, -3.02221399632, 0.0530762724270, -0.380210961430, 0.0617025313115, -3.00379402614, -1.72460020986, 1.12185793523, -0.532432213488, 0.625326118133, 0.00520850413776, -1.83079589154, -1.08861127329, -0.379801943548, -15.2978841164, 0.982437868940, 1.83679897869, 0.277616118533, -0.354029801964, 1.00101216412, 0.341986528276, 0.598478445137, 0.303358116589, 2.67602940790, 1.15099202692, 1.68797633181, -0.298831675023, 0.652888814807, -1.87628143369, -2.42952720868, -4.68783610204, -2.14215935276, 0.688957879569, -1.13007910406, 0.265231994911, 2.26535029574, 2.02872233283, -0.308055041427, -1.10748966817, -0.230667962931, -2.85326303442, -0.822099283250, -0.811815197803, -3.32096648140, -3.09523932096, -2.49753689780, -0.332001041841, 0.208255474631, -1.38639355346, 0.515781867353, -1.50142740200, -0.877376856169, 0.243514488529,-0.00616635518708, 0.651265875292, 1.84284292672, 1.20692085120, -0.0870870239659, -0.0567776177297, -9.90097087751, 0.514136212441, 5.66463862396, 7.71072711834, -0.377040242349, 0.503138444413, 9.55041595013, -1.16301986843, -0.775329098765, 94.2552788108, -14.8356627079, -15.1465558918, -0.480848137140, -0.102612168783, 2.63094122274, 2.76337481959, 2.73461452022, 1.72187882714, 3.75027773845, 2.76544260503, -1.61785491827, -1.15480161496, -0.324682637397, 0.0824510449375, 0.992142461532, -0.217621232298, -0.425236423370, -31.9189739166, -14.6112811453, -13.1120021898, -0.928902843985, -0.288350770806, -0.329815234990, 2.38836929911, 0.0698359663296, 7.79473120283, -0.159705863318, 1.05528116547, -10.4459740465, -0.188438998761, 0.137554300282, 0.149580620670, 8.66578251209, 9.02880381129, -2.26824927103, -1.15408470499, -0.774776264366, -1.00719159757, 6.29032662774, -2.27483562655, 0.119462679144, -14.2515233115, 2.56894077997, 4.18954888030, -0.453212325349,-0.00675287102231, }, { -1.39501835562, -0.0334858524930, -1.16880599602, 5.80288007867, -2.65884432854, -2.88072342083, -1.83170587234, 2.05301896597, 1.05158253708, 0.716863814499, -1.48303979002, -0.0424397035294, -0.966763684304, 1.40874140874, 2.91476006270, 3.51830820868, 0.0169954512305, 0.864511276649, -2.04207166717, 1.47846360711, -15.9480158432, 3.26782880655, -0.601676628533, 1.72996653042, 1.45528844758, 1.12502630644, 2.06949985359, 0.501243283029, 2.78643342225, 0.691587687635, -0.673633309049, 0.652888814807, -0.400893302745, -7.05793411218, -1.43426408258, -5.73844782065, 7.30349562037, 3.62078617726, 1.65895067518, -0.995124191103, -0.794133342961, 1.32144544549, 1.34710462072, 2.41906046605, -3.32897663818, -5.50478634897, 2.35700464670, -1.20360863110, 10.7779649759, 11.4159072685, 3.38103514287, 1.12338280046, 8.80731107037, -0.642532653427, 2.07207252862, 4.42154249574, 1.41674265601, -0.0762330275188, -0.0870870239659, -0.876450614864, -11.3978370566, 0.882177110707, -1.04954137496, -1.85841628415, -4.29947966233, -3.51454627695, -3.32096648140, -4.51946838500, -1.48564295720, -2.19163227797, -3.21798506775, -1.37163023510, 0.401647588297, -14.8356627079, 92.7853928095, -16.2402478326, 0.736566900475, 1.75832614461, 7.39312816784, -11.1390670812, -15.7388762514, -21.4912539598, 5.82889224441, 2.82072520664, -0.721810888033, 0.419196010992, 1.63743331504, -1.67990502431, -2.20778938257, -2.81004665660, -3.31243791773, -17.8574115966, 4.92079954057, 4.46226543485, -4.44273544243, -3.05018339346, -0.374619659663, 2.05840148048, 0.840501237418, 8.12910672884, -1.49399239261, -0.288433360886, 9.35576439192, -0.156025669468, -1.29586693892, 0.0380088357487, -7.06529346522, 9.09063855211, 8.86483341561, -1.67373580774, -1.49196964868, -4.21039938474, -6.47364612549, -3.88232908528, -1.32629124690, -18.5389743861, 4.01875400135, 2.73539255755, -2.80677249714, -2.02802672410, }, { -3.34650475961, -0.244222984889, -1.19922432959, 7.29488051492, -4.45236155393, -1.56432015213, -2.37033491174, 0.651472016817, 0.530475704478, 0.166041701236, -0.963704921350, 2.11615664827, -0.143948880618, 0.407242738726, 2.01415320722, 2.91896715975, 1.20436215199, 4.24731476814, -1.95883804573, 4.41797286516, 3.73619642794, -16.1553457842, -1.21452928814, 1.02050137931, 2.83654536530, 4.26622830396, 4.36501661673, 2.77259210961, 5.76091246408, 3.32517390895, -3.83870245603, -1.87628143369, -7.05793411218, -1.53071571540, -2.05718013166, -0.612057989473, 5.10925342427, 1.29179650177, -1.52362951526, -2.05981445593, 6.16196222431, -5.10130764631, 3.35728059368, 3.35790524138, -4.50485903284, -3.64730771509, 0.827377726153, -3.66840017366, 0.0169954512305, 3.58769338251, 13.8527965563, 11.6325047244, -2.34515277457, 10.3804109113, 1.97189302591, 4.11048986679, 3.51366877414, -4.33004449477, -0.774776264366, -2.77795348368, -0.172708307440, -10.0418795477, -1.49196964868, -3.90795863113, -4.40445015800, -3.40654646337, -1.83079589154, 1.83082030725, 4.81301106985, -3.04232718639, -5.79854447676, -6.03427973474, -0.737208484589, -15.1465558918, -16.2402478326, 92.1365355516, 0.337099110791, 2.13648776433, -12.4019770743, 7.17934350437, -1.14582454271, 2.98812055676, -12.6814395874, -16.9543023518, -2.02931849394, -0.0310057129430, 1.44529123062, -2.70739810248, -2.51407232447, -4.20846320503, -1.05123128530, -16.0949204373, 5.68294330736, 4.33952915306, -3.82010252008, -3.36354084830, 0.0509280864459, 2.13971609673, -0.0789435747566, 7.96997978451, -0.852923983700, -0.257197740859, 12.0459018356, 2.47431235715, 0.193453132463, -2.45376070600, 8.61627206225, -10.8310446324, -4.56923963793, 8.11963810962, -1.95176042081, -2.12699636533, -6.59806078449, -3.26077886935, -1.74931022596, -19.5588218250, 2.90487823575, 2.57472739991, -3.78922402605, -2.54663857301, }, { 0.283448392274, -4.05226447797, 6.33445073191, -1.30327712967, -1.40296912034, -2.96608171915, -0.527049340161, -3.49650206722, -1.39059221097, -3.12338044576, 1.43073220478, 0.170657990262, -0.376870686323, -0.675888482944, -1.29945312138, -3.12338044576, 0.337099110791, -0.156236616844, 5.26249155547, 0.733919099735, 0.586904825889, -0.156236616844, -17.5987402266, 0.220345800761, -1.29945312138, 1.50831284227, 0.0977904398822, 2.72940983215, 1.43073220478, 2.78891110681, -3.50345230039, -2.42952720868, -1.43426408258, -2.05718013166, -1.50120357998, -1.41387342026, -0.527049340161, 2.72940983215, -3.50345230039, 2.61461575929, -1.30327712967, -0.195801329414, -0.675888482944, 1.31873349495, -1.80231008148, -0.873547681475, -2.96608171915, -1.01550367500, 0.736566900475, 0.586904825889, -1.39059221097, 1.50831284227, 1.76478425866, 1.31873349495, 0.0977904398822, -3.49650206722, 6.33445073191, 7.73624059467, -2.42952720868, 11.0676035914, -0.948512871545, -1.80231008148, -1.43426408258, -7.83212364819, 1.50969080752, 0.304161354887, -0.480848137140, 0.733919099735, -4.05226447797, -1.32849163946, -0.0662381676393, -1.50027454550, -15.0432881193, -0.480848137140, 0.736566900475, 0.337099110791, 89.5751633170, -17.5987402266, -0.376870686323, 1.76478425866, -0.948512871545, 0.241912282487, -1.40296912034, 0.359573676015, -15.0432881193, 5.26249155547, 0.283448392275, 2.51277142788, -14.1007388423, -16.3606587886, -14.1007388423, -0.0662381676393, 1.50969080752, -0.206560379201, 8.83892629996, 5.19487052725, 2.51277142788, -1.32849163946, 7.73624059467, -0.195801329414, 0.359573676015, -1.01550367500, 2.61461575929, 11.0676035914, -7.83212364819, 9.16556607048, -1.41387342026, -0.675358718959, 0.241912282487, -0.873547681475, -2.05718013166, 9.16556607048, -0.206560379201, -3.27086927080, -16.3606587886, -1.50027454550, 0.304161354887, -3.27086927080, 5.19487052725, 1.38599815357, }, { -3.02612919136, -2.57697065912, 6.73360604526, 0.228970207248, -3.05199614679, -1.65265185841, 1.27190685484, -3.04675227459, -0.642957914166, -1.40380767879, 3.00380912726, 2.33797744968, -2.65468288836, 1.19185087310, -0.614509431762, 2.04681763800, -1.21452928814, 2.71948844032, 4.02652212184, -0.695741099095, 2.02175215248, 1.51405062145, 0.0681813707366, -15.1998571420, 3.05266424708, 2.92767457208, 0.646018777457, 1.45683591274, 3.96775742616, 4.68667942184, -0.541588753301, -4.68783610204, -5.73844782065, -0.612057989473, -1.41387342026, -1.64566691985, 1.64544241710, 4.03107288934, 1.78584284172, -4.53452165872, 2.30547304932, -2.66162830552, 0.735988436246, 0.194605943195, -4.82797426774, -1.73724798100, 2.32430877087, -3.54614834121, -0.601676628533, 2.89820975974, 1.31728951722, 1.14597346545, -0.520669323459, 2.97337347268, 10.7287014056, 11.4442099056, 0.854745298683, -3.86961435551, 8.66578251209, -5.85849699332, -0.627258344381, 2.13889983533, -7.06529346522, -0.936251126036, -4.40138514720, -5.72021533230, 0.277616118533, 2.94467407897, 0.908235754809, -4.80044307096, -2.56168688630, -3.93903347767, -15.3285798195, -0.102612168783, 1.75832614461, 2.13648776433, -17.5987402266, 92.6578117154, 4.01280807894, 2.08159759315, -2.32574635157, -2.75853109518, 2.10113876234, -3.24361929777, 2.66720371507, -14.6463852485, -12.5737071842, -17.8481897204, -0.540637942149, 2.77691764137, -15.1668725173, -1.19535906150, 0.216651853125, -3.10671340685, 3.80636994282, 4.87083197795, 0.692207431452, -1.13547734156, 7.33279444374, 0.752358397718, 0.115820235337, 0.191498213268, 2.22376399657, 12.1289294635, 7.93840729882, -10.3530654949, -1.37831976503, -1.50296632734, -0.371207019862, -1.05467036139, 8.61627206225, -2.81745826544, -1.14299204712, -4.24027216807, -20.7829473955, -2.27303616948, -0.702321383383, -1.68292210904, 0.342721870139, 1.85902383774, }, { -3.80493410954, 0.842927830720, 0.248275334921, 0.111484934528, -4.42205372104, 6.43466143584, 1.86609684761, 2.34670913657, 1.97210592684, 3.01638553195, 3.35725030544, 2.61850268380, -1.03267698428, -2.62487054875, -0.175364901065, -0.497817484562, -0.143948880618, 2.84939790460, -1.66259948970, 2.37222909638, 7.54195229339, -14.7745897265, -2.65468288836, 1.65867317606, 4.09190734571, 2.68655900288, 3.18541284620, 3.09071169008, 4.22568698788, 4.96241427809, -3.15515491248, -2.85326303442, -5.50478634897, -3.64730771509, -0.873547681475, -1.73724798100, 2.12704020822, 2.99488054707, 0.624602508586, -3.29390863627, 1.54681324423, -1.90101638341, 5.95579816464, 2.14946668185, -8.65304489492, -2.69413426189, 3.81386715783, -6.22632330604, -0.966763684304, -0.158319857919, 10.3977310850, 11.3982255953, -1.13586621270, -9.04793938552, 1.63364398023, 0.660741621798, 2.00594589649, -1.71528642262, -1.15408470499, -2.98679387144, -2.54666298514, 9.13690958564, -1.67373580774, -2.74395919415, -3.38273805882, -3.83821499890, 1.12185793523, 0.897125204738, 2.11540301866, -1.88530104907, -3.62453739721, -3.06099501395, -0.981000615935, 2.63094122274, 7.39312816784, -12.4019770743, -0.376870686323, 4.01280807894, 96.2328823514, -11.3999775314, -19.3172377973, 5.54952664487, -10.8751916175, -18.0301307705, 0.752523437973, 2.26290931654, 3.58974770676, -3.93793507938, -7.37680265761, -6.68837691359, -1.78235877809, 1.35133816440, -17.7214813554, 2.34564145219, -3.41068706800, -2.61517726585, -0.00969180416604, 3.20833846878, 1.06176307263, 0.663691969363, -1.78976586390, 7.51502639263, 1.72765665257, 1.60500993770, -0.901028953118, -3.18226111466, -1.05467036139, -1.28902728442, -5.42499548254, 18.2660662821, 8.11963810962, -10.9041161162, -4.03303910361, -3.78271517431, -2.04081972113, 1.18570542996, -18.3629095634, 1.55758494558, -3.79629591723, -3.35031062359, }, { -1.38665779695, 0.448765444898, -0.0946103506733, -0.838740155361, -3.29214336856, 5.75150332245, 2.27346737812, 2.71151189023, 1.61158816726, 3.62606894482, 3.26675519699, 2.02183256873, -1.13586621270, -2.07282329380, 1.12394241249, -0.580323425396, -2.34515277457, 0.493403977792, -2.00355051992, 0.279843608035, -12.7497104077, 4.85576722241, -0.520669323459, 0.657839132651, 2.25691717471, 0.821853551219, 1.81135952795, 1.06590212299, 0.219686486452, 1.36958351942, -0.755931664233, -0.230667962931, -3.32897663818, -4.50485903284, -1.80231008148, -4.82797426774, 2.54581189924, 3.46667425859, 1.31823289283, -0.0139864204816, 2.92211067478, 0.0967280348665, 3.60317294936, 1.33472273249, -3.16965487642, -8.65304489492, -1.03526516990, 2.62950027646, 8.80731107037, 8.64381642659, 0.0849587942869, 1.01326108039, -11.5051519493, 1.18069247113, 3.59856635699, 2.73971784574, 0.831206512909, -2.29004601420, 1.20692085121, -2.48488946318, 7.45957428690, -1.41292452560, 0.882177110707, -2.78247617573, -4.32478909853, -2.68209384482, 0.208255474631, 0.292564966958, 0.909198892731, -2.67167545957, -4.94217489682, -4.27782577163, -0.253091316952, 2.76337481959, -11.1390670812, 7.17934350437, 1.76478425866, 2.08159759315, -11.3999775314, 97.9279254243, -34.1516756924, -18.8945373099, 4.66367182442, 4.70409238607, 0.220846817197, -1.77000131659, -1.21391220419, -1.37002058804, -1.59619979390, -0.986603121024, -3.10406777656, 0.532469675084, -18.0786209612, 1.03529123844, -3.81440143326, -3.37577633747, -0.288593708110, 3.11848761998, 1.55270079570, 1.08285467559, -1.77477694233, 6.85809515971, -1.11372675128, -0.201661053047, -2.64461858054, -0.624657997254, 2.13889983533, -0.726464919442, 7.58738509851, 9.13690958564, -10.0418795477, 5.60836397767, -4.70149806626, -3.82849120087, -2.50206994411, 1.20670176701, -16.9846587415, 2.48195738147, -2.76899080156, -2.02151439206, }, { 0.121673303444, 2.74121610464, -3.11650166621, -3.39699380325, -2.20848872348, 3.37785124710, -4.35783988847, -3.21707086342, -4.11852072757, -1.78446843887, -2.99515736580, -3.35179369511, -2.54666298514, -4.22320070153, -6.28473382085, -6.02998849958, -0.172708307440, -3.96373655670, -1.30237338382, 1.65480029254, -18.0169750810, -0.768481463569, -0.627258344381, -2.70772471001, -3.08262042966, -5.35965896485, -3.96916466957, -5.17763354174, -4.73781547117, -3.78125589665, -1.74089982198, -1.10748966817, 2.41906046605, 3.35790524138, 1.31873349495, 0.194605943195, -2.66294670741, -1.96636597240, -1.89452057505, -0.771434475411, -1.99850697532, -1.55906670230, -5.64241517623, -3.22786966042, 1.33472273249, 2.14946668185, 3.33342800563, 0.719583277667, -11.3978370566, 4.48066186429, -3.07052267766, -2.79810435903, 7.45957428690, -0.586681818738, -4.39348055773, -5.04394247808, -2.98199746189, 0.301302209952, -1.38639355346, 1.04860798325, 6.93429729132, 1.18069247113, -0.642532653427, 1.41439353302, 1.32288537996, 1.06752938523, 1.84284292672, -2.18819474404, -1.79665727600, 1.23620042522, 3.10256892136, 3.37896290047, -0.0713480282071, 2.73461452022, -15.7388762514, -1.14582454271, -0.948512871545, -2.32574635157, -19.3172377973, -34.1516756924, 97.5106165352, -12.0586768221, 3.18700577505, 3.72198225871, 2.39181914006, -0.0647828994834, 0.317009408644, 3.69530622097, 3.94431849865, 4.18885217231, 3.12219281403, 6.06537020449, -12.2102995519, 6.65935094182, 1.53728882691, 1.67444252606, 1.99892364104, 4.62640633331, 0.827827410776, -0.208344798672, -0.330263365747, 6.70357901341, -1.38754417573, -0.295170575584, 2.25917246856, 4.67724015175, 2.97337347268, 0.888231594353, 10.0677163024, -9.04793938552, 10.3804109113, 9.16691233076, 0.823733923179, 1.07416732004, 4.57598222658, 6.95343835880, -11.2505893766, 7.91720330292, 3.17903115692, 3.37243472607, }, { 0.171732966065, 2.55767805912, -2.30497741046, -4.48756391546, 5.99953633686, -4.31705493911, -4.09579126929, -3.08366691349, -3.12264250823, -5.08978296436, -3.84237277717, -4.80906526575, -5.42499548254, -1.17578717837, -3.19563732100, -4.70358055171, -4.56923963793, -5.67174203167, -0.344176823369, 1.78263563452, -21.0330481220, 1.73375230332, -0.371207019862, -3.45806031990, -4.23601380227, -2.53196272433, -2.92596621497, -4.03545319173, -3.90690736715, -3.49946492897, -2.13442715547, -0.308055041427, 1.34710462072, 3.35728059368, -0.675888482944, 0.735988436246, -8.02880140394, -7.29749260730, -1.45370351642, 2.89791410635, -4.08938603508, 2.43658406577, -3.59775002064, -5.64241517623, 3.60317294936, 5.95579816464, -6.24502277907, 3.90350490143, 8.86483341561, -10.5458301759, -5.41431685967, -4.36964974991, 7.58738509851, -4.22320070153, -3.49052670024, -4.19782340310, -2.07073322809, 1.71359022390, -0.532432213488, 2.16723095516, 10.0677163024, -2.07282329380, 1.40874140874, 3.70110750688, -0.242624434201, 0.677327563698, -2.26824927103, -0.979733462898, -1.92029423174, 2.85356476469, 1.22098483369, 1.51214093103, -0.518408162699, 1.72187882714, -21.4912539598, 2.98812055676, 0.241912282487, -2.75853109518, 5.54952664487, -18.8945373099, -12.0586768221, 92.9081609273, -18.3575303507, -10.6187303080, -0.523543280774, -1.08325212653, -2.05132354587, 2.94636891811, 3.33357224677, 3.61354047806, 5.24852905716, 7.33859822326, 9.26811669461, -10.9696196737, 5.08742069869, 5.57269052947, 2.38840824158, 4.75341046185, 0.405950073014, -1.16278277850, 7.92839152050, -1.87300467473, -1.09661117537, 0.580982753522, 1.92792536871, 5.69324816715, 1.19185087310, 2.77936969810, 3.45654007290, -2.62487054875, 0.407242738726, 0.783079248832, 11.4112320403, 11.9233162716, 4.08962687016, 6.66691905449, 8.51096261755, -12.2432643529, 3.43150830196, 3.95757418947, }, { -2.34887107486, 0.516993015810, -0.818593816318, -0.503684885921, 2.94669958734, -1.29869010121, 0.892384226942, 0.934294689249, 2.93182498382, 1.17416486145, 2.76659868630, 2.64266037378, -4.42205372104, -1.87300467473, 3.95791893946, 1.77152941632, -4.45236155393, 0.124039501753, -2.53679733505, 1.63938994047, 4.48072367247, -12.6457044171, -3.05199614679, 1.70988267819, 1.39081975589, 0.266964585737, -1.77820375188, -0.0206401687921, 4.63861937546, 4.82579845901, 0.559476174582, -0.811815197803, -1.20360863110, -3.66840017366, -1.01550367500, -3.54614834121, 3.06745698764, 3.23350409469, -0.831516026082, -5.15925382175, 1.53038477142, -4.77986206737, 3.90350490143, 0.719583277667, 2.62950027646, -6.22632330604, 1.77456287105, -5.34623743353, -2.65884432854, 1.96270324942, 11.9416522898, -7.23976744124, -3.29214336856, 6.70357901341, 4.27652301649, 2.06125308493, 1.32988350128, -4.22796727586, 1.05528116547, -2.55234384466, -2.20848872348, 6.85809515971, -0.288433360886, -4.73280164616, -4.70370169779, -1.61502794398, -2.27239000576, 1.65442854956, 3.27367538387, -2.36940709009, -3.78092960240, -0.537906001096, -0.607028592293, 3.75027773845, 5.82889224441, -12.6814395874, -1.40296912034, 2.10113876234, -10.8751916175, 4.66367182442, 3.18700577505, -18.3575303507, 98.2195915061, -36.2386704698, -1.19832194615, 3.47037493945, 3.01521299803, -3.44918321285, -3.58084102688, -2.43434134683, -0.561114436965, 3.91173751298, 5.30877759488, -17.3542721770, -5.29277408478, -4.17525572483, -0.299951186682, 2.87816600487, 0.613440673968, 1.30130103982, 6.12522600352, 0.339061376455, 2.87309717622, 0.429846443576, 0.618454666887, -2.77501741267, 0.191498213269, -1.74755203283, 5.99953633686, 7.51502639263, -0.257197740859, -1.48524032158, 6.35850336621, -11.9243045226, -1.46189605730, 1.30519160208, 2.52869602862, -16.7634577374, -2.93284896764, -2.00425841399, }, { 0.247177449112, 2.16874029149, -2.56428697012, -3.31540906326, 6.12522600352, -4.73421493710, -3.57155025876, -2.90479889313, -1.63606896922, -3.99370888359, -3.14490568256, -3.31381710689, -1.78976586390, -4.31705493911, -4.77212084362, -2.90566379430, -0.852923983700, -6.13796778300, 1.19191624916, 1.88972013476, 0.702694944772, -18.1647344400, 0.115820235337, -4.74087329353, -4.33829916575, 0.888583249480, -0.402406864486, -2.78206804744, -5.49689862569, -5.33485524048, -2.68666481829, -0.822099283250, 2.35700464670, 0.827377726153, -2.96608171915, 2.32430877087, -3.52702931314, -3.30981984540, -1.32677197557, 1.93512326132, -4.37094940786, 2.28539648409, -6.24502277907, 3.33342800563, -1.03526516990, 3.81386715783, -5.22527665799, 1.77456287105, -1.49399239261, -2.99859433160, -13.1943048089, 6.34108150200, -1.77477694233, 3.37785124710, -3.78301578534, -1.97808516555, -2.85350911338, 3.51750054562, -2.03263840131, 1.12297208977, -0.330263365747, 5.75150332245, -2.88072342083, 1.10735995817, 3.85417816513, 2.96750226889, -0.159705863318, -0.973849166874, -4.56409239301, 1.89214896281, 4.35351409207, 3.36886108025, 2.52120643985, 2.76544260503, 2.82072520664, -16.9543023518, 0.359573676015, -3.24361929777, -18.0301307705, 4.70409238607, 3.72198225871, -10.6187303080, -36.2386704698, 98.0986307305, -1.72833866992, -2.67053226402, -4.19712666694, 2.61336859710, 3.04775298559, 4.13254115806, 2.28514157604, 2.28500868480, 4.27517288855, -11.2385279478, 4.96993552301, 6.04967090955, 2.24103669192, 3.72152299620, -0.0823657666345, -1.07761585802, 8.01997590090, -1.29869010121, -1.11357560461, 1.55050062551, 4.62879146440, 1.73634316499, -1.65265185841, 3.04187382428, 7.92839152050, 6.43466143584, -1.56432015213, 3.03302590491, -7.09732086170, 13.3534507787, 3.34668012401, 4.96574729528, 7.19934538749, -11.6729786631, 2.76355973272, 3.97585019365, }, { 1.56010340800, 4.38149458079, -2.70812576928, -2.36678986350, -0.607028592293, -2.68666481829, 0.0872816773913, -1.23652875064, 0.450688627235, -0.655500619147, -1.39758341021, -0.822761627120, -0.981000615935, -2.13442715547, 0.768747418436, -1.79190636860, -0.737208484589, -1.74888357212, 2.67912768460, -4.01214234100, -2.50966202192, -4.10591299042, -15.3285798195, 2.17786885862, -1.01728261213, -2.05191827869, -3.73188144194, -2.97318505675, 0.963561730308, 0.493511139924, 4.68499435657, -1.13007910406, 1.65895067518, -1.52362951526, -3.50345230039, 1.78584284172, 0.648060105356, -0.405485447228, -0.807975698449, -1.92153663320, -2.52050917818, -0.610894684855, -1.45370351642, -1.89452057505, 1.31823289283, 0.624602508586, -1.32677197557, -0.831516026082, 0.401647588297, -0.701150313907, -2.42287091649, -0.234511347270, -0.253091316952, -1.74089982198, 0.306914586681, -1.31988516118, 4.42099749479, 8.66481634482, 1.68797633181, -10.7280805275, -0.0713480282071, -0.755931664233, -0.673633309049, 7.75620353226, -1.18330443691, -1.05510526828, -0.775329098765, -1.65035733438, -1.34997010910, 0.839919235494, -0.424687356220, 0.0688474955952, 3.27695081497, -1.61785491827, -0.721810888033, -2.02931849394, -15.0432881193, 2.66720371507, 0.752523437973, 0.220846817197, 2.39181914006, -0.523543280774, -1.19832194615, -1.72833866992, 95.5885613006, -14.7303964383, 2.44549621665, 3.60249764016, -32.3095409893, -14.7625052036, 3.84465259820, -0.272497579815, 3.39335561421, 0.313854286943, -13.2965885945, 3.17239108681, 2.94831173152, 6.32770429109, 0.110396462681, 2.15730956894, 2.52120643985, 0.559476174582, 4.38226922329, -0.267792101053, 2.82235210499, -0.486534657962, -0.541588753301, 1.80036779883, -0.518408162699, -3.15515491248, -3.83870245603, 8.03071032466, 1.83839328834, 1.17284223635, 4.72477703040, 10.0730498543, -7.84888069700, 7.54335481944, -14.7753124299, 1.42851903350, }, { -1.48444614454, 5.17250072782, -2.15700853736, -0.546162441077, -2.53679733505, -1.11357560461, 1.96844187389, -1.20420235933, 1.57698579440, 0.625586580876, 0.135824431576, 1.77926900938, -1.66259948970, -1.09661117536, 0.261943941164, 2.37060247004, -1.95883804573, 2.22998910694, 0.960378711611, -4.73130890527, -1.91084817595, -1.91776405385, 4.02652212184, -14.8400567409, 2.99608668066, -0.233985776625, -6.40891589527, -0.685276785438, 3.57441254429, 1.92241176595, 4.38226922329, 0.265231994911, -0.995124191103, -2.05981445593, 2.61461575929, -4.53452165872, 2.40375639965, 1.20036859623, -1.92153663320, -2.98718992499, 2.87699128121, -4.43349551400, 2.89791410635, -0.771434475411, -0.0139864204816, -3.29390863627, 1.93512326132, -5.15925382175, -2.04207166717, 1.28248388672, 1.87942139897, 0.00817510064860, -2.00355051992, -1.38754417573, 11.7288926780, 12.9423641628, 0.592951516896, -5.02467448805, -10.4459740465, -4.10554906252, -1.30237338382, -1.11372675128, 9.35576439192, -4.87087529660, -2.18365247431, -2.27640071874, -0.379801943548, 1.87872915877, 2.38263262964, -1.25286666352, -3.07743593625, -3.31927402712, 2.67912768460, -1.15480161496, 0.419196010992, -0.0310057129430, 5.26249155547, -14.6463852485, 2.26290931654, -1.77000131659, -0.0647828994834, -1.08325212653, 3.47037493945, -2.67053226402, -14.7303964383, 92.4347819176, -11.7602653513, -15.5611255551, -17.6100253304, 4.34231891950, 3.14499930424, -1.36735936182, -0.0859737999384, -0.622281335680, -18.8896883403, 3.23042948793, 0.934777145256, 7.13294881956, -0.491483243017, 2.86356084676, 1.19191624916, 2.87309717622, 3.56684831254, 0.829071607073, -0.230362026411, -0.850722933852, 2.22376399657, -1.69920580331, -0.344176823369, 1.72765665257, 12.0459018356, -5.30094184162, -4.19956382234, -4.40884437221, 0.659261570580, 8.54277559021, 9.88998691768, -9.39177531702, -19.8582350703, 2.31078513921, }, { 5.44933609520, -2.90550450174, -2.05424388182, -0.548063667065, -2.34887107486, -1.07761585802, 0.859606531259, 0.590633792225, 1.26843494328, 0.788072126217, 1.72684525309, 1.90846053913, -3.80493410954, -1.16278277850, 2.22704751677, 1.61928012390, -3.34650475961, 1.70972351290, -1.48444614454, -2.13068687021, 0.835336974273, 1.01893534483, -3.02612919136, -13.8647322686, 2.17703943527, -5.44848887444, -2.88743618262, -2.08846228834, 4.24056105166, 3.81509686603, 2.15730956894, 2.02872233283, 1.32144544549, -5.10130764631, -0.195801329414, -2.66162830552, 2.27752614391, 1.78089271632, -0.610894684855, -4.43349551400, 1.74181938409, -4.26269341359, 2.43658406577, -1.55906670230, 0.0967280348665, -1.90101638341, 2.28539648409, -4.77986206737, -1.39501835562, 2.01281383095, 1.39654183047, 1.93731693654, -1.38665779695, -0.208344798672, -8.41395982155, 12.5879849047, 2.04238410188, -6.65812491595, 7.79473120283, -6.05454160848, 0.121673303444, 1.08285467559, 8.12910672884, -4.14858224039, -1.74931105086, -4.09070881500, -0.0846387143668, 2.16993674850, 3.47959864133, -5.36799149000, -1.83014139735, -3.96687513396, 1.56010340800, -0.324682637397, 1.63743331504, 1.44529123062, 0.283448392274, -12.5737071842, 3.58974770676, -1.21391220419, 0.317009408644, -2.05132354587, 3.01521299803, -4.19712666694, 2.44549621665, -11.7602653513, 101.702796460, -35.4362488569, -0.358971552026, -17.4134339546, 1.81852923469, 0.100981600673, 1.02605720546, -0.983369342872, 1.02558937862, -15.7714696397, 8.87802925086, 1.25294322978, 1.68554765668, 1.95882504879, 0.247177449112, 1.30130103982, 2.86356084676, 1.62075751509, 1.39656074305, -1.41314885590, 0.752358397718, -1.00718051189, 0.171732966065, 0.663691969363, 7.96997978451, -3.25072542614, -0.817545630271, -2.90571696531, 10.1470993263, 1.16047660536, 1.88772939286, -1.43661669760, 8.60717933673, -29.6934146419, }, { 8.87802925086, -2.54840826787, -3.64547457306, -3.12036899949, -0.299951186682, -3.31540906326, -3.76674627657, -3.52437410739, -3.16798642674, -4.27079623153, -4.23299685560, -3.80182453265, -0.00969180416601, -4.48756391546, -6.87236432478, -3.20809872200, 0.0509280864458, -4.11294492957, 0.934777145256, -0.222808488642, -2.90899564007, -4.34479292116, 0.692207431452, -21.4030642441, -7.18637400837, -1.43305365901, -1.82528689767, -4.09790992519, -6.03443377457, -6.40393467745, -2.36678986350, 2.26535029574, -0.794133342961, 6.16196222431, -1.30327712967, 2.30547304932, -3.42432463260, -3.60435018208, -2.52050917818, 2.87699128121, -3.95123677566, 1.74181938409, -4.08938603508, -1.99850697532, 2.92211067478, 1.54681324423, -4.37094940786, 1.53038477142, -0.374619659663, -3.04136462819, -2.11136224508, -5.59032944961, -0.288593708110, -3.39699380325, 3.95300330661, -13.9285718417, -2.23364079297, 2.03244291996, 3.05921950333, 0.466615290388, 1.99892364104, -0.838740155361, 5.80288007867, 1.02899668126, 5.39916098902, 3.11372650763, -0.329815234990, -2.12754545184, -2.88446862464, 1.54283271895, 4.26729074902, 1.88099997551, 2.94831173152, 0.0824510449375, -1.67990502431, -2.70739810248, 2.51277142788, -17.8481897204, -3.93793507938, -1.37002058804, 3.69530622097, 2.94636891811, -3.44918321285, 2.61336859710, 3.60249764016, -15.5611255551, -35.4362488569, 96.4300399384, 8.42273496448, -12.9037604338, 6.44221687032, 3.17949645052, 4.83644746149, 3.66237190690, 8.35094501318, -12.4658563158, 13.1815685886, 0.795755172129, 0.723831726613, -0.548063667065, 2.24103669192, -0.503684885921, -0.546162441077, 3.19550859524, 2.06849456445, 5.34531479332, 0.228970207248, 2.52173697735, 2.38840824158, 0.111484934528, 7.29488051492, 1.03203693157, 4.32886732400, 2.55730386708, 13.6325647973, -0.338532291702, 1.39551041680, 5.44273872863, -0.0679883047310, 0.514937591235, }, { 1.81852923469, 4.44558063180, -3.61315415637, -4.09790992519, -0.561114436965, -2.78206804744, -5.83850222330, -7.88914111836, -6.83419264548, -7.04349262793, -7.04252427141, -6.75964659113, -1.78235877809, -4.03545319173, -8.70938048563, -8.09631305473, -1.05123128530, -4.67353237935, 3.14499930424, -2.67538276240, -7.65647231212, -7.68846714904, -15.1668725173, -2.37328471558, -9.22655396238, -3.44409149145, -3.84681126387, -2.60446624975, -9.33786975830, -12.4512214806, -2.97318505675, 0.688957879569, 3.62078617726, 1.29179650177, 2.72940983215, 4.03107288934, -7.90607148418, -6.10713465110, -0.405485447228, 1.20036859623, -3.60435018208, 1.78089271632, -7.29749260730, -1.96636597240, 3.46667425859, 2.99488054707, -3.30981984540, 3.23350409469, -3.31243791773, -6.13678692008, -8.44202922569, -8.64938121805, -3.10406777656, -5.17763354174, -7.53423166744, -8.50314641749, 5.38238026713, -8.39291090002, 0.303358116588, 11.4762396034, 3.12219281403, 1.06590212299, 0.501243283029, 11.0614215636, 5.10529079514, 3.94284580098, -0.425236423370, -2.26857129554, -2.40015513230, 5.24659988964, 6.25670358802, 4.86683987463, 3.84465259820, 0.992142461532, -2.20778938257, -2.51407232447, -14.1007388423, -0.540637942149, -7.37680265761, -1.59619979390, 3.94431849865, 3.33357224677, -3.58084102688, 3.04775298559, -32.3095409893, -17.6100253304, -0.358971552026, 8.42273496448, 102.739840617, -8.33851406616, 9.59785708953, 6.53891567913, 5.85134547356, 4.98178812755, -7.53144107416, 8.69796976280, 6.44221687032, 8.91907078347, 0.573983294049, -2.08846228834, 2.28514157604, -0.0206401687921, -0.685276785438, 2.71510318704, 5.59187838003, 3.07354155736, 1.45683591274, 2.92665381643, 5.24852905716, 3.09071169008, 2.77259210961, 13.2970436677, 7.02062231512, 6.09790724766, 9.54021935880, -5.29735570343, 15.5349777304, 12.3088134260, -9.37774635473, 7.06585597865, }, { 10.1470993263, -3.45130216438, -4.26389011473, -3.76674627657, -1.46189605730, -3.57155025876, -7.61047757684, -5.03263931039, -5.37432696832, -6.20630988686, -7.62228100824, -6.79922199279, -2.04081972113, -4.09579126929, -8.56595466210, -7.84653437912, -1.74931022596, -4.91534081789, 0.659261570580, -0.607862524868, -3.35210644563, -5.14678983453, -20.7829473955, -2.00135462423, -8.49276272601, -3.45626513000, -3.58332670710, -5.83850222330, -11.8893635232, -9.79598600926, 0.0872816773914, -2.14215935276, 7.30349562037, 5.10925342427, -0.527049340161, 1.64544241710, -5.10373631855, -7.90607148418, 0.648060105356, 2.40375639965, -3.42432463260, 2.27752614391, -8.02880140394, -2.66294670741, 2.54581189924, 2.12704020822, -3.52702931314, 3.06745698764, -1.32629124690, -4.18361147861, -6.50929731674, -7.61785716243, -2.50206994411, -4.35783988847, -10.0869608861, -7.88809678529, -14.0912440427, 10.8670443194, -3.02221399632, 11.0796491579, 4.57598222658, 2.27346737812, -1.83170587234, 13.2137268024, 6.13080095654, 4.40043954301, 0.119462679144, -2.59637492575, -1.75773570496, 1.83617274451, 5.64432273403, 3.82132646761, 4.72477703040, -0.217621232298, -2.81004665660, -4.20846320503, -16.3606587886, 2.77691764137, -6.68837691359, -0.986603121024, 4.18885217231, 3.61354047806, -2.43434134683, 4.13254115806, -14.7625052036, 4.34231891950, -17.4134339546, -12.9037604338, -8.33851406616, 94.1372306530, 9.54021935880, 4.93464750296, 5.84810605862, 5.27981451917, 11.0883737153, -13.6004620130, 13.6325647973, 0.314755923607, -1.39535571638, 0.859606531259, 3.34668012401, 0.892384226942, 1.96844187389, -0.538823633149, 6.04429774214, 3.78761175390, 1.27190685484, 3.60711007986, 4.08962687016, 1.86609684761, -2.37033491174, 12.8234289622, 5.93887287961, 4.11196661190, 2.95258478977, 6.24180265424, 7.27804666997, 5.43369561992, 23.4873253383, -1.09564831427, }, { -0.358971552026, -2.40015513230, 5.38238026713, -3.60435018208, -3.58084102688, -3.30981984540, -7.90607148418, -8.50314641749, -8.44202922569, -8.09631305473, -9.33786975830, -6.75964659113, -7.37680265761, -7.29749260730, -9.22655396238, -7.04349262793, -2.51407232447, -7.68846714904, -17.6100253304, -2.26857129554, -6.13678692008, -4.67353237935, -0.540637942149, -2.37328471558, -8.70938048563, -8.64938121805, -7.53423166744, -6.10713465110, -7.04252427141, -12.4512214806, -0.405485447227, 0.303358116589, 0.501243283029, 2.77259210961, 2.72940983215, 1.45683591274, -5.83850222330, -2.60446624975, -2.97318505675, -0.685276785438, -4.09790992519, -2.08846228834, -4.03545319173, -5.17763354174, 1.06590212299, 3.09071169008, -2.78206804744, -0.0206401687921, -2.20778938257, -7.65647231212, -6.83419264548, -3.44409149145, -1.59619979390, -1.96636597240, -3.84681126387, -7.88914111836, -3.61315415637, 0.573983294049, 0.688957879569, 2.71510318704, 3.94431849865, 3.46667425859, 3.62078617725, 5.59187838003, 5.85134547356, 15.5349777304, 0.992142461532, -2.67538276240, 4.44558063180, 8.91907078347, 6.53891567913, -5.29735570343, -32.3095409893, -0.425236423370, -3.31243791773, -1.05123128530, -14.1007388423, -15.1668725173, -1.78235877809, -3.10406777656, 3.12219281403, 5.24852905716, -0.561114436965, 2.28514157604, 3.84465259820, 3.14499930424, 1.81852923469, 6.44221687032, 9.59785708953, 9.54021935880, 102.739840617, 6.25670358802, 5.10529079514, 7.02062231512, -7.53144107416, -9.37774635473, 8.42273496448, 5.24659988964, -8.39291090002, 1.78089271632, 3.04775298559, 3.23350409469, 1.20036859623, 11.4762396034, 11.0614215636, 13.2970436677, 4.03107288934, 2.92665381643, 3.33357224677, 2.99488054707, 1.29179650177, 3.07354155736, 4.98178812755, 12.3088134260, -8.33851406616, 4.86683987463, 3.94284580098, 6.09790724766, 8.69796976280, 7.06585597865, }, { -1.83014139735, -0.0622295296345, -4.06087251037, 3.95300330661, -3.78092960240, -3.78301578534, -10.0869608861, -8.52814552557, -9.94818435373, -6.79002948435, -6.78794619835, -10.1740482357, -3.62453739721, -3.49052670024, -5.77589734195, -8.51024383753, -5.79854447676, -7.13738360177, -3.07743593625, -17.8224916068, -3.79742931057, -1.80161412778, -2.56168688630, -3.49132852619, -5.38655433290, -7.06730433692, -5.19815138695, -7.53423166744, -13.0398138120, -5.72755448944, 0.306914586681, 0.598478445137, 2.06949985359, 4.36501661673, 0.0977904398823, 0.646018777457, -3.58332670710, -3.84681126387, -3.73188144194, -6.40891589527, -1.82528689767, -2.88743618262, -2.92596621497, -3.96916466957, 1.81135952795, 3.18541284620, -0.402406864486, -1.77820375188, -3.21798506775, -3.88179659482, -4.70767664646, -6.47950333593, -4.94217489682, -4.39348055773, -4.33084423350, -3.00247208670, -0.644118167803, 2.59871803433, 0.515781867353, 1.48147473050, 3.10256892136, 3.59856635699, 2.07207252862, 2.69155885333, 13.8048763306, 2.52357226846, 9.55041595013, 7.67248056184, 0.110396186431, 2.90077588087, -5.21236288663, 4.91037153642, -0.424687356220, -31.9189739166, -17.8574115966, -16.0949204373, -0.0662381676392, -1.19535906150, 1.35133816440, 0.532469675084, 6.06537020449, 7.33859822326, 3.91173751298, 2.28500868480, -0.272497579815, -1.36735936182, 0.100981600673, 3.17949645052, 6.53891567913, 4.93464750296, 6.25670358802, 102.873000337, -8.61710023958, -7.46208658743, 4.90918856470, 5.11985745270, 4.26729074902, 6.91329582535, 2.82412258514, -8.41395982155, 4.35351409207, 4.27652301649, 11.7288926780, 2.46454329810, 3.49246198396, 5.49448637986, 10.7287014056, 10.7075152535, 1.22098483369, 1.63364398023, 1.97189302591, 2.44550709798, 11.2369380302, 2.33851044078, 5.64432273403, -8.29754156395, 7.21247353087, 9.29575996071, 5.25351092114, 5.36585346694, }, { -1.74931105086, 0.926481665246, -2.42109281648, -5.59032944961, -4.70370169779, 6.34108150200, -7.61785716243, -7.35459035667, -6.01767315498, -7.15385672093, -6.46198437092, -5.73626900280, -3.38273805882, -4.36964974991, -7.81212664565, -6.93544144105, -4.40445015800, -5.52024849453, -2.18365247431, -18.7096452661, 1.21387395923, -3.35219702054, -4.40138514720, -5.75346587156, -11.4856321658, -6.28804067827, -7.06730433692, -8.64938121805, -7.39504638297, -7.03341058696, -0.234511347270, 0.341986528276, 1.12502630644, 4.26622830396, 1.50831284227, 2.92767457208, -3.45626513000, -3.44409149145, -2.05191827869, -0.233985776625, -1.43305365901, -5.44848887444, -2.53196272433, -5.35965896485, 0.821853551219, 2.68655900288, 0.888583249480, 0.266964585737, -4.29947966233, -7.34212250355, -7.00279693580, -8.41736996603, -4.32478909853, -2.79810435903, -6.47950333593, -5.70466629849, -3.77733627693, 0.116066517666, -0.332001041841, 1.14479443151, 1.32288537996, 1.01326108039, 1.12338280046, 2.13910789756, 15.1580747943, 4.15777877683, -9.90097087751, 7.59505512494, -2.37331479701, 1.34264207773, 13.8048763306, 2.18987516681, -1.18330443691, -14.6112811453, 4.92079954057, 5.68294330736, 1.50969080752, 0.216651853125, -17.7214813554, -18.0786209612, -12.2102995519, 9.26811669461, 5.30877759488, 4.27517288855, 3.39335561421, -0.0859737999384, 1.02605720546, 4.83644746149, 5.85134547356, 5.84810605862, 5.10529079514, -8.61710023958, 94.7298696159, -12.0020462898, 3.32405577632, 3.49249165404, 5.39916098902, 7.85572434880, 3.72182254444, 1.93731693654, 3.85417816513, -7.23976744124, 0.00817510064859, 2.60278409476, 3.05273950099, 4.82287665170, 1.14597346545, 1.57770453761, -0.242624434201, 11.3982255953, 11.6325047244, 12.5784802369, 14.1327613027, 3.23790008991, 6.13080095654, 11.7034791276, -12.0089431300, 9.42849253750, 5.42245148490, 5.64316448556, }, { -0.817545630271, 1.88241502240, -2.87516480264, -6.87236432478, 6.35850336621, -4.77212084362, -8.56595466210, -5.44641221973, -8.74645850396, -6.84928104137, -6.79811016906, -8.15448489157, -4.03303910361, -3.19563732100, -7.15322553675, -7.36867393869, -6.59806078449, -5.59596919541, -4.19956382234, -21.5884745239, -3.89444925619, 1.42580257187, -1.14299204712, -3.70888639990, -4.49896444709, -11.4856321658, -5.38655433290, -8.70938048563, -6.50728434006, -6.35861885328, 0.768747418436, 1.00101216412, 1.45528844758, 2.83654536530, -1.29945312138, 3.05266424708, -8.49276272601, -9.22655396238, -1.01728261213, 2.99608668066, -7.18637400837, 2.17703943527, -4.23601380227, -3.08262042966, 2.25691717471, 4.09190734571, -4.33829916575, 1.39081975589, -6.47364612549, -3.76698308645, -7.33354399261, -7.81212664565, -4.70149806626, -6.28473382085, -5.77589734195, -4.53722062451, -3.06686059009, 1.76170682652, 0.625326118133, 2.00550909998, 0.823733923179, 1.12394241249, 2.91476006270, 4.70811456921, 14.1327613027, 3.47335810570, 6.29032662774, -11.8168960818, -2.22568304570, 2.75496955568, 11.2369380302, 1.26119834948, 1.83839328834, -13.1120021898, 4.46226543485, 4.33952915306, -0.206560379201, -3.10671340685, 2.34564145219, 1.03529123844, 6.65935094182, -10.9696196737, -17.3542721770, -11.2385279478, 0.313854286943, -0.622281335680, -0.983369342872, 3.66237190690, 4.98178812755, 5.27981451917, 7.02062231512, -7.46208658743, -12.0020462898, 98.6684618307, 7.18696222212, 7.31803758939, 4.32886732400, 7.42132958226, 3.51283765151, 2.22704751677, -7.09732086170, 3.95791893946, 0.261943941164, 2.25972447542, 2.87287451220, 5.71434286053, -0.614509431762, 4.67733974278, 11.4112320403, -0.175364901065, 2.01415320722, 3.81743460173, 24.6607223608, 13.9006086275, 5.93887287961, 11.4517516335, 6.80378366108, -9.87229649908, 5.82666009926, 5.83649997367, }, { 1.02558937862, 8.38996332437, -4.86937681595, -6.40393467745, -5.29277408478, -5.33485524048, -9.79598600926, -6.53319254708, -9.33963865749, -7.93679465698, -8.67247228685, -10.7815827017, -3.41068706800, -3.49946492897, -6.35861885328, -7.93679465698, -3.82010252008, -6.26867919373, -18.8896883403, -3.81099339358, -7.03436867550, -6.26867919373, 3.80636994282, -1.38620940730, -6.35861885328, -7.03341058696, -5.72755448944, -12.4512214806, -8.67247228685, -7.53425426384, 0.493511139924, 1.15099202692, 0.691587687635, 3.32517390895, 2.78891110681, 4.68667942184, -9.79598600926, -12.4512214806, 0.493511139924, 1.92241176595, -6.40393467745, 3.81509686603, -3.49946492897, -3.78125589665, 1.36958351942, 4.96241427809, -5.33485524048, 4.82579845901, -4.44273544243, -7.03436867550, -9.33963865749, -7.03341058696, -3.81440143326, -3.78125589665, -5.72755448944, -6.53319254708, -4.86937681595, 2.43697755210, 1.15099202692, 0.606401472974, 1.53728882691, 1.36958351942, 0.691587687635, 1.19761159601, 3.32405577632, 13.6763017879, -0.928902843985, -3.81099339358, 8.38996332437, -5.55402788282, 4.90918856470, 15.2833215316, -13.2965885945, -0.928902843985, -4.44273544243, -3.82010252008, 8.83892629996, 3.80636994282, -3.41068706800, -3.81440143326, 1.53728882691, 5.08742069869, -5.29277408478, 4.96993552301, -13.2965885945, -18.8896883403, 1.02558937862, 8.35094501318, -7.53144107416, 11.0883737153, -7.53144107416, 4.90918856470, 3.32405577632, 7.18696222212, 98.7645681202, -10.6900502580, 8.35094501318, -5.55402788282, 2.43697755210, 3.81509686603, 4.96993552301, 4.82579845901, 1.92241176595, 0.606401472974, 1.19761159601, 3.53402648425, 4.68667942184, 6.98051591347, 5.08742069869, 4.96241427809, 3.32517390895, 3.53402648425, 7.18696222212, 16.5612410921, 11.0883737153, 15.2833215316, 13.6763017879, 16.5612410921, -10.6900502580, 6.94511364434, }, { 8.60717933673, -4.99338303655, -7.36658175599, -4.23299685560, -2.93284896764, -3.14490568256, -7.62228100824, -8.68936039711, -6.52606891117, -7.22139710446, -10.8203866155, -9.41793008863, -3.79629591723, -3.84237277717, -6.79811016906, -7.47507811941, -3.78922402605, -6.45874811277, -19.8582350703, -2.75213165922, -5.29810362710, -5.30466293646, 0.342721870139, 0.470523253304, -6.50728434006, -7.39504638297, -13.0398138120, -7.04252427141, -7.26558298022, -8.67247228685, -1.39758341021, 2.67602940790, 2.78643342225, 5.76091246408, 1.43073220478, 3.96775742616, -11.8893635232, -9.33786975830, 0.963561730308, 3.57441254429, -6.03443377457, 4.24056105166, -3.90690736715, -4.73781547117, 0.219686486452, 4.22568698788, -5.49689862569, 4.63861937546, -2.80677249714, -5.51170646267, -6.57582963161, -6.46198437092, -2.76899080156, -2.99515736580, -6.78794619835, -7.42705630041, -3.04768959184, 0.283315126158, -3.00379402614, 1.17390695484, 3.17903115692, 3.26675519699, -1.48303979002, 2.09320522335, 5.42245148490, 13.2818405765, -0.453212325349, -3.15950591385, -12.7359922823, 12.0368225525, 5.25351092114, 13.1379198417, -14.7753124299, -0.288350770806, -3.05018339346, -3.36354084830, 5.19487052725, 4.87083197795, -2.61517726585, -3.37577633747, 1.67444252606, 5.57269052947, -4.17525572483, 6.04967090955, 3.17239108681, 3.23042948793, -15.7714696397, -12.4658563158, 8.69796976280, -13.6004620130, -9.37774635473, 5.11985745270, 3.49249165404, 7.31803758939, -10.6900502580, 95.0549573511, -0.0679883047309, 7.68438220043, 5.51065378265, 1.72684525309, 2.76355973272, 2.76659868630, 0.135824431576, 2.38818731746, 2.67799341696, 6.18971629783, 3.00380912726, 5.59392466674, 3.43150830196, 3.35725030544, -0.963704921350, 3.30475352149, 5.82666009926, 14.6330225498, 23.4873253383, 7.80962418292, 6.14401133253, 8.95675841254, 21.1906530124, -0.201028443308, }, { -35.4362488569, -2.88446862464, -2.23364079297, -3.95123677566, -3.44918321285, -4.37094940786, -3.42432463260, -13.9285718417, -2.11136224508, -3.20809872200, -6.03443377457, -3.80182453265, -3.93793507938, -4.08938603508, -7.18637400837, -4.27079623153, -2.70739810248, -4.34479292116, -15.5611255551, -2.12754545184, -3.04136462819, -4.11294492957, -17.8481897204, -21.4030642441, -6.87236432478, -5.59032944961, 3.95300330661, -3.60435018208, -4.23299685560, -6.40393467745, -2.52050917818, 3.05921950333, 5.80288007867, 7.29488051492, -1.30327712967, 0.228970207248, -3.76674627657, -4.09790992519, -2.36678986350, -0.546162441077, -3.12036899949, -0.548063667065, -4.48756391546, -3.39699380325, -0.838740155361, 0.111484934528, -3.31540906326, -0.503684885921, -1.67990502431, -2.90899564007, -3.16798642674, -1.43305365901, -1.37002058804, -1.99850697532, -1.82528689767, -3.52437410739, -3.64547457306, 0.723831726613, 2.26535029574, 3.19550859524, 3.69530622097, 2.92211067478, -0.794133342961, 2.06849456445, 4.83644746149, 1.39551041680, 0.0824510449375, -0.222808488642, -2.54840826787, 0.795755172129, 3.17949645052, -0.338532291702, 3.60249764016, -0.329815234990, -0.374619659663, 0.0509280864458, 2.51277142788, 0.692207431452, -0.00969180416604, -0.288593708110, 1.99892364104, 2.38840824158, -0.299951186682, 2.24103669192, 2.94831173152, 0.934777145256, 8.87802925086, 13.1815685886, 6.44221687032, 13.6325647973, 8.42273496448, 4.26729074902, 5.39916098902, 4.32886732400, 8.35094501318, -0.0679883047309, 96.4300399384, 1.54283271895, 2.03244291996, 1.74181938409, 2.61336859710, 1.53038477142, 2.87699128121, 0.466615290388, 1.02899668126, 1.03203693157, 2.30547304932, 2.52173697735, 2.94636891811, 1.54681324423, 6.16196222431, 5.34531479332, 3.66237190690, 5.44273872863, -12.9037604338, 1.88099997551, 3.11372650764, 2.55730386708, -12.4658563158, 0.514937591235, }, { -5.36799149000, -36.1948023840, -4.99880484738, -2.23364079297, -2.36940709009, -2.85350911338, -14.0912440427, -5.53141230965, -3.63980243567, -4.14106321047, -3.04768959184, -5.32764231058, -1.88530104907, -2.07073322809, -3.06686059009, -6.04286677972, -3.04232718639, -3.61884557138, -1.25286666352, -17.0216252500, -18.0874436684, -17.9660620096, -4.80044307096, -3.91494167754, -2.87516480264, -2.42109281648, -4.06087251037, 5.38238026713, -7.36658175599, -4.86937681595, 4.42099749479, -1.83309503743, -1.16880599602, -1.19922432959, 6.33445073191, 6.73360604526, -4.26389011473, -3.61315415637, -2.70812576928, -2.15700853736, -3.64547457306, -2.05424388182, -2.30497741046, -3.11650166621, -0.0946103506733, 0.248275334921, -2.56428697012, -0.818593816318, -2.19163227797, -2.75719522516, -2.09613711355, -3.77733627693, -2.67167545957, -2.98199746189, -0.644118167803, 0.722311796191, 2.66041333492, 2.91664946903, -0.877376856169, 0.401277785420, 1.23620042522, 0.831206512909, 1.41674265601, -0.940801877032, 1.34264207773, 0.0209809415686, 0.503138444413, 0.0555678467829, 1.40809620370, 1.51640273628, 2.90077588087, 1.57307864629, 0.839919235494, 2.38836929911, 2.05840148048, 2.13971609673, -1.32849163946, -1.13547734156, 3.20833846878, 3.11848761998, 4.62640633331, 4.75341046185, 2.87816600487, 3.72152299620, 6.32770429109, 7.13294881956, 1.25294322978, 0.795755172129, 8.91907078347, 0.314755923607, 5.24659988964, 6.91329582535, 7.85572434880, 7.42132958226, -5.55402788282, 7.68438220043, 1.54283271895, 98.0501238084, 1.91572793238, 2.04238410188, 1.89214896281, 1.32988350128, 0.592951516896, 3.22581106136, 2.93931202527, 2.37667671700, 0.854745298683, 0.866154454190, 2.85356476469, 2.00594589649, 3.51366877414, 4.39505757541, 2.75496955568, 2.44544825138, 1.83617274451, -11.3771881230, -10.4179101369, -11.1977046007, 12.0368225525, 3.95863320677, }, { -6.65812491595, -5.29037912148, -36.1948023840, -2.88446862464, -4.22796727586, -4.56409239301, -1.75773570496, -18.3976865898, -17.3220171221, -16.7877815213, -12.7359922823, -4.69893147886, -1.71528642262, -1.92029423174, -2.22568304570, -4.22556084587, -4.33004449477, -5.60682842900, -5.02467448805, -4.48983028873, -2.15868159775, -2.11393300786, -3.86961435551, -3.27561900621, 1.88241502240, 0.926481665246, -0.0622295296345, -2.40015513230, -4.99338303655, 8.38996332437, -1.34997010910, 1.94203511105, -0.0334858524931, -0.244222984889, -4.05226447797, -2.57697065912, -3.45130216438, 4.44558063180, 4.38149458079, 5.17250072782, -2.54840826787, -2.90550450174, 2.55767805912, 2.74121610464, 0.448765444898, 0.842927830720, 2.16874029149, 0.516993015810, -0.0762330275188, 1.81968452702, 0.545331558958, -2.37331479701, -2.29004601420, -1.79665727600, 0.110396186431, 2.91434752106, 1.40809620370, 1.38687323822, -0.377040242349, -1.28003934163, 0.301302209952, 0.909198892731, -1.48564295720, -2.35072651678, 0.116066517666, -5.88796619628, 0.243514488529, 0.918782591640, 2.18345616634, 2.91664946903, 2.59871803433, 0.112462804622, 8.66481634482, 0.0698359663296, 0.840501237418, -0.0789435747566, 7.73624059467, 7.33279444374, 1.06176307263, 1.55270079570, 0.827827410776, 0.405950073013, 0.613440673968, -0.0823657666345, 0.110396462681, -0.491483243017, 1.68554765668, 0.723831726613, 0.573983294049, -1.39535571638, -8.39291090002, 2.82412258514, 3.72182254444, 3.51283765151, 2.43697755210, 5.51065378265, 2.03244291996, 1.91572793238, 98.3558345997, 3.47959864133, 3.51750054562, 3.27367538387, 2.38263262964, -10.8343835093, -12.3582958452, -12.7603680586, 0.908235754809, 1.40680050611, 1.71359022390, 2.11540301866, 4.81301106985, 3.99144669601, 1.76170682652, 3.87026004778, 10.8670443194, 1.63728269312, 2.46532995184, 2.18522773610, 0.283315126158, 3.32191661492, }, { -4.26269341359, -6.65812491595, -5.36799149000, -35.4362488569, -4.77986206737, -4.19712666694, -17.4134339546, -3.96687513396, -4.09070881500, -2.90571696531, -15.7714696397, -29.6934146419, -1.90101638341, -2.05132354587, -0.983369342872, -1.43661669760, -5.10130764631, -1.41314885590, -4.43349551400, -6.05454160848, -4.14858224039, -3.25072542614, -2.66162830552, -1.00718051189, -0.817545630271, -1.74931105086, -1.83014139735, -0.358971552026, 8.60717933673, 1.02558937862, 2.44549621665, -0.0846387143668, -1.39501835562, -3.34650475961, 0.283448392274, -3.02612919136, 10.1470993263, 1.81852923469, 1.56010340800, -1.48444614454, 8.87802925086, 5.44933609520, 0.171732966065, 0.121673303444, -1.38665779695, -3.80493410954, 0.247177449112, -2.34887107486, 1.32144544549, 1.39656074305, 1.88772939286, 1.02605720546, 0.0967280348665, 0.317009408644, 0.100981600673, 1.16047660536, 1.25294322978, -2.90550450174, -0.324682637397, -2.13068687021, -1.55906670230, -1.21391220419, 1.63743331504, 0.835336974273, -5.44848887444, 1.26843494328, 2.02872233283, 1.62075751509, 1.68554765668, -2.05424388182, -2.88743618262, 0.590633792225, -0.610894684855, 7.79473120283, 8.12910672884, 7.96997978451, -0.195801329414, 0.752358397718, 0.663691969363, 1.08285467559, -0.208344798672, -1.16278277850, 1.30130103982, -1.07761585802, 2.15730956894, 2.86356084676, 1.95882504879, -0.548063667065, -2.08846228834, 0.859606531259, 1.78089271632, -8.41395982155, 1.93731693654, 2.22704751677, 3.81509686603, 1.72684525309, 1.74181938409, 2.04238410188, 3.47959864133, 101.702796460, 2.28539648409, 3.01521299803, -11.7602653513, 2.16993674850, 2.01281383095, 1.70972351290, -12.5737071842, -13.8647322686, 2.43658406577, 3.58974770676, 1.44529123062, 1.01893534483, 2.17703943527, 0.788072126217, 2.27752614391, 12.5879849047, 1.39654183047, 1.61928012390, 4.24056105166, 1.90846053913, }, { -4.19712666694, -4.56409239301, -2.85350911338, -4.37094940786, -36.2386704698, -5.22527665799, -3.52702931314, -1.97808516555, -13.1943048089, -2.90566379430, -5.49689862569, -3.31381710689, -18.0301307705, -6.24502277907, -4.33829916575, -3.99370888359, -16.9543023518, -18.1647344400, -2.67053226402, -0.973849166874, -2.99859433160, -6.13796778300, -3.24361929777, -4.74087329353, -4.77212084362, 6.34108150200, -3.78301578534, -3.30981984540, -3.14490568256, -5.33485524048, -1.32677197557, -2.03263840131, -2.88072342083, -1.56432015213, -2.96608171915, -1.65265185841, -3.57155025876, -2.78206804744, -2.68666481829, -1.11357560461, -3.31540906326, -1.07761585802, -4.31705493911, 3.37785124710, 5.75150332245, 6.43466143584, -4.73421493710, -1.29869010121, 2.82072520664, 0.702694944772, -1.63606896922, 0.888583249480, 4.70409238607, 3.33342800563, -0.402406864486, -2.90479889313, -2.56428697012, -0.0823657666345, -0.822099283250, 1.55050062551, 3.72198225871, -1.03526516990, 2.35700464670, 4.62879146440, 4.27517288855, 7.19934538749, 2.76544260503, 1.88972013476, 2.16874029149, 3.72152299620, 2.28500868480, 4.96574729528, -1.72833866992, -0.159705863318, -1.49399239261, -0.852923983700, 0.359573676015, 0.115820235337, -1.78976586390, -1.77477694233, -0.330263365747, 7.92839152050, 6.12522600352, 8.01997590090, 2.52120643985, 1.19191624916, 0.247177449112, 2.24103669192, 2.28514157604, 3.34668012401, 3.04775298559, 4.35351409207, 3.85417816513, -7.09732086170, 4.96993552301, 2.76355973272, 2.61336859710, 1.89214896281, 3.51750054562, 2.28539648409, 98.0986307305, 1.77456287105, 1.93512326132, 1.12297208977, 1.10735995817, 3.03302590491, 2.32430877086, 3.04187382428, -10.6187303080, 3.81386715783, 0.827377726153, 1.73634316499, -11.2385279478, -11.6729786631, 4.13254115806, 3.36886108025, 2.96750226889, 13.3534507787, 6.04967090955, 3.97585019365, }, { -4.77986206737, -4.22796727586, -2.36940709009, -3.44918321285, -5.34623743353, -36.2386704698, -2.43434134683, -0.537906001096, -1.61502794398, -11.9243045226, -4.17525572483, -2.00425841399, -6.22632330604, -18.3575303507, -17.3542721770, -16.7634577374, -3.66840017366, -2.77501741267, -5.15925382175, -2.55234384466, -4.73280164616, -1.48524032158, -3.54614834121, -1.74755203283, 6.35850336621, -4.70370169779, -3.78092960240, -3.58084102688, -2.93284896764, -5.29277408478, -1.19832194615, -2.27239000576, -2.65884432854, -4.45236155393, -1.40296912034, -3.05199614679, -1.46189605730, -0.561114436965, -0.607028592293, -2.53679733505, -0.299951186682, -2.34887107486, 5.99953633686, -2.20848872348, -3.29214336856, -4.42205372104, 6.12522600352, 2.94669958734, -1.20360863110, 0.618454666887, 2.52869602862, 5.30877759488, 2.62950027646, 3.18700577505, 3.91173751298, 1.30519160208, 2.87816600487, 0.516993015810, 3.75027773845, 1.63938994047, 0.719583277667, 4.66367182442, 5.82889224441, 4.48072367247, 0.266964585737, 2.93182498382, -0.811815197803, 0.429846443576, 0.613440673968, -0.818593816318, -1.77820375188, 0.934294689249, -0.831516026082, 1.05528116547, -0.288433360886, -0.257197740859, -1.01550367500, 0.191498213268, 7.51502639263, 6.85809515971, 6.70357901341, -1.87300467473, 0.339061376455, -1.29869010121, 0.559476174582, 2.87309717622, 1.30130103982, -0.503684885921, -0.0206401687921, 0.892384226942, 3.23350409469, 4.27652301649, -7.23976744124, 3.95791893946, 4.82579845901, 2.76659868630, 1.53038477142, 1.32988350128, 3.27367538387, 3.01521299803, 1.77456287105, 98.2195915061, 3.47037493945, 1.65442854956, 1.96270324942, 0.124039501753, 2.10113876234, 1.70988267819, 3.90350490143, -10.8751916175, -12.6814395874, -12.6457044171, 1.39081975589, 1.17416486145, 3.06745698764, 2.06125308493, 11.9416522898, 1.77152941632, 4.63861937546, 2.64266037378, }, { -4.43349551400, -5.02467448805, -1.25286666352, -15.5611255551, -5.15925382175, -2.67053226402, 4.34231891950, -3.31927402712, -2.27640071874, -4.40884437221, 3.23042948793, 2.31078513921, -3.29390863627, -1.08325212653, -0.622281335680, -9.39177531702, -2.05981445593, -0.850722933852, -2.98718992499, -4.10554906252, -4.87087529660, -5.30094184162, -4.53452165872, -1.69920580331, -4.19956382234, -2.18365247431, -3.07743593625, -17.6100253304, -19.8582350703, -18.8896883403, -14.7303964383, -0.379801943548, -2.04207166717, -1.95883804573, 5.26249155547, 4.02652212184, 0.659261570580, 3.14499930424, 2.67912768460, 0.960378711611, 0.934777145256, -1.48444614454, -0.344176823369, -1.30237338382, -2.00355051992, -1.66259948970, 1.19191624916, -2.53679733505, -0.995124191103, -0.230362026411, 9.88998691768, -0.0859737999385, -0.0139864204816, -0.0647828994834, -1.36735936182, 8.54277559021, 7.13294881956, 5.17250072782, -1.15480161496, -4.73130890527, -0.771434475411, -1.77000131659, 0.419196010992, -1.91084817595, -0.233985776625, 1.57698579440, 0.265231994911, 0.829071607073, -0.491483243017, -2.15700853736, -6.40891589527, -1.20420235933, -1.92153663320, -10.4459740465, 9.35576439192, 12.0459018356, 2.61461575929, 2.22376399657, 1.72765665257, -1.11372675128, -1.38754417573, -1.09661117537, 2.87309717622, -1.11357560461, 4.38226922329, 3.56684831254, 2.86356084676, -0.546162441077, -0.685276785438, 1.96844187389, 1.20036859623, 11.7288926780, 0.00817510064860, 0.261943941164, 1.92241176595, 0.135824431576, 2.87699128121, 0.592951516896, 2.38263262964, -11.7602653513, 1.93512326132, 3.47037493945, 92.4347819176, 1.87872915877, 1.28248388672, 2.22998910694, -14.6463852485, -14.8400567409, 2.89791410635, 2.26290931654, -0.0310057129430, -1.91776405385, 2.99608668066, 0.625586580876, 2.40375639965, 12.9423641628, 1.87942139897, 2.37060247004, 3.57441254429, 1.77926900938, }, { -6.05454160848, -4.48983028873, -17.0216252500, -2.12754545184, -2.55234384466, -0.973849166874, -2.59637492575, 3.97463653510, 3.79095739238, 1.70108151577, -3.15950591385, -1.69030572390, -2.98679387144, -0.979733462898, -11.8168960818, -2.45959713642, -2.77795348368, -3.41769576679, -4.10554906252, -1.91383293954, -1.53452144760, -1.76475194051, -5.85849699332, -7.69733034196, -21.5884745239, -18.7096452661, -17.8224916068, -2.26857129554, -2.75213165922, -3.81099339358, -1.65035733438, -15.2978841164, 1.47846360711, 4.41797286516, 0.733919099735, -0.695741099095, -0.607862524868, -2.67538276240, -4.01214234100, -4.73130890527, -0.222808488642, -2.13068687021, 1.78263563452, 1.65480029254, 0.279843608035, 2.37222909638, 1.88972013476, 1.63938994047, -0.876450614864, -1.46089485254, -2.30163312917, 7.59505512494, -2.48488946318, -2.18819474404, 7.67248056184, -2.61762276351, 0.0555678467829, -1.28003934163, 7.71072711834, 9.06274797268, 1.04860798325, 0.292564966958, -4.51946838500, -3.19998558894, 1.14479443151, -1.37410684853, 0.651265875292, -0.0582642072911, 0.918782591640, 0.401277785420, 1.48147473050, -4.57224088644, -10.7280805275, -0.188438998761, -0.156025669468, 2.47431235715, 11.0676035914, 12.1289294635, 1.60500993770, -0.201661053047, -0.295170575584, 0.580982753522, 0.429846443576, 1.55050062551, -0.267792101053, 0.829071607073, 1.62075751509, 3.19550859524, 2.71510318704, -0.538823633149, 11.4762396034, 2.46454329810, 2.60278409476, 2.25972447542, 0.606401472974, 2.38818731746, 0.466615290388, 3.22581106136, -10.8343835093, 2.16993674850, 1.12297208977, 1.65442854956, 1.87872915877, 93.6426102094, -15.7905603561, -14.9716998052, 2.94467407897, 1.68664098403, 2.16723095516, 0.897125204738, 1.83082030725, 2.47930316206, 2.00550909998, 4.26348616172, 11.0796491579, 1.95804453141, 2.17686565290, 2.18580016393, 1.17390695484, 3.10532137185, }, { -4.14858224039, -2.15868159775, -18.0874436684, -3.04136462819, -4.73280164616, -2.99859433160, -4.18361147861, 0.846182241218, 5.02034622785, -0.0438466036696, -5.51170646267, -4.21925717124, -2.74395919415, -10.5458301759, -3.76698308645, -4.43922102010, -3.90795863113, -6.71315349486, -4.87087529660, -1.53452144760, -2.50996423442, -5.14903647973, -0.936251126036, -5.25391663395, -3.89444925619, 1.21387395923, -3.79742931057, -6.13678692008, -5.29810362710, -7.03436867550, -0.701150313907, 0.982437868940, -15.9480158432, 3.73619642795, 0.586904825889, 2.02175215248, -3.35210644563, -7.65647231212, -2.50966202192, -1.91084817595, -2.90899564007, 0.835336974273, -21.0330481220, -18.0169750810, -12.7497104077, 7.54195229339, 0.702694944772, 4.48072367247, -1.85841628415, -2.73796049663, -6.23340209851, -7.34212250355, -2.78247617573, 4.48066186429, -3.88179659482, -2.10738078932, -2.75719522516, -2.35072651678, -3.09523932096, -3.19998558894, 1.41439353302, 8.64381642659, 11.4159072685, 11.0067261524, 2.13910789756, 4.05940570669, -0.0567776177298, -1.46089485254, 1.81968452702, -0.940801877032, 2.69155885333, 4.61452225228, 7.75620353226, 0.137554300282, -1.29586693892, 0.193453132463, -7.83212364819, 7.93840729882, -0.901028953118, -2.64461858054, 2.25917246856, 1.92792536871, 0.618454666887, 4.62879146440, 2.82235210499, -0.230362026411, 1.39656074305, 2.06849456445, 5.59187838003, 6.04429774214, 11.0614215636, 3.49246198396, 3.05273950099, 2.87287451220, 1.19761159601, 2.67799341696, 1.02899668126, 2.93931202527, -12.3582958452, 2.01281383095, 1.10735995817, 1.96270324942, 1.28248388672, -15.7905603561, 92.7490309898, -14.3750955712, 2.89820975974, 3.44568326186, 3.70110750688, -0.158319857919, 3.58769338251, 2.99133463145, 4.70811456921, 8.26954420328, 13.2137268024, 4.07022363329, 3.61855263797, 3.00527857918, 2.09320522335, 4.15892129831, }, { -3.25072542614, -2.11393300786, -17.9660620096, -4.11294492957, -1.48524032158, -6.13796778300, -4.91534081789, 0.699673230686, -0.479123945235, 4.06630928290, -6.45874811277, -5.22313360386, -10.9041161162, -5.67174203167, -5.59596919541, -6.30293519068, -2.12699636533, -3.03529803528, -5.30094184162, -1.76475194051, -5.14903647973, -3.32889805364, -2.81745826544, -1.81557029447, 1.42580257187, -3.35219702054, -1.80161412778, -4.67353237935, -5.30466293646, -6.26867919373, -1.74888357212, 1.83679897869, 3.26782880655, -16.1553457842, -0.156236616844, 1.51405062145, -5.14678983453, -7.68846714904, -4.10591299042, -1.91776405385, -4.34479292116, 1.01893534483, 1.73375230332, -0.768481463569, 4.85576722241, -14.7745897265, -18.1647344400, -12.6457044171, -4.21039938474, -6.71315349486, -3.86241095315, -5.52024849453, 5.60836397767, -3.96373655670, -7.13738360177, -5.97302395553, -3.61884557138, 3.99144669601, -1.08861127329, 2.47930316206, 9.16691233076, 0.493403977792, 0.864511276649, 2.99133463145, 12.5784802369, 14.8468941777, -1.00719159757, -3.41769576679, -5.60682842900, 4.39505757541, 2.44550709798, 4.70113281529, 8.03071032466, 0.149580620670, 0.0380088357487, -2.45376070600, 9.16556607048, -10.3530654949, -3.18226111466, -0.624657997254, 4.67724015175, 5.69324816715, -2.77501741267, 1.73634316499, -0.486534657962, -0.850722933852, -1.41314885590, 5.34531479332, 3.07354155736, 3.78761175390, 13.2970436677, 5.49448637986, 4.82287665170, 5.71434286053, 3.53402648425, 6.18971629783, 1.03203693157, 2.37667671700, -12.7603680586, 1.70972351290, 3.03302590491, 0.124039501753, 2.22998910694, -14.9716998052, -14.3750955712, 93.0369089747, 2.71948844032, 3.53162357437, 0.783079248832, 2.84939790460, 4.24731476814, 6.87948754021, 3.81743460173, 7.41429879343, 12.8234289622, 2.84956457467, 2.26907424018, 3.19368144731, 3.30475352149, 5.38523171468, }, { -2.66162830552, -3.86961435551, -4.80044307096, -17.8481897204, -3.54614834121, -3.24361929777, 2.77691764137, -3.93903347767, -5.72021533230, -4.24027216807, 4.87083197795, 1.85902383774, -1.73724798100, -2.75853109518, -3.10671340685, -1.68292210904, -0.612057989473, -10.3530654949, -4.53452165872, -5.85849699332, -0.936251126037, -2.81745826544, -1.64566691985, -1.50296632734, -1.14299204712, -4.40138514720, -2.56168688630, -0.540637942149, 0.342721870139, 3.80636994282, 2.66720371507, 0.277616118533, -0.601676628533, -1.21452928814, -17.5987402266, 0.0681813707366, -20.7829473955, -15.1668725173, -15.3285798195, 4.02652212184, 0.692207431452, -3.02612919136, -0.371207019862, -0.627258344381, -0.520669323459, -2.65468288836, 0.115820235337, -3.05199614679, -5.73844782065, 7.93840729882, -0.702321383383, 0.216651853125, -4.82797426774, -2.32574635157, -1.19535906150, -2.27303616948, -1.13547734156, -2.57697065912, -0.102612168783, -0.695741099095, 0.194605943195, 2.08159759315, 1.75832614461, 2.02175215248, 2.92767457208, -0.642957914166, -4.68783610204, 12.1289294635, 7.33279444374, 6.73360604526, 0.646018777457, -3.04675227459, 1.78584284172, 8.66578251209, -7.06529346522, 8.61627206225, -1.41387342026, -1.37831976503, -1.05467036139, 2.13889983533, 2.97337347268, 1.19185087310, 0.191498213268, -1.65265185841, -0.541588753301, 2.22376399657, 0.752358397718, 0.228970207248, 1.45683591274, 1.27190685484, 4.03107288934, 10.7287014056, 1.14597346545, -0.614509431762, 4.68667942184, 3.00380912726, 2.30547304932, 0.854745298683, 0.908235754809, -12.5737071842, 2.32430877087, 2.10113876234, -14.6463852485, 2.94467407897, 2.89820975974, 2.71948844032, 92.6578117154, -15.1998571420, 0.735988436246, 4.01280807894, 2.13648776433, 1.51405062145, 3.05266424708, -1.40380767879, 1.64544241710, 11.4442099056, 1.31728951722, 2.04681763800, 3.96775742616, 2.33797744968, }, { -1.00718051189, -3.27561900621, -3.91494167754, -21.4030642441, -1.74755203283, -4.74087329353, -2.00135462423, -3.78877759863, -6.49664214697, -3.15759783481, 0.470523253304, 1.58839264994, -1.28902728442, -3.45806031990, -3.70888639990, -3.15759783481, -10.8310446324, -1.81557029447, -1.69920580331, -7.69733034196, -5.25391663395, -1.81557029447, -1.50296632734, -3.19605235187, -3.70888639990, -5.75346587156, -3.49132852619, -2.37328471558, 0.470523253304, -1.38620940730, 2.17786885862, -0.354029801964, 1.72996653042, 1.02050137931, 0.220345800761, -15.1998571420, -2.00135462423, -2.37328471558, 2.17786885862, -14.8400567409, -21.4030642441, -13.8647322686, -3.45806031990, -2.70772471001, 0.657839132651, 1.65867317606, -4.74087329353, 1.70988267819, 9.09063855211, -5.25391663395, -6.49664214697, -5.75346587156, -0.726464919442, -2.70772471001, -3.49132852619, -3.78877759863, -3.91494167754, 1.40680050611, -0.354029801964, 1.68664098403, 0.888231594353, 0.657839132651, 1.72996653042, 3.44568326186, 1.57770453761, 2.72936358630, 9.02880381129, -7.69733034196, -3.27561900621, 0.866154454190, 10.7075152535, 12.1325078736, 1.80036779883, 9.02880381129, 9.09063855211, -10.8310446324, -0.675358718959, -1.50296632734, -1.28902728442, -0.726464919442, 0.888231594353, 2.77936969810, -1.74755203283, 3.04187382428, 1.80036779883, -1.69920580331, -1.00718051189, 2.52173697735, 2.92665381643, 3.60711007986, 2.92665381643, 10.7075152535, 1.57770453761, 4.67733974278, 6.98051591347, 5.59392466674, 2.52173697735, 0.866154454190, 1.40680050611, -13.8647322686, 3.04187382428, 1.70988267819, -14.8400567409, 1.68664098403, 3.44568326186, 3.53162357437, -15.1998571420, 95.4361312537, 2.77936969810, 1.65867317606, 1.02050137931, 3.53162357437, 4.67733974278, 3.14984948426, 3.60711007986, 12.1325078736, 2.72936358630, 3.14984948426, 5.59392466674, 4.00304809629, }, { -2.05132354587, -1.92029423174, -2.07073322809, -4.08938603508, -18.3575303507, -6.24502277907, -8.02880140394, -4.19782340310, -5.41431685967, -4.70358055171, -3.90690736715, -4.80906526575, 5.54952664487, -3.59775002064, -4.23601380227, -5.08978296436, 2.98812055676, 1.73375230332, -1.08325212653, -0.979733462898, -10.5458301759, -5.67174203167, -2.75853109518, -3.45806031990, -3.19563732100, -4.36964974991, -3.49052670024, -7.29749260730, -3.84237277717, -3.49946492897, -1.45370351642, -0.532432213488, 1.40874140874, 0.407242738726, -0.675888482944, 1.19185087310, -4.09579126929, -4.03545319173, -2.13442715547, -1.09661117536, -4.48756391546, -1.16278277850, -1.17578717837, -4.22320070153, -2.07282329380, -2.62487054875, -4.31705493911, -1.87300467473, -21.4912539598, -21.0330481220, -3.12264250823, -2.53196272433, -18.8945373099, -5.64241517623, -2.92596621497, -3.08366691349, -2.30497741046, 0.405950073014, -0.308055041427, 0.580982753522, -12.0586768221, 3.60317294936, 1.34710462072, 1.92792536871, 9.26811669461, 8.51096261755, 1.72187882714, 1.78263563452, 2.55767805912, 4.75341046185, 7.33859822326, 6.66691905449, -0.523543280774, -2.26824927103, 8.86483341561, -4.56923963793, 0.241912282487, -0.371207019862, -5.42499548254, 7.58738509851, 10.0677163024, 3.45654007290, 5.99953633686, 7.92839152050, -0.518408162699, -0.344176823369, 0.171732966065, 2.38840824158, 5.24852905716, 4.08962687016, 3.33357224677, 1.22098483369, -0.242624434201, 11.4112320403, 5.08742069869, 3.43150830196, 2.94636891811, 2.85356476469, 1.71359022390, 2.43658406577, -10.6187303080, 3.90350490143, 2.89791410635, 2.16723095516, 3.70110750688, 0.783079248832, 0.735988436246, 2.77936969810, 92.9081609273, 5.95579816464, 3.35728059368, 5.69324816715, -10.9696196737, -12.2432643529, 3.61354047806, 1.51214093103, 0.677327563698, 11.9233162716, 5.57269052947, 3.95757418947, }, { -1.90101638341, -1.71528642262, -1.88530104907, -3.93793507938, -6.22632330604, -18.0301307705, -6.68837691359, -3.06099501395, -3.83821499890, -3.78271517431, -2.61517726585, -3.35031062359, -2.69413426189, 5.54952664487, 2.34564145219, 1.55758494558, -3.64730771509, -3.18226111466, -3.29390863627, -2.98679387144, -2.74395919415, -10.9041161162, -1.73724798100, -1.28902728442, -4.03303910361, -3.38273805882, -3.62453739721, -7.37680265761, -3.79629591723, -3.41068706800, 0.752523437973, 1.12185793523, -0.966763684304, -0.143948880618, -0.376870686323, -2.65468288836, -2.04081972113, -1.78235877809, -0.981000615935, -1.66259948970,-0.00969180416607, -3.80493410954, -5.42499548254, -2.54666298514, -1.13586621270, -1.03267698428, -1.78976586390, -4.42205372104, -5.50478634897, -0.901028953118, -18.3629095634, -17.7214813554, -8.65304489492, -19.3172377973, 1.35133816440, 1.18570542996, 3.20833846878, 0.842927830720, 2.63094122274, 2.37222909638, 2.14946668185, -11.3999775314, 7.39312816784, 7.54195229339, 2.68655900288, 1.97210592684, -2.85326303442, 1.60500993770, 1.06176307263, 0.248275334921, 3.18541284620, 2.34670913657, 0.624602508586, -1.15408470499, -1.67373580774, 8.11963810962, -0.873547681475, -1.05467036139, 18.2660662821, 9.13690958564, -9.04793938552, -2.62487054875, 7.51502639263, 6.43466143584, -3.15515491248, 1.72765665257, 0.663691969363, 0.111484934528, 3.09071169008, 1.86609684761, 2.99488054707, 1.63364398023, 11.3982255953, -0.175364901065, 4.96241427809, 3.35725030544, 1.54681324423, 2.00594589649, 2.11540301866, 3.58974770676, 3.81386715783, -10.8751916175, 2.26290931654, 0.897125204738, -0.158319857919, 2.84939790460, 4.01280807894, 1.65867317606, 5.95579816464, 96.2328823514, -12.4019770743, -14.7745897265, 4.09190734571, 3.01638553195, 2.12704020822, 0.660741621798, 10.3977310850, -0.497817484562, 4.22568698788, 2.61850268380, }, { -5.10130764631, -4.33004449477, -3.04232718639, -2.70739810248, -3.66840017366, -16.9543023518, -4.20846320503, -6.03427973474, -3.40654646337, -3.26077886935, -3.36354084830, -2.54663857301, -3.64730771509, 2.98812055676, 4.33952915306, 2.57472739991, -1.53071571540, -2.45376070600, -2.05981445593, -2.77795348368, -3.90795863113, -2.12699636533, -0.612057989473, -10.8310446324, -6.59806078449, -4.40445015800, -5.79854447676, -2.51407232447, -3.78922402605, -3.82010252008, -2.02931849394, -1.83079589154, 0.0169954512305, 1.20436215200, 0.337099110791, -1.21452928814, -1.74931022596, -1.05123128530, -0.737208484589, -1.95883804573, 0.0509280864458, -3.34650475961, -4.56923963793, -0.172708307440, -2.34515277457, -0.143948880618, -0.852923983700, -4.45236155393, -7.05793411218, 0.193453132463, 2.90487823575, 5.68294330736, -4.50485903284, -1.14582454271, -16.0949204373, -19.5588218250, 2.13971609673, -0.244222984889, -15.1465558918, 4.41797286516, 3.35790524138, 7.17934350437, -16.2402478326, 3.73619642794, 4.26622830396, 0.530475704478, -1.87628143369, 2.47431235715, -0.0789435747566, -1.19922432959, 4.36501661673, 0.651472016818, -1.52362951526, -0.774776264366, -1.49196964868, -1.95176042081, -2.05718013166, 8.61627206225, 8.11963810962, -10.0418795477, 10.3804109113, 0.407242738726, -0.257197740859, -1.56432015213, -3.83870245603, 12.0459018356, 7.96997978451, 7.29488051492, 2.77259210961, -2.37033491174, 1.29179650177, 1.97189302591, 11.6325047244, 2.01415320722, 3.32517390895, -0.963704921350, 6.16196222431, 3.51366877414, 4.81301106985, 1.44529123062, 0.827377726153, -12.6814395874, -0.0310057129430, 1.83082030725, 3.58769338251, 4.24731476814, 2.13648776433, 1.02050137931, 3.35728059368, -12.4019770743, 92.1365355516, -16.1553457842, 2.83654536530, 0.166041701236, 5.10925342427, 4.11048986679, 13.8527965563, 2.91896715975, 5.76091246408, 2.11615664827, }, { -1.41314885590, -5.60682842900, -3.61884557138, -4.34479292116, -2.77501741267, -18.1647344400, -5.14678983453, -5.97302395553, -3.86241095315, -6.30293519068, -5.30466293646, -5.22313360386, -3.18226111466, 1.73375230332, 1.42580257187, 4.06630928290, -2.45376070600, -3.32889805364, -0.850722933852, -3.41769576679, -6.71315349486, -3.03529803528, -10.3530654949, -1.81557029447, -5.59596919541, -5.52024849453, -7.13738360177, -7.68846714904, -6.45874811277, -6.26867919373, -4.10591299042, -1.08861127329, 0.864511276649, 4.24731476814, -0.156236616844, 2.71948844032, -4.91534081789, -4.67353237935, -1.74888357212, 2.22998910694, -4.11294492957, 1.70972351290, -5.67174203167, -3.96373655670, 0.493403977792, 2.84939790460, -6.13796778300, 0.124039501753, 0.0380088357487, -5.14903647973, -0.479123945235, -3.35219702054, -0.624657997254, -0.768481463569, -1.80161412778, 0.699673230686, -17.9660620096, -12.7603680586, 1.83679897869, -14.9716998052, 4.67724015175, 4.85576722241, 3.26782880655, -14.3750955712, 4.82287665170, 2.26907424018, 0.149580620670, -1.76475194051, -2.11393300786, 2.37667671700, 5.49448637986, 2.84956457467, -0.486534657962, -1.00719159757, -4.21039938474, -2.12699636533, 9.16556607048, -2.81745826544, -10.9041161162, 5.60836397767, 9.16691233076, 0.783079248832, -1.48524032158, 3.03302590491, 8.03071032466, -5.30094184162, -3.25072542614, 1.03203693157, 13.2970436677, 12.8234289622, 3.07354155736, 2.44550709798, 12.5784802369, 3.81743460173, 3.53402648425, 3.30475352149, 5.34531479332, 4.39505757541, 3.99144669601, 1.01893534483, 1.73634316499, -12.6457044171, -1.91776405385, 2.47930316206, 2.99133463145, 6.87948754021, 1.51405062145, 3.53162357437, 5.69324816715, -14.7745897265, -16.1553457842, 93.0369089747, 5.71434286053, 3.19368144731, 3.78761175390, 4.70113281529, 14.8468941777, 7.41429879343, 6.18971629783, 5.38523171468, }, { -0.983369342872, -2.22568304570, -3.06686059009, -7.18637400837, -17.3542721770, -4.33829916575, -8.49276272601, -4.53722062451, -7.33354399261, -7.36867393869, -6.50728434006, -8.15448489157, 2.34564145219, -4.23601380227, -4.49896444709, -6.84928104137, 4.33952915306, 1.42580257187, -0.622281335680, -11.8168960818, -3.76698308645, -5.59596919541, -3.10671340685, -3.70888639990, -7.15322553675, -7.81212664565, -5.77589734195, -9.22655396238, -6.79811016906, -6.35861885328, -1.01728261213, 0.625326118133, 2.91476006270, 2.01415320722, -1.29945312138, -0.614509431762, -8.56595466210, -8.70938048563, 0.768747418436, 0.261943941163, -6.87236432478, 2.22704751677, -3.19563732100, -6.28473382085, 1.12394241249, -0.175364901065, -4.77212084362, 3.95791893946, 4.46226543485, -3.89444925619, -8.74645850396, -11.4856321658, 1.03529123844, -3.08262042966, -5.38655433290, -5.44641221973, -2.87516480264, 3.51283765151, 1.00101216412, 2.25972447542, 6.65935094182, 2.25691717471, 1.45528844758, 2.87287451220, -12.0020462898, 6.80378366108, -13.1120021898, -21.5884745239, 1.88241502240, 7.42132958226, -7.46208658743, 11.4517516335, 0.313854286943, 6.29032662774, -6.47364612549, -6.59806078449, -0.206560379201, -1.14299204712, -4.03303910361, -4.70149806626, 0.823733923179, 11.4112320403, 6.35850336621, -7.09732086170, 1.83839328834, -4.19956382234, -0.817545630271, 4.32886732399, 7.02062231512, 5.93887287961, 4.98178812755, 11.2369380302, 14.1327613027, 24.6607223608, 7.18696222212, 5.82666009926, 3.66237190690, 2.75496955568, 1.76170682652, 2.17703943527, -11.2385279478, 1.39081975589, 2.99608668066, 2.00550909998, 4.70811456921, 3.81743460173, 3.05266424708, 4.67733974278, -10.9696196737, 4.09190734571, 2.83654536530, 5.71434286053, 98.6684618307, -9.87229649908, 5.27981451917, 1.26119834948, 3.47335810570, 13.9006086275, 7.31803758939, 5.83649997367, }, { -1.43661669760, -4.22556084587, -6.04286677972, -4.27079623153, -16.7634577374, -3.99370888359, -6.20630988686, -8.15841326488, -6.19424392149, -6.15054479643, -7.22139710446, -5.70081880516, 1.55758494558, -5.08978296436, -6.84928104137, -4.59832563694, 2.57472739991, 4.06630928290, -9.39177531702, -2.45959713642, -4.43922102010, -6.30293519068, -1.68292210904, -3.15759783481, -7.36867393869, -6.93544144105, -8.51024383753, -7.04349262793, -7.47507811941, -7.93679465698, -0.655500619147, 0.00520850413779, 3.51830820868, 2.91896715975, -3.12338044576, 2.04681763800, -7.84653437912, -8.09631305473, -1.79190636860, 2.37060247004, -3.20809872200, 1.61928012390, -4.70358055171, -6.02998849958, -0.580323425396, -0.497817484562, -2.90566379430, 1.77152941632, 2.73539255755, -0.0438466036696, -9.62141229527, -7.15385672093, 2.48195738147, -1.78446843887, -6.79002948435, -6.30970603601, -4.14106321047, 2.18522773610, 0.0617025313115, 2.18580016393, 7.91720330292, 3.62606894482, 0.716863814499, 3.00527857918, 9.42849253750, -12.6839240768, 4.18954888030, 1.70108151577, -16.7877815213, -11.1977046007, 9.29575996071, -12.8169778043, 7.54335481944, -2.27483562655, -3.88232908528, -3.26077886935, -3.27086927080, -4.24027216807, -3.78271517431, -3.82849120087, 1.07416732004, 11.9233162716, -11.9243045226, 13.3534507787, 1.17284223635, -4.40884437221, -2.90571696531, 2.55730386708, 6.09790724766, 4.11196661189, 12.3088134260, 2.33851044078, 3.23790008991, 13.9006086275, 16.5612410921, 14.6330225498, 5.44273872863, 2.44544825138, 3.87026004778, 0.788072126217, -11.6729786631, 1.17416486145, 0.625586580876, 4.26348616172, 8.26954420328, 7.41429879343, -1.40380767879, 3.14984948426, -12.2432643529, 3.01638553195, 0.166041701236, 3.19368144731, -9.87229649908, 95.1410445734, 5.43369561992, 5.96833742143, 6.85570362359, 17.3359761659, 8.95675841254, 7.04208824378, }, { -17.4134339546, -1.75773570496, -14.0912440427, -3.42432463260, -2.43434134683, -3.52702931314, -5.10373631855, -7.88809678529, -6.50929731674, -7.84653437912, -11.8893635232, -6.79922199279, -6.68837691359, -8.02880140394, -8.49276272601, -6.20630988686, -4.20846320503, -5.14678983453, 4.34231891950, -2.59637492575, -4.18361147861, -4.91534081789, 2.77691764137, -2.00135462423, -8.56595466210, -7.61785716243, -10.0869608861, -7.90607148418, -7.62228100824, -9.79598600926, 0.648060105356, -3.02221399632, -1.83170587234, -2.37033491174, -0.527049340161, 1.27190685484, -7.61047757684, -5.83850222330, 0.0872816773914, 1.96844187389, -3.76674627657, 0.859606531259, -4.09579126929, -4.35783988847, 2.27346737812, 1.86609684761, -3.57155025876, 0.892384226942, -2.81004665660, -3.35210644563, -5.37432696832, -3.45626513000, -0.986603121024, -2.66294670741, -3.58332670710, -5.03263931039, -4.26389011473, -1.39535571638, -2.14215935276, -0.538823633149, 4.18885217231, 2.54581189924, 7.30349562037, 6.04429774214, 5.84810605862, 7.27804666997, -0.217621232298, -0.607862524868, -3.45130216438, 0.314755923607, 4.93464750296, 6.24180265424, -14.7625052036, 0.119462679144, -1.32629124690, -1.74931022596, -16.3606587886, -20.7829473955, -2.04081972113, -2.50206994411, 4.57598222658, 4.08962687016, -1.46189605730, 3.34668012401, 4.72477703040, 0.659261570580, 10.1470993263, 13.6325647973, 9.54021935880, 2.95258478977, -8.33851406616, 5.64432273403, 6.13080095654, 5.93887287961, 11.0883737153, 23.4873253383, -12.9037604338, 1.83617274451, 10.8670443194, 2.27752614391, 4.13254115806, 3.06745698764, 2.40375639965, 11.0796491579, 13.2137268024, 12.8234289622, 1.64544241710, 3.60711007986, 3.61354047806, 2.12704020822, 5.10925342427, 3.78761175390, 5.27981451917, 5.43369561992, 94.1372306530, 3.82132646761, 4.40043954301, 4.11196661190, -13.6004620130, -1.09564831427, }, { -3.96687513396, -18.3976865898, -5.53141230965, -13.9285718417, -0.537906001096, -1.97808516555, -7.88809678529, -7.36238199152, -6.72390343177, -6.30970603601, -7.42705630041, -13.5953439229, -3.06099501395, -4.19782340310, -4.53722062451, -8.15841326488, -6.03427973474, -5.97302395553, -3.31927402712, 3.97463653510, 0.846182241218, 0.699673230686, -3.93903347767, -3.78877759863, -5.44641221973, -7.35459035667, -8.52814552557, -8.50314641749, -8.68936039711, -6.53319254708, -1.31988516118, 0.0530762724269, 2.05301896597, 0.651472016818, -3.49650206722, -3.04675227459, -5.03263931039, -7.88914111836, -1.23652875064, -1.20420235933, -3.52437410739, 0.590633792225, -3.08366691349, -3.21707086342, 2.71151189023, 2.34670913657, -2.90479889313, 0.934294689249, -1.37163023510, -2.10738078932, -4.05435495795, -5.70466629849, -4.27782577163, -5.04394247808, -3.00247208670, -0.725226738072, 0.722311796191, 0.112462804622, -1.50142740200, -4.57224088644, 3.37896290047, 2.73971784574, 4.42154249574, 4.61452225228, 2.18987516681, 5.64722424249, -1.16301986843, -2.61762276351, 2.91434752106, 1.57307864629, 4.91037153642, 8.60637122639, 0.0688474955951, -14.2515233115, -18.5389743861, -19.5588218250, -1.50027454550, -2.27303616948, 1.18570542996, 1.20670176701, 6.95343835880, 6.66691905449, 1.30519160208, 4.96574729528, 10.0730498543, 8.54277559021, 1.16047660536, -0.338532291702, -5.29735570343, 6.24180265424, 4.86683987463, -8.29754156395, 11.7034791276, 11.4517516335, 15.2833215316, 7.80962418292, 1.88099997551, -11.3771881230, 1.63728269312, 12.5879849047, 3.36886108025, 2.06125308493, 12.9423641628, 1.95804453141, 4.07022363329, 2.84956457467, 11.4442099056, 12.1325078736, 1.51214093103, 0.660741621798, 4.11048986679, 4.70113281529, 1.26119834948, 5.96833742143, 3.82132646761, 95.8253560915, -11.4937924601, -12.8169778043, 13.1379198417, 5.44249526303, }, { -4.09070881500, -17.3220171221, -3.63980243567, -2.11136224508, -1.61502794398, -13.1943048089, -6.50929731674, -6.72390343177, -3.20219830206, -9.62141229527, -6.57582963161, -4.70076357543, -3.83821499890, -5.41431685967, -7.33354399261, -6.19424392149, -3.40654646337, -3.86241095315, -2.27640071874, 3.79095739238, 5.02034622785, -0.479123945235, -5.72021533230, -6.49664214697, -8.74645850396, -6.01767315498, -9.94818435373, -8.44202922569, -6.52606891117, -9.33963865749, -2.42287091649, -0.380210961430, 1.05158253708, 0.530475704477, -1.39059221097, -0.642957914166, -5.37432696832, -6.83419264548, 0.450688627235, 1.57698579440, -3.16798642674, 1.26843494328, -3.12264250823, -4.11852072757, 1.61158816726, 1.97210592684, -1.63606896922, 2.93182498382, -3.51454627695, -6.23340209851, -6.61848412260, -7.00279693580, -2.68209384482, -3.07052267766, -4.70767664646, -4.05435495795, -2.09613711355, -5.88796619628, -2.49753689780, -1.37410684853, 1.06752938523, 0.0849587942870, 3.38103514287, 4.05940570669, 4.15777877683, 7.36241256775, 0.514136212441, -2.30163312917, 0.545331558958, 0.0209809415685, 2.52357226846, 5.64722424249, -1.05510526828, 2.56894077997, 4.01875400135, 2.90487823575, 0.304161354887, -0.702321383383, -18.3629095634, -16.9846587415, -11.2505893766, 8.51096261755, 2.52869602862, 7.19934538749, -7.84888069700, 9.88998691768, 1.88772939286, 1.39551041680, 15.5349777304, 7.27804666997, 3.94284580098, 7.21247353087, -12.0089431300, 6.80378366108, 13.6763017879, 6.14401133253, 3.11372650764, -10.4179101369, 2.46532995184, 1.39654183047, 2.96750226889, 11.9416522898, 1.87942139897, 2.17686565290, 3.61855263797, 2.26907424018, 1.31728951722, 2.72936358630, 0.677327563698, 10.3977310850, 13.8527965563, 14.8468941777, 3.47335810570, 6.85570362359, 4.40043954301, -11.4937924601, 96.4518701114, -12.6839240768, 13.2818405765, 5.80496011766, }, { -2.90571696531, -16.7877815213, -4.14106321047, -3.20809872200, -11.9243045226, -2.90566379430, -7.84653437912, -6.30970603601, -9.62141229527, -4.59832563694, -7.47507811941, -5.70081880516, -3.78271517431, -4.70358055171, -7.36867393869, -6.15054479643, -3.26077886935, -6.30293519068, -4.40884437221, 1.70108151577, -0.0438466036696, 4.06630928290, -4.24027216807, -3.15759783481, -6.84928104137, -7.15385672093, -6.79002948435, -8.09631305473, -7.22139710446, -7.93679465698, -1.79190636860, 0.0617025313114, 0.716863814499, 0.166041701236, -3.12338044576, -1.40380767879, -6.20630988686, -7.04349262793, -0.655500619147, 0.625586580876, -4.27079623153, 0.788072126217, -5.08978296436, -1.78446843887, 3.62606894482, 3.01638553195, -3.99370888359, 1.17416486145, -3.88232908528, -4.43922102010, -6.19424392149, -6.93544144105, -3.82849120087, -6.02998849958, -8.51024383753, -8.15841326488, -6.04286677972, 3.87026004778, 0.00520850413777, 4.26348616172, 1.07416732004, -0.580323425396, 3.51830820868, 8.26954420328, 3.23790008991, 6.85570362359, -2.27483562655, -2.45959713642, -4.22556084587, 2.44544825138, 2.33851044078, 5.96833742143, 1.17284223635, 4.18954888030, 2.73539255755, 2.57472739991, -3.27086927080, -1.68292210904, 1.55758494558, 2.48195738147, 7.91720330292, -12.2432643529, -16.7634577374, -11.6729786631, 7.54335481944, -9.39177531702, -1.43661669760, 5.44273872863, 12.3088134260, 5.43369561992, 6.09790724766, 9.29575996071, 9.42849253750, -9.87229649908, 16.5612410921, 8.95675841254, 2.55730386708, -11.1977046007, 2.18522773610, 1.61928012390, 13.3534507787, 1.77152941632, 2.37060247004, 2.18580016393, 3.00527857918, 3.19368144731, 2.04681763800, 3.14984948426, 11.9233162716, -0.497817484562, 2.91896715975, 7.41429879343, 13.9006086275, 17.3359761659, 4.11196661190, -12.8169778043, -12.6839240768, 95.1410445734, 14.6330225498, 7.04208824378, }, { -15.7714696397, -12.7359922823, -3.04768959184, -6.03443377457, -4.17525572483, -5.49689862569, -11.8893635232, -7.42705630041, -6.57582963161, -7.47507811941, -7.26558298022, -9.41793008863, -2.61517726585, -3.90690736715, -6.50728434006, -7.22139710446, -3.36354084830, -5.30466293646, 3.23042948793, -3.15950591385, -5.51170646267, -6.45874811277, 4.87083197795, 0.470523253304, -6.79811016906, -6.46198437092, -6.78794619835, -9.33786975830, -10.8203866155, -8.67247228685, 0.963561730308, -3.00379402614, -1.48303979002, -0.963704921350, 1.43073220478, 3.00380912726, -7.62228100824, -7.04252427141, -1.39758341021, 0.135824431576, -4.23299685560, 1.72684525309, -3.84237277717, -2.99515736580, 3.26675519699, 3.35725030544, -3.14490568256, 2.76659868630, -3.05018339346, -5.29810362710, -6.52606891117, -7.39504638297, -3.37577633747, -4.73781547117, -13.0398138120, -8.68936039712, -7.36658175599, 5.51065378265, 2.67602940790, 2.38818731746, 1.67444252606, 0.219686486452, 2.78643342225, 2.67799341696, 3.49249165404, 6.14401133253, -0.288350770806, -2.75213165922, -4.99338303655, 7.68438220043, 5.11985745270, 7.80962418292, 3.17239108681, -0.453212325349, -2.80677249714, -3.78922402605, 5.19487052725, 0.342721870139, -3.79629591723, -2.76899080156, 3.17903115692, 3.43150830196, -2.93284896764, 2.76355973272, -14.7753124299, -19.8582350703, 8.60717933673, -0.0679883047309, -9.37774635473, 23.4873253383, 8.69796976280, 5.25351092114, 5.42245148490, 5.82666009926, -10.6900502580, 21.1906530124, -12.4658563158, 12.0368225525, 0.283315126158, 4.24056105166, 6.04967090955, 4.63861937546, 3.57441254429, 1.17390695484, 2.09320522335, 3.30475352149, 3.96775742616, 5.59392466674, 5.57269052947, 4.22568698788, 5.76091246408, 6.18971629783, 7.31803758939, 8.95675841254, -13.6004620130, 13.1379198417, 13.2818405765, 14.6330225498, 95.0549573511, -0.201028443308, }, { -29.6934146419, -4.69893147886, -5.32764231058, -3.80182453265, -2.00425841399, -3.31381710689, -6.79922199279, -13.5953439229, -4.70076357543, -5.70081880516, -9.41793008863, -7.07451952436, -3.35031062359, -4.80906526575, -8.15448489157, -5.70081880516, -2.54663857301, -5.22313360386, 2.31078513921, -1.69030572390, -4.21925717124, -5.22313360386, 1.85902383774, 1.58839264994, -8.15448489157, -5.73626900280, -10.1740482357, -6.75964659113, -9.41793008863, -10.7815827017, -0.822761627120, -1.72460020986, -0.0424397035294, 2.11615664827, 0.170657990262, 2.33797744968, -6.79922199279, -6.75964659112, -0.822761627120, 1.77926900938, -3.80182453265, 1.90846053913, -4.80906526575, -3.35179369511, 2.02183256873, 2.61850268380, -3.31381710689, 2.64266037378, -2.02802672410, -4.21925717124, -4.70076357543, -5.73626900280, -2.02151439206, -3.35179369511, -10.1740482357, -13.5953439229, -5.32764231058, 3.32191661492, -1.72460020986, 3.10532137185, 3.37243472607, 2.02183256873, -0.0424397035295, 4.15892129831, 5.64316448556, 5.80496011766, -0.00675287102233, -1.69030572390, -4.69893147886, 3.95863320677, 5.36585346694, 5.44249526303, 1.42851903350,-0.00675287102233, -2.02802672410, -2.54663857301, 1.38599815357, 1.85902383774, -3.35031062359, -2.02151439206, 3.37243472607, 3.95757418947, -2.00425841399, 3.97585019365, 1.42851903350, 2.31078513921, -29.6934146419, 0.514937591235, 7.06585597865, -1.09564831427, 7.06585597865, 5.36585346694, 5.64316448556, 5.83649997367, 6.94511364434, -0.201028443308, 0.514937591235, 3.95863320677, 3.32191661492, 1.90846053913, 3.97585019365, 2.64266037378, 1.77926900938, 3.10532137185, 4.15892129831, 5.38523171468, 2.33797744968, 4.00304809629, 3.95757418947, 2.61850268380, 2.11615664827, 5.38523171468, 5.83649997367, 7.04208824378, -1.09564831427, 5.44249526303, 5.80496011766, 7.04208824378, -0.201028443308, 119.836425318, } }; ./include/dieharder/dab_dct.h0000664000175000017500000000351013707046103014372 0ustar eddedd/* * dab_dct test header. */ /* * function prototype */ int dab_dct(Test **test, int irun); static Dtest dab_dct_dtest __attribute__((unused)) = { "DAB DCT", "dab_dct", "\ #========================================================================\n\ # DCT (Frequency Analysis) Test\n\ #========================================================================\n\ #\n\ # This test performs a Discrete Cosine Transform (DCT) on the output of\n\ # the RNG. More specifically, it performs tsamples transforms, each over\n\ # an independent block of ntuple words. If tsamples is large enough, the\n\ # positions of the maximum (absolute) value in each transform are\n\ # recorded and subjected to a chisq test for uniformity/independence. [1]\n\ # (A standard type II DCT is used.)\n\ # \n\ # If tsamples is smaller than or equal to 5 times ntuple then a fallback\n\ # test will be used, whereby all DCT values are converted to p-values\n\ # and tested for uniformity via a KS test. This version is significantly\n\ # less sensitive, and is not recommended.\n\ #\n\ # Power: With the right parameters, this test catches more GSL\n\ # generators than any other; however, that count is biased by each of\n\ # the randomNNN generators having three copies.\n\ #\n\ # Limitations: ntuple is required to be a power of 2, because a radix 2\n\ # algorithm is used to calculate the DCT.\n\ #\n\ # False positives: targets are (mostly) calculated exactly, however it\n\ # will still return false positives when ntuple is small and tsamples is\n\ # very large. For the default ntuple value of 256, I get bad scores with\n\ # about 100 million or more tsamples (psamples set to 1).\n\ #\n\ # [1] The samples are taken as unsigned integers, and the DC coefficient\n\ # is adjusted to compensate for this.\n\ #/\n", 1, 50000, 1, dab_dct, 0 }; ./include/dieharder/rgb_operm.h0000664000175000017500000000235513707056130014775 0ustar eddedd/* * rgb_operm test header. */ /* * function prototype */ int rgb_operm(Test **test,int irun); static Dtest rgb_operm_dtest __attribute__((unused)) = { "RGB Overlapping Permuations Test", "rgb_operm", "\n\ #========================================================================\n\ # RGB Overlapping Permutations Test\n\ # Forms both the exact (expected) covariance matrix for overlapping\n\ # permutations of random integer and an empirical covariance matrix\n\ # formed from a long string of samples. The difference is expected\n\ # to have a chisq distribution and hence can be transformed into a\n\ # sample p-value. Note that this is one possible functional replacement\n\ # for the broken/defunct diehard operm5 test, but one that permits k (the\n\ # number of numbers in the overlapping permutation window) to be varied\n\ # from 2 to perhaps 8.\n\ #\n", 100, /* Default psamples */ 100000, /* Default tsamples */ 1, /* We magically make all the bit tests return a single histogram */ rgb_operm, 0 }; /* * Global variables. * * rgb_operm_k is the size of the overlapping window that is slid along * a data stream of rands from x_i to x_{i+k} to compute c[][]. */ extern unsigned int rgb_operm_k; ./include/dieharder/rgb_lagged_sums.h0000664000175000017500000000401313707046103016135 0ustar eddedd/* * This is an example header file for a test. For existing tests these * headers are in the library includes already, but this one is an example * suitable for use as a template. */ /* * The function needs a prototype. In order to use the standard test * creation/destruction/execution routines, the prototype should have * precisely this form. */ int rgb_lagged_sums(Test **test,int irun); /* * This is default data for the test at hand. The first field is * the test name. The second is the test description. The third * is the default number of p-values generated by a run for display * in a histogram and to generate a cumulative test p-value using * Kuiper-Kolmogorov-Smirnov. The fourth is the number of "samples" * accumulated per test, if relevant (some tests do not permit this * to be varied). The fifth and final Dtest parameter is the number * of statistics generated by the test (per test invocation) -- usually * this will be one but for several it is two and could be more. */ static Dtest rgb_lagged_sums_dtest __attribute__((unused)) = { "RGB Lagged Sum Test", "rgb_lagged_sum", "\ #==================================================================\n\ # RGB Lagged Sums Test\n\ # This package contains many very lovely tests. Very few of them,\n\ # however, test for lagged correlations -- the possibility that\n\ # the random number generator has a bitlevel correlation after\n\ # some fixed number of intervening bits.\n\ #\n\ # The lagged sums test is therefore very simple. One simply adds up\n\ # uniform deviates sampled from the rng, skipping lag samples in between\n\ # each rand used. The mean of tsamples samples thus summed should be\n\ # 0.5*tsamples. The standard deviation should be sqrt(tsamples/12).\n\ # The experimental values of the sum are thus converted into a\n\ # p-value (using the erf()) and a ks-test applied to psamples of them.\n\ #==================================================================\n", 100, 1000000, 1, rgb_lagged_sums, 0 }; ./include/dieharder/sts_runs.h0000664000175000017500000000202113707046103014666 0ustar eddedd/* * sts_runs test header. */ /* * function prototype */ int sts_runs(Test **test,int irun); static Dtest sts_runs_dtest __attribute__((unused)) = { "STS Runs Test", "sts_runs", "\ #==================================================================\n\ # STS Runs Test\n\ # Counts the total number of 0 runs + total number of 1 runs across\n\ # a sample of bits. Note that a 0 run must begin with 10 and end\n\ # with 01. Note that a 1 run must begin with 01 and end with a 10.\n\ # This test, run on a bitstring with cyclic boundary conditions, is\n\ # absolutely equivalent to just counting the 01 + 10 bit pairs.\n\ # It is therefore totally redundant with but not as good as the\n\ # rgb_bitdist() test for 2-tuples, which looks beyond the means to the\n\ # moments, testing an entire histogram of 00, 01, 10, and 11 counts\n\ # to see if it is binomially distributed with p = 0.25.\n\ #==================================================================\n", 100, 100000, 1, sts_runs, 0 }; ./include/dieharder/diehard_rank_32x32.h0000664000175000017500000000204213707046103016265 0ustar eddedd/* * diehard_rank_32x32 test header. */ /* * function prototype */ int diehard_rank_32x32(Test **test,int irun); static Dtest diehard_rank_32x32_dtest __attribute__((unused)) = { "Diehard 32x32 Binary Rank Test", "diehard_rank_32x32", "\n\ #==================================================================\n\ # Diehard 32x32 Binary Rank Test\n\ # This is the BINARY RANK TEST for 32x32 matrices. A random 32x\n\ # 32 binary matrix is formed, each row a 32-bit random integer.\n\ # The rank is determined. That rank can be from 0 to 32, ranks\n\ # less than 29 are rare, and their counts are pooled with those\n\ # for rank 29. Ranks are found for 40,000 such random matrices\n\ # and a chisquare test is performed on counts for ranks 32,31,\n\ # 30 and <=29.\n\ #\n\ # As always, the test is repeated and a KS test applied to the\n\ # resulting p-values to verify that they are approximately uniform.\n\ #==================================================================\n", 100, 40000, 1, diehard_rank_32x32, 0 }; ./include/dieharder/dab_monobit2.h0000664000175000017500000000135013707046103015351 0ustar eddedd/* * dab_monobit2 test header. */ /* * function prototype */ int dab_monobit2(Test **test,int irun); static Dtest dab_monobit2_dtest __attribute__((unused)) = { "DAB Monobit 2 Test", "dab_monobit2", "\ #==================================================================\n\ # DAB Monobit 2 Test\n\ # Block-monobit test.\n\ # Since we don't know what block size to use, try multiple block\n\ # sizes. In particular, try all block sizes of 2^k words, where\n\ # k={0..n}. The value of n is calculated from the word size of the\n\ # generator and the sample size used, and is shown as ntuple.\n\ #==================================================================\n", 1, 65000000, 1, dab_monobit2, 0 }; ./include/dieharder/diehard_craps.h0000664000175000017500000000235013707046103015603 0ustar eddedd/* * diehard_craps test header. */ /* * function prototype */ int diehard_craps(Test **test,int irun); static Dtest diehard_craps_dtest __attribute__((unused)) = { "Diehard Craps Test", "diehard_craps", "\ #==================================================================\n\ # Diehard Craps Test\n\ # This is the CRAPS TEST. It plays 200,000 games of craps, finds \n\ # the number of wins and the number of throws necessary to end \n\ # each game. The number of wins should be (very close to) a \n\ # normal with mean 200000p and variance 200000p(1-p), with \n\ # p=244/495. Throws necessary to complete the game can vary \n\ # from 1 to infinity, but counts for all>21 are lumped with 21. \n\ # A chi-square test is made on the no.-of-throws cell counts. \n\ # Each 32-bit integer from the test file provides the value for \n\ # the throw of a die, by floating to [0,1), multiplying by 6 \n\ # and taking 1 plus the integer part of the result. \n\ #==================================================================\n", 100, /* Default psamples */ 200000, /* Default tsamples */ 2, /* This test returns two statistics */ diehard_craps, 0 }; ./include/dieharder/diehard_dna.h0000664000175000017500000000227013707046103015236 0ustar eddedd/* * diehard_dna test header. */ /* * function prototype */ int diehard_dna(Test **test,int irun); static Dtest diehard_dna_dtest __attribute__((unused)) = { "Diehard DNA Test", "diehard_dna", "\ #==================================================================\n\ # Diehard DNA Test.\n\ # \n\ # The DNA test considers an alphabet of 4 letters:: C,G,A,T,\n\ # determined by two designated bits in the sequence of random \n\ # integers being tested. It considers 10-letter words, so that \n\ # as in OPSO and OQSO, there are 2^20 possible words, and the \n\ # mean number of missing words from a string of 2^21 (over- \n\ # lapping) 10-letter words (2^21+9 \"keystrokes\") is 141909. \n\ # The standard deviation sigma=339 was determined as for OQSO \n\ # by simulation. (Sigma for OPSO, 290, is the true value (to \n\ # three places), not determined by simulation. \n\ # \n\ # Note 2^21 = 2097152\n\ # Note also that we don't bother with overlapping keystrokes \n\ # (and sample more rands -- rands are now cheap). \n\ #==================================================================\n", 100, 2097152, 1, diehard_dna, 0 }; ./include/dieharder/diehard_parking_lot.h0000664000175000017500000000226113707046103017005 0ustar eddedd/* * diehard_parking_lot test header. */ /* * function prototype */ int diehard_parking_lot(Test **test,int irun); static Dtest diehard_parking_lot_dtest __attribute__((unused)) = { "Diehard Parking Lot Test", "diehard_parking_lot", "\ #==================================================================\n\ # Diehard Parking Lot Test (modified).\n\ # This tests the distribution of attempts to randomly park a\n\ # square car of length 1 on a 100x100 parking lot without\n\ # crashing. We plot n (number of attempts) versus k (number of\n\ # attempts that didn't \"crash\" because the car squares \n\ # overlapped and compare to the expected result from a perfectly\n\ # random set of parking coordinates. This is, alas, not really\n\ # known on theoretical grounds so instead we compare to n=12,000\n\ # where k should average 3523 with sigma 21.9 and is very close\n\ # to normally distributed. Thus (k-3523)/21.9 is a standard\n\ # normal variable, which converted to a uniform p-value, provides\n\ # input to a KS test with a default 100 samples.\n\ #==================================================================\n", 100, 0, 1, diehard_parking_lot, 0 }; ./include/dieharder/rgb_minimum_distance.h0000664000175000017500000000375713707046103017206 0ustar eddedd/* * rgb_minimum_distance test header */ /* * function prototype */ int rgb_minimum_distance(Test **test,int irun); static Dtest rgb_minimum_distance_dtest __attribute__((unused)) = { "RGB Generalized Minimum Distance Test", "rgb_minimum_distance", "#\n\ # THE GENERALIZED MINIMUM DISTANCE TEST\n\ #\n\ # This is the generalized minimum distance test, based on the paper of M.\n\ # Fischler in the doc directory and private communications. This test\n\ # utilizes correction terms that are essential in order for the test not\n\ # to fail for large numbers of trials. It replaces both\n\ # diehard_2dsphere.c and diehard_3dsphere.c, and generalizes the test\n\ # itself so that it can be run for any d = 2,3,4,5. There is no\n\ # fundamental obstacle to running it for d = 1 or d>5, but one would need\n\ # to compute the expected overlap integrals (q) for the overlapping\n\ # d-spheres in the higher dimensions. Note that in this test there is no\n\ # real need to stick to the parameters of Marsaglia. The test by its\n\ # nature has three controls: n (the number of points used to sample the\n\ # minimum distance) which determines the granularity of the test -- the\n\ # approximate length scale probed for an excess of density; p, the usual\n\ # number of trials; and d the dimension. As Fischler points out, to\n\ # actually resolve problems with a generator that had areas 20% off the\n\ # expected density (consistently) in d = 2, n = 8000 (Marsaglia's\n\ # parameters) would require around 2500 trials, where p = 100 (the old\n\ # test default) would resolve only consistent deviations of around 1.5\n\ # times the expected density. By making both of these user selectable\n\ # parameters, dieharder should be able to test a generator pretty much\n\ # as thoroughly as one likes subject to the generous constraints\n\ # associated with the eventual need for still higher order corrections\n\ # as n and p are made large enough.\n\ #\n", 1000, 10000, 1, rgb_minimum_distance, 0 }; ./include/dieharder/diehard_rank_6x8.h0000664000175000017500000000212513707046103016133 0ustar eddedd/* * diehard_rank_6x8 test header. */ /* * function prototype */ int diehard_rank_6x8(Test **test,int irun); static Dtest diehard_rank_6x8_dtest __attribute__((unused)) = { "Diehard 6x8 Binary Rank Test", "diehard_rank_6x8", "\n\ #==================================================================\n\ # Diehard 6x8 Binary Rank Test\n\ # This is the BINARY RANK TEST for 6x8 matrices. From each of\n\ # six random 32-bit integers from the generator under test, a\n\ # specified byte is chosen, and the resulting six bytes form a\n\ # 6x8 binary matrix whose rank is determined. That rank can be\n\ # from 0 to 6, but ranks 0,1,2,3 are rare; their counts are\n\ # pooled with those for rank 4. Ranks are found for 100,000\n\ # random matrices, and a chi-square test is performed on\n\ # counts for ranks 6,5 and <=4.\n\ #\n\ # As always, the test is repeated and a KS test applied to the\n\ # resulting p-values to verify that they are approximately uniform.\n\ #==================================================================\n", 100, 100000, 1, diehard_rank_6x8, 0 }; ./include/dieharder/marsaglia_tsang_gorilla.h0000664000175000017500000000126513707046103017664 0ustar eddedd/* * Hopefully this is a valid default initialization of the template test. */ static Dtest marsaglia_tsang_gorilla_data = { "Marsaglia and Tsang Gorilla Test", "\n\ #==================================================================\n\ # Marsaglia and Tsang Gorilla Test\n\ #\n\ # THIS TEST IS UNDER CONSTRUCTION! It does not work yet, and what\n\ # is presented is, in fact, the output of the test template.\n\ # Note that the second revision number will bump by one when this\n\ # test is completed -- check back later!\n\ #==================================================================\n", 100, 100000 }; static Dtest *dtest = &marsaglia_tsang_gorilla_data; ./include/dieharder/rgb_lmn.h0000664000175000017500000000126113707046103014433 0ustar eddedd/* * Hopefully this is a valid default initialization of the template test. */ int rgb_lmn(Dtest **dtest,Test **test); static Dtest lmn_test = { "RGB lmn Test", "rgb_lmn_test", "\n\ #==================================================================\n\ # RGB lmn Test\n\ #\n\ # This is a template for a Universal Test (of sorts) that replaces\n\ # or subsumes sts_series and rgb_bitdist. It should prove to be\n\ # a very powerful way of revealing bitlevel correlations and indeed\n\ # should systematically subsume many other tests as well.\n\ #==================================================================\n", 100, 100000 0, rgb_lmn, 0 }; ./include/dieharder/diehard_operm5.h.cruft0000664000175000017500000024133513707046103017034 0ustar eddedd/* * diehard_operm5 test header. */ /* * function prototype */ int diehard_operm5(Test **test, int irun); static Dtest diehard_operm5_dtest = { "Diehard OPERM5 Test", "diehard_operm5", "\n\ #==================================================================\n\ # Diehard Overlapping 5-Permutations Test.\n\ # This is the OPERM5 test. It looks at a sequence of one mill- \n\ # ion 32-bit random integers. Each set of five consecutive \n\ # integers can be in one of 120 states, for the 5! possible or- \n\ # derings of five numbers. Thus the 5th, 6th, 7th,...numbers \n\ # each provide a state. As many thousands of state transitions \n\ # are observed, cumulative counts are made of the number of \n\ # occurences of each state. Then the quadratic form in the \n\ # weak inverse of the 120x120 covariance matrix yields a test \n\ # equivalent to the likelihood ratio test that the 120 cell \n\ # counts came from the specified (asymptotically) normal dis- \n\ # tribution with the specified 120x120 covariance matrix (with \n\ # rank 99). This version uses 1,000,000 integers, twice. \n\ #\n\ # Note that Dieharder runs the test 100 times, not twice, by\n\ # default.\n\ #\n\ # WARNING! This test currently fails ALL RNGs including ones that\n\ # are strongly believed to be \"good\" ones (that pass the other \n\ # dieharder tests). DO NOT USE THIS TEST TO ASSESS RNGs! It very\n\ # likely contains either implementation bugs or incorrect data used\n\ # to compute the test statistic. rgb\n\ #==================================================================\n", 100, 1000000, 1, diehard_operm5, 0 }; static int r[60][60] = { { 5817257, -6873271, -5128747, -5402629, 777663, 980677, 2407731, 2347927, 2954082, 2749952, 2512448, 3103860, 2631372, 1019585, 5833700, -1609797, -136098, 14746, 4199803, 15820046, 15661640, 5888319, -3837421, -1317810, -375269, -496546, 149397, 21483, -341148, 314595, 2772502, 843578, 8843654, -1211426, 2341534, 3013752, 1250340, -699051, -654566, 961558, -2338987, -2621631, 2873613, 1261792, 8000951, -1746067, 6638, -47636, -5088578, -5013620, -3253847, -3180615, 2711412, 3844202, 880534, -1042552, 6946781, -3015244, 406795, 1147260 }, { -6873271, 5940872, -5186478, -5307926, 773214, 938192, 2462991, 2185748, 2756969, 2860993, 2501911, 3080424, 2695718, 1101077, 7899915, -3833937, -175045, -54950, 6072206, 13434946, 15661640, 5768163, -3875391, -1169953, -292941, -536013, 124632, 45505, -337415, 265604, 2721922, 823928, 8523149, -1017852, 2281795, 2999166, 1218871, -700064, -634661, 957048, -2629675, -2235002, 2733295, 1136430, 7885100, -1626583, -58766, 124832, -4795309, -5249849, -3154841, -3094350, 2642865, 3795316, 872576, -1015702, 6779035, -2926770, 386412, 1127795 }, { -5128747, -5186478, 12208259, 1266547, -1384963, -1449671, -3169754, -1595651, -1946939, -1940155, -3378061, -3782485, -1922633, -1103400, -4529238, 1922627, 67943, -594084, -4436559, -10716612, -12948181, -3099354, 3086687, 741196, 127286, 909813, 551771, 418521, -174949, -545067, -1869313, -876135, -7345496, 178672, -2378999, -2769171, -1090475, 331067, 236296, -551403, 2892697, 2810799, -2367546, -1617469, -4838379, 1451362, -568191, 978772, 574172, 2759542, 386836, 3123220, -1235398, -2188412, -119033, 987303, -5601207, 1946655, -583034, -1102184 }, { -5402629, -5307926, 1266547, 12576469, -1912105, -1491496, -1977361, -3787433, -3866431, -3931068, -2169174, -2042830, -2367628, -1217010, -5574861, 2386416, -567819, 399012, -5292193, -13303845, -13360923, -5639180, 3651213, 1466137, 880935, -148585, -363477, -353888, 618037, 631948, -2599440, -1019748, -8865897, 687501, -2968293, -3124000, -1089813, 119334, 419444, -786927, 3367082, 3316348, -2961598, -1738843, -6050705, 1707414, 789397, -308316, 1178460, 3734616, 3617835, 1360963, -2307922, -2689133, -407480, 1067944, -6848988, 2699162, -925197, -1068995 }, { 777663, 773214, -1384963, -1912105, 11788007, 1145706, 1193936, 968826, 3495027, 3575638, 1116536, 3617330, 3145167, 110228, 7883910, -2325769, 103020, -580856, 7068780, 17106824, 17369039, 5744570, -6152687, -983990, -364426, -482051, 205432, 171091, -512242, 192023, 3244057, 1864653, 11153794, -125218, 2622003, 3388711, 1601939, -856517, -817212, 825017, -3038222, -2961270, 3416768, 2474327, 8116870, -1917663, 572557, -258900, -3200854, -5353978, -3054952, -4014445, 410478, 3983005, 1088413, -1375640, 8044077, -3289536, 441887, 1325474 }, { 980677, 938192, -1449671, -1491496, 1145706, 12630118, 3156565, 3488013, 1910767, 1992878, 2735849, 1745194, 2635085, 1072076, 9179053, -2371600, -331321, -726418, 7681229, 19285416, 19432752, 6482845, -4523253, -3272693, -597204, -336131, -60141, 313513, -626813, 170991, 4236377, 1050429, 11461421, -1234081, 3788310, 4585317, 1236864, -894703, -1197329, 1736061, -3427987, -3398261, 5012230, 1426003, 9463295, -1841304, 154862, -198796, -3804025, -5955104, -4195634, -4485277, 2898985, 1978361, 1142239, -988737, 9409193, -3205744, 894517, 1606478 }, { 2407731, 2462991, -3169754, -1977361, 1193936, 3156565, 7707161, -3210627, -1751105, -1898045, -4862023, -3470391, -2214791, -164614, -5625407, 1704720, -162789, 1058901, -4040265, -11094051, -11240782, -4277352, 3075254, 1065447, 234919, -912108, 650889, 150505, 89522, -509848, -1766909, 277069, -7775749, 1180521, -1906123, -2596068, -578000, 357487, 367605, -646039, 2484350, 2560723, -2311007, -195134, -5880504, 1481832, -645252, 765355, 2637470, 2458334, 907216, 2880116, -2988096, -1995274, -783123, 393286, -5564831, 1655303, -297358, -1033184 }, { 2347927, 2185748, -1595651, -3787433, 968826, 3488013, -3210627, 7473799, -3528010, -3376497, -3304459, -1503292, -2411204, 89031, -5943125, 1917870, 1311823, -122953, -4332928, -11706073, -11653524, -3963993, 3185910, 1308114, -1090325, -48253, -510843, -290876, 1024800, 623728, -1974078, 169173, -6030119, -477907, -2291701, -2499215, -533396, 449148, 352872, -885457, 2684378, 2523291, -2661828, -154622, -6156614, 1638839, 973738, -705099, 2787313, 2932584, 3357426, 1068284, -3746916, -2087932, -673963, -44993, -5854907, 2108010, -584389, -737864 }, { 2954082, 2756969, -1946939, -3866431, 3495027, 1910767, -1751105, -3528010, 7674168, -5061376, -1170678, -3391201, -1173129, -624707, -4576847, 1695880, 476307, -158287, -3332444, -9534973, -9589812, -3359207, 2586819, 946168, 852391, -121459, -417820, -187145, -994183, 727155, -1116115, -339665, -5873899, 366444, -529818, -3127321, -861888, 762433, 675088, -804551, 2122875, 2007541, -1390150, -899468, -4708544, 1257097, 336976, -271853, 2382850, 2263714, 2150539, 755793, -943518, -3487005, -942169, 853872, -5023503, 1542516, -396522, -857101 }, { 2749952, 2860993, -1940155, -3931068, 3575638, 1992878, -1898045, -3376497, -5061376, 7676071, -1157770, -3401474, -1256009, -647207, -4486485, 1690858, 608305, -257057, -3350870, -9555891, -9589812, -3250732, 2572294, 948690, 646779, 76395, -432195, -170690, 1147802, -1408811, -1083128, -383340, -5876692, 381082, -2650521, -978117, -962546, 746717, 749606, -760829, 2024721, 2095214, -1355683, -815464, -5012953, 1493020, 421631, -389564, 2325617, 2413194, 2271141, 678383, -1024047, -3555556, -851184, 779183, -4684921, 1214615, -415255, -854396 }, { 2512448, 2501911, -3378061, -2169174, 1116536, 2735849, -4862023, -3304459, -1170678, -1157770, 8064414, -3701394, -2310077, 287117, -5317816, 1555682, 130010, 978906, -4169702, -11195194, -11240782, -4157808, 3204649, 1299856, 130348, 1033123, -1142203, 701920, -27570, -660547, -1635451, -1672910, -5915594, 1031074, -1979946, -2368771, -664404, 614133, 645425, -1082134, 2441715, 2443669, -2964969, -100626, -5598599, 1199646, -218183, 621491, 2897493, 2894383, 1396294, 3009586, -3031303, -2134450, -403409, 839727, -5502336, 1239352, -1319653, -1327582 }, { 3103860, 3080424, -3782485, -2042830, 3617330, 1745194, -3470391, -1503292, -3391201, -3401474, -3701394, 7209204, -664777, -850019, -3914508, 1380687, -396598, 882119, -3458436, -9122862, -9177070, -3454519, 2713532, 1139070, -9605, 1098575, 766756, -1302001, -282375, -582102, -2863014, -392040, -5742588, 66937, -664050, -1225271, -1034744, 544433, 606184, -476333, 2033048, 2032012, -1039768, -1543121, -4192878, 1227365, -664222, 753326, 2349673, 2331917, 192786, 2496085, -814587, -3847450, -315744, 1314137, -4125681, 1287673, -515796, -1501943 }, { 2631372, 2695718, -1922633, -2367628, 3145167, 2635085, -2214791, -2411204, -1173129, -1256009, -2310077, -664777, 9788325, 207618, 816655, -768078, -1874570, -1613116, 235288, 1694932, 1621948, 377883, -507902, -243766, 773939, 679052, 391398, 78143, 70943, 516176, -2961954, 104444, 936801, 186178, -971859, -1257559, 238423, 462669, 670075, 314213, -672481, -566615, -1309880, -1073728, 1594210, 361560, 472243, 414552, -597724, -260047, -772016, -887315, 216603, 1073384, -1323896, -231085, 509060, -359227, 499417, 197952 }, { 1019585, 1101077, -1103400, -1217010, 110228, 1072076, -164614, 89031, -624707, -647207, 287117, -850019, 207618, 9689335, 704290, -2495107, -343154, -545326, 1594815, 4764261, 4694945, 1741823, -997869, -298676, -333203, -157564, 218154, 283497, 127218, -147690, 764431, -2838739, 1284848, -1411175, 796176, 1142228, 598938, -102712, 48775, 1098536, -1137672, -1030484, -190599, -1133802, 2347281, -484327, 960682, 908055, -1281146, -997818, -1308632, -1286716, 1401975, 747166, -70699, -1684165, 2374406, -334264, -130586, 172260 }, { 5833700, 7899915, -4529238, -5574861, 7883910, 9179053, -5625407, -5943125, -4576847, -4486485, -5317816, -3914508, 816655, 704290, 12856576, -3650442, -153223, -509349, 2984690, 6258554, 6402344, 758796, -1671327, -526914, 472, -173308, 381688, -160284, 71948, 598991, 1047898, -1081349, 5230227, 283473, 949081, 1517248, 1102581, -184126, -184437, 1235250, -2015041, -1859118, 2256388, 834088, 2086134, -801538, -649920, 1155134, -692225, -1974792, -1934348, -2169637, 884616, 1606568, 60140, -2105033, 4180691, -919229, -60329, 382106 }, { -1609797, -3833937, 1922627, 2386416, -2325769, -2371600, 1704720, 1917870, 1695880, 1690858, 1555682, 1380687, -768078, -2495107, -3650442, 16061715, 284740, 738712, -15990290, -39765302, -39992484, -13609368, 9753282, 2972046, 156313, 398252, -793746, -90924, 240150, -692225, -6722501, -3772274, -23064086, 2458558, -6920292, -7778422, -2161491, 1501233, 1325224, -2446757, 7918006, 7606452, -6908594, -2985205, -19436137, 4164401, 147843, -1345055, 8477804, 9636350, 9222882, 9766063, -6790882, -8657391, -2361496, 460093, -18777173, 6979470, -2385573, -3107404 }, { -136098, -175045, 67943, -567819, 103020, -331321, -162789, 1311823, 476307, 608305, 130010, -396598, -1874570, -343154, -153223, 284740, 8943975, -1726046, -4422865, -11965780, -11979204, -4298851, 3162346, 1105638, -1701684, 969212, -119091, -9373, -1028843, -1922549, -3197247, -773590, -6887291, 370210, -890213, -1733307, -744361, 921020, 773952, -860450, 2177367, 2171512, -1578001, 82087, -6649715, 2701955, -2078191, -154198, 2614010, 2515825, 2606238, 3755822, -2042299, -3216470, -2271286, 202674, -5822175, 1364777, 91778, -759997 }, { 14746, -54950, -594084, 399012, -580856, -726418, 1058901, -122953, -158287, -257057, 978906, 882119, -1613116, -545326, -509349, 738712, -1726046, 9279076, -4122768, -12397404, -12391946, -4508748, 3316732, 1261182, 601366, -1733920, -1652447, -1685738, 458865, 205135, -3458419, -842673, -6972261, 527616, -1230943, -1544141, -784368, 985452, 885839, -1107901, 2315732, 2157857, -1772253, 29449, -5009984, 946688, -309783, -1779855, 2773685, 2303574, 3556282, 2884208, -2088659, -2834284, -2541311, 179041, -5926123, 1727548, -243610, -508396 }, { 4199803, 6072206, -4436559, -5292193, 7068780, 7681229, -4040265, -4332928, -3332444, -3350870, -4169702, -3458436, 235288, 1594815, 2984690, -15990290, -4422865, -4122768, -169515, -28616431, -28456656, -8272206, 5944023, 1391497, 485357, 302324, -110825, -524670, -196731, -977499, -4449426, -1278290, -17503766, 1839778, -4409581, -5168434, -1911570, 1277831, 1087315, -2245147, 5878400, 5664632, -5254766, -2052598, -12525819, 2249452, -760678, -200644, 5096033, 7585065, 6981948, 5551021, -4598968, -6184469, -1312378, 1910194, -14358844, 4952535, -1312334, -2111121 }, { 15820046, 13434946, -10716612, -13303845, 17106824, 19285416, -11094051, -11706073, -9534973, -9555891, -11195194, -9122862, 1694932, 4764261, 6258554, -39765302, -11965780, -12397404, -28616431, 30614535, 17938173, 6069703, -5141440, -2452230, -103399, -496191, 122684, 393306, -3324, 566726, 3441613, 1599877, 10965699, -524256, 3387788, 3919040, 1422213, -446145, -526119, 1510412, -3928170, -3932323, 3871650, 1934802, 8916034, -2690702, 481386, 192736, -4163786, -3890368, -6141496, -4425174, 3039163, 4071256, 1008284, -859215, 8542837, -2865634, 1060847, 1616493 }, { 15661640, 15661640, -12948181, -13360923, 17369039, 19432752, -11240782, -11653524, -9589812, -9589812, -11240782, -9177070, 1621948, 4694945, 6402344, -39992484, -11979204, -12391946, -28456656, 17938173, 17938173, 996719, -2434152, 932374, -96427, -220179, -58991, 238588, 118573, 324122, 1231670, 777902, 3346342, -205884, 1209513, 1379528, 452829, -128851, 99329, 589815, -1361698, -1180023, 1389694, 949257, 2644065, -1080600, 338992, -127446, -1231583, -2950726, -956807, -1519733, 628094, 1443407, 427124, -92232, 2537576, -990861, 413479, 652123 }, { 5888319, 5768163, -3099354, -5639180, 5744570, 6482845, -4277352, -3963993, -3359207, -3250732, -4157808, -3454519, 377883, 1741823, 758796, -13609368, -4298851, -4508748, -8272206, 6069703, 996719, -471422, 6195991, 1113967, 149453, 586130, -240462, -399150, -155398, -961888, -4449688, -1287357, -15294819, -325756, -4396733, -5152212, -2127711, 1175047, 1191243, -2026174, 5763885, 5756828, -5394757, -2209287, -15074258, 4780945, -306775, -304869, 6116930, 5044574, 5755905, 5855058, -3347241, -5023645, -1292896, 1911983, -12155731, 2753977, -1306931, -2119034 }, { -3837421, -3875391, 3086687, 3651213, -6152687, -4523253, 3075254, 3185910, 2586819, 2572294, 3204649, 2713532, -507902, -997869, -1671327, 9753282, 3162346, 3316732, 5944023, -5141440, -2434152, 6195991, 30596457, 5128965, 754357, 967489, -977486, -1008316, 643303, -1400440, -12958386, -4650101, -44458241, 1661554, -12902311, -14956077, -5499032, 2838837, 2653009, -5547818, 15749833, 15441678, -14780057, -6668242, -36591537, 9732117, -1394283, -684778, 17053686, 16846975, 16925457, 17740069, -10816408, -17150081, -3704620, 4622406, -35229968, 10987703, -3590848, -5669752 }, { -1317810, -1169953, 741196, 1466137, -983990, -3272693, 1065447, 1308114, 946168, 948690, 1299856, 1139070, -243766, -298676, -526914, 2972046, 1105638, 1261182, 1391497, -2452230, 932374, 1113967, 5128965, 17938173, 654583, 1067326, -996386, -996386, 654583, -1409128, -13004611, -4694945, -44687429, 1707399, -12946569, -15010281, -5549450, 2760215, 2760215, -5549450, 15661640, 15661640, -14868401, -6558735, -36722790, 9672038, -1267248, -854505, 17073993, 17073993, 17227159, 17639902, -13090061, -15153773, -3685660, 4624005, -35368479, 11026349, -3627619, -5691331 }, { -375269, -292941, 127286, 880935, -364426, -597204, 234919, -1090325, 852391, 646779, 130348, -9605, 773939, -333203, 472, 156313, -1701684, 601366, 485357, -103399, -96427, 149453, 754357, 654583, 9631898, -1482633, 54818, -22922, -3162578, -1646591, -1985126, -1181733, -7097260, 453277, -3345419, -1996393, -812280, 784881, 857171, -502614, 2435906, 2422919, -1673523, -1532476, -5928779, 1352122, -1765015, 288456, 2407858, 2242905, 2337000, 3499857, -1642341, -2653975, -104749, 1590181, -6486955, 2704544, -2191444, -860476 }, { -496546, -536013, 909813, -148585, -482051, -336131, -912108, -48253, -121459, 76395, 1033123, 1098575, 679052, -157564, -173308, 398252, 969212, -1733920, 302324, -496191, -220179, 586130, 967489, 1067326, -1482633, 9131652, -1750631, -1402232, -1529487, 433940, -1873892, -1577241, -7430724, 775874, -3809289, -1785056, -851404, 930039, 885092, -756411, 2516119, 2516287, -1981708, -1520743, -6312272, 1579176, 443212, -1765501, 2589914, 2723308, 3868037, 2631217, -2338451, -2857429, -336626, 1456269, -4733684, 1188362, -2559537, -533359 }, { 149397, 124632, 551771, -363477, 205432, -60141, 650889, -510843, -417820, -432195, -1142203, 766756, 391398, 218154, 381688, -793746, -119091, -1652447, -110825, 122684, -58991, -240462, -977486, -996386, 54818, -1750631, 9635236, -3480355, 234715, -1713339, -1786009, -942300, -6582053, 567358, -1268897, -3199024, 94337, 278625, 223866, -1227, 1998075, 1954983, -1882173, -989347, -4837419, 1501913, -378133, -1579650, 2169282, 1939921, 2835185, 2284326, -1471866, -2331364, 603310, 774412, -4564306, 1649815, 546095, -3560514 }, { 21483, 45505, 418521, -353888, 171091, 313513, 150505, -290876, -187145, -170690, 701920, -1302001, 78143, 283497, -160284, -90924, -9373, -1685738, -524670, 393306, 238588, -399150, -1008316, -996386, -22922, -1402232, -3480355, 9133055, 576931, -1838090, -1575644, -546667, -5974924, 102294, -1609096, -3954897, 245672, 84620, 174242, 69164, 2035174, 2040868, -2039600, -666835, -5288842, 1679362, -63614, -1983947, 2125508, 2331261, 3175056, 2199594, -1918560, -2327297, 474751, 231166, -5196035, 1875155, -931648, -1133053 }, { -341148, -337415, -174949, 618037, -512242, -626813, 89522, 1024800, -994183, 1147802, -27570, -282375, 70943, 127218, 71948, 240150, -1028843, 458865, -196731, -3324, 118573, -155398, 643303, 654583, -3162578, -1529487, 234715, 576931, 9773489, -1862392, -1398658, -521372, -7079075, 102521, -4088987, -2503670, -646979, 958975, 915398, -912326, 2433740, 2400479, -2163102, -1113484, -6239150, 1369007, -1551509, -55720, 2828224, 2821130, 3000805, 3768919, -2097824, -2821885, -223074, -602973, -4947020, 2564102, -2223357, -901689 }, { 314595, 265604, -545067, 631948, 192023, 170991, -509848, 623728, 727155, -1408811, -660547, -582102, 516176, -147690, 598991, -692225, -1922549, 205135, -977499, 566726, 324122, -961888, -1400440, -1409128, -1646591, 433940, -1713339, -1838090, -1862392, 8706420, -1366175, -519201, -5818939, 115095, -1601087, -4568129, 257121, -40389, -142522, 367959, 2032813, 1977819, -1731039, -1039554, -4723662, 1379294, -2100472, 68686, 2239639, 2209012, 1929147, 3196402, -1858975, -2543681, -956770, 713196, -4624084, 1609316, 1105386, -1561099 }, { 2772502, 2721922, -1869313, -2599440, 3244057, 4236377, -1766909, -1974078, -1116115, -1083128, -1635451, -2863014, -2961954, 764431, 1047898, -6722501, -3197247, -3458419, -4449426, 3441613, 1231670, -4449688, -12958386, -13004611, -1985126, -1873892, -1786009, -1575644, -1398658, -1366175, 9977044, -10005, 738692, -243966, -1685611, -1277420, 613866, 998578, -1141612, 274748, -398265, -403453, -1280821, 1087012, 1393099, 592586, 376394, 72343, -801939, -841500, -544546, -895294, -133277, 916054, -1535713, -471115, 418431, -500743, 23010, 169846 }, { 843578, 823928, -876135, -1019748, 1864653, 1050429, 277069, 169173, -339665, -383340, -1672910, -392040, 104444, -2838739, -1081349, -3772274, -773590, -842673, -1278290, 1599877, 777902, -1287357, -4650101, -4694945, -1181733, -1577241, -942300, -546667, -521372, -519201, -10005, 10057852, 1115332, -1483870, 684017, 102058, 1144549, 128732, 125507, -700360, -851573, -849399, 1747805, -1125075, 2181772, -307616, 882249, 761661, -1217332, -1182985, -1419944, -1535269, 1248311, 347458, -226997, -1943992, 1859797, -501906, 59397, -138990 }, { 8843654, 8523149, -7345496, -8865897, 11153794, 11461421, -7775749, -6030119, -5873899, -5876692, -5915594, -5742588, 936801, 1284848, 5230227, -23064086, -6887291, -6972261, -17503766, 10965699, 3346342, -15294819, -44458241, -44687429, -7097260, -7430724, -6582053, -5974924, -7079075, -5818939, 738692, 1115332, 19603777, -3093355, 2705916, 3198213, 1279848, -89116, -147602, 1323054, -2640907, -4821370, 3326828, 26654, 9292167, -2513710, -56919, -250815, -4451120, -3165932, -3434306, -3564544, 3493641, 3467468, 724596, -622178, 6745180, -2739488, 752126, 1361112 }, { -1211426, -1017852, 178672, 687501, -125218, -1234081, 1180521, -477907, 366444, 381082, 1031074, 66937, 186178, -1411175, 283473, 2458558, 370210, 527616, 1839778, -524256, -205884, -325756, 1661554, 1707399, 453277, 775874, 567358, 102294, 102521, 115095, -243966, -1483870, -3093355, 10734403, -5132425, -6004834, -2452839, 1523012, 1570478, -2067370, 5007404, 7163899, -6403237, -4721012, -15151743, 5283223, -625742, -179878, 7573329, 6289278, 6598196, 7073180, -3058860, -5889436, -1742525, 2385418, -14706099, 3413449, -1547209, -2557578 }, { 2341534, 2281795, -2378999, -2968293, 2622003, 3788310, -1906123, -2291701, -529818, -2650521, -1979946, -664050, -971859, 796176, 949081, -6920292, -890213, -1230943, -4409581, 3387788, 1209513, -4396733, -12902311, -12946569, -3345419, -3809289, -1268897, -1609096, -4088987, -1601087, -1685611, 684017, 2705916, -5132425, 9429030, -1579437, 323947, -1105324, 1021651, 613824, -400720, -407706, -1344265, -157865, 297588, -536963, 876120, 576127, -238217, -239680, -462730, -697919, 368196, 1243333, 216098, 769755, 1283325, 568448, -1851094, -247410 }, { 3013752, 2999166, -2769171, -3124000, 3388711, 4585317, -2596068, -2499215, -3127321, -978117, -2368771, -1225271, -1257559, 1142228, 1517248, -7778422, -1733307, -1544141, -5168434, 3919040, 1379528, -5152212, -14956077, -15010281, -1996393, -1785056, -3199024, -3954897, -2503670, -4568129, -1277420, 102058, 3198213, -6004834, -1579437, 9563652, -146178, -106418, -81968, 1318504, -838181, -809205, -1197217, 321988, 1677085, -495026, 393228, 642730, -913139, -910948, -1384543, -1249486, 527322, 1555940, 1777437, -318896, 1831454, -476864, 1224177, -662168 }, { 1250340, 1218871, -1090475, -1089813, 1601939, 1236864, -578000, -533396, -861888, -962546, -664404, -1034744, 238423, 598938, 1102581, -2161491, -744361, -784368, -1911570, 1422213, 452829, -2127711, -5499032, -5549450, -812280, -851404, 94337, 245672, -646979, 257121, 613866, 1144549, 1279848, -2452839, 323947, -146178, 8838223, 129822, 106460, -3781000, 978397, 950268, -2389032, -686959, -3009043, 548512, -1637754, -1939260, 1143706, 1010841, 1661983, 1453029, -1245950, -1105731, -1908689, -872500, -2607359, 887605, -2120318, -762565 }, { -699051, -700064, 331067, 119334, -856517, -894703, 357487, 449148, 762433, 746717, 614133, 544433, 462669, -102712, -184126, 1501233, 921020, 985452, 1277831, -446145, -128851, 1175047, 2838837, 2760215, 784881, 930039, 278625, 84620, 958975, -40389, 998578, 128732, -89116, 1523012, -1105324, -106418, 129822, 9407258, -3329207, -543404, 495433, 481935, -639390, -1645077, -2949971, -1125543, -437749, -331550, 723091, 653061, 720077, 769009, -491982, -982378, -1366743, -1520225, -2789582, -1051088, 760491, -358717 }, { -654566, -634661, 236296, 419444, -817212, -1197329, 367605, 352872, 675088, 749606, 645425, 606184, 670075, 48775, -184437, 1325224, 773952, 885839, 1087315, -526119, 99329, 1191243, 2653009, 2760215, 857171, 885092, 223866, 174242, 915398, -142522, -1141612, 125507, -147602, 1570478, 1021651, -81968, 106460, -3329207, 9412838, -543963, 529994, 533542, -878505, -1815960, -2987879, -1027427, -342803, -215904, 671108, 727978, 768631, 578377, -543201, -699854, 759555, -1492685, -2966777, -947133, -1393669, -375174 }, { 961558, 957048, -551403, -786927, 825017, 1736061, -646039, -885457, -804551, -760829, -1082134, -476333, 314213, 1098536, 1235250, -2446757, -860450, -1107901, -2245147, 1510412, 589815, -2026174, -5547818, -5549450, -502614, -756411, -1227, 69164, -912326, 367959, 274748, -700360, 1323054, -2067370, 613824, 1318504, -3781000, -543404, -543963, 9322729, 990421, 993122, -2766044, -920818, -3085722, 719448, -1609236, -1539816, 1326448, 1448740, 981107, 1344461, -797117, -1314329, -1795929, 1202468, -3038978, 843359, -1429736, -3222343 }, { -2338987, -2629675, 2892697, 3367082, -3038222, -3427987, 2484350, 2684378, 2122875, 2024721, 2441715, 2033048, -672481, -1137672, -2015041, 7918006, 2177367, 2315732, 5878400, -3928170, -1361698, 5763885, 15749833, 15661640, 2435906, 2516119, 1998075, 2035174, 2433740, 2032813, -398265, -851573, -2640907, 5007404, -400720, -838181, 978397, 495433, 529994, 990421, 5600698, -7094995, 3505347, 1677739, 8777107, -3043075, 174980, -6288, -5704747, -5414472, -5816802, -5963228, 1298304, 2336971, 941672, -922438, 7623462, -1994802, 918570, 1451741 }, { -2621631, -2235002, 2810799, 3316348, -2961270, -3398261, 2560723, 2523291, 2007541, 2095214, 2443669, 2032012, -566615, -1030484, -1859118, 7606452, 2171512, 2157857, 5664632, -3932323, -1180023, 5756828, 15441678, 15661640, 2422919, 2516287, 1954983, 2040868, 2400479, 1977819, -403453, -849399, -4821370, 7163899, -407706, -809205, 950268, 481935, 533542, 993122, -7094995, 5669038, 3381247, 1560351, 8618204, -2849997, 119959, 158191, -5430756, -5669979, -5805779, -5828349, 1234328, 2315406, 937305, -900239, 9610408, -4033535, 902614, 1438372 }, { 2873613, 2733295, -2367546, -2961598, 3416768, 5012230, -2311007, -2661828, -1390150, -1355683, -2964969, -1039768, -1309880, -190599, 2256388, -6908594, -1578001, -1772253, -5254766, 3871650, 1389694, -5394757, -14780057, -14868401, -1673523, -1981708, -1882173, -2039600, -2163102, -1731039, -1280821, 1747805, 3326828, -6403237, -1344265, -1197217, -2389032, -639390, -878505, -2766044, 3505347, 3381247, 9684432, 119461, 1491972, -864527, -1862235, -1619349, -650694, -930447, -1076932, -1168424, 832989, -74466, 856824, 741985, 1744852, -825050, 859086, 695081 }, { 1261792, 1136430, -1617469, -1738843, 2474327, 1426003, -195134, -154622, -899468, -815464, -100626, -1543121, -1073728, -1133802, 834088, -2985205, 82087, 29449, -2052598, 1934802, 949257, -2209287, -6668242, -6558735, -1532476, -1520743, -989347, -666835, -1113484, -1039554, 1087012, -1125075, 26654, -4721012, -157865, 321988, -686959, -1645077, -1815960, -920818, 1677739, 1560351, 119461, 9760389, 1434945, -2639535, -197156, -543339, -1300570, -1619230, -1579874, -1620101, 27263, 1559717, 1159568, 218374, 3651176, -685618, 106377, 630957 }, { 8000951, 7885100, -4838379, -6050705, 8116870, 9463295, -5880504, -6156614, -4708544, -5012953, -5598599, -4192878, 1594210, 2347281, 2086134, -19436137, -6649715, -5009984, -12525819, 8916034, 2644065, -15074258, -36591537, -36722790, -5928779, -6312272, -4837419, -5288842, -6239150, -4723662, 1393099, 2181772, 9292167, -15151743, 297588, 1677085, -3009043, -2949971, -2987879, -3085722, 8777107, 8618204, 1491972, 1434945, 13873087, -3395506, 344530, -88120, -2871807, -2466149, -2305917, -2707507, 1670567, 2475144, 1381304, -88777, 5538967, -1315201, 127143, 743682 }, { -1746067, -1626583, 1451362, 1707414, -1917663, -1841304, 1481832, 1638839, 1257097, 1493020, 1199646, 1227365, 361560, -484327, -801538, 4164401, 2701955, 946688, 2249452, -2690702, -1080600, 4780945, 9732117, 9672038, 1352122, 1579176, 1501913, 1679362, 1369007, 1379294, 592586, -307616, -2513710, 5283223, -536963, -495026, 548512, -1125543, -1027427, 719448, -3043075, -2849997, -864527, -2639535, -3395506, 14738568, -577570, -177486, 8031699, 7662445, 9117774, 9535613, -6246703, -8146638, -1076730, 2607313, -18135663, 7145410, -2145377, -2919021 }, { 6638, -58766, -568191, 789397, 572557, 154862, -645252, 973738, 336976, 421631, -218183, -664222, 472243, 960682, -649920, 147843, -2078191, -309783, -760678, 481386, 338992, -306775, -1394283, -1267248, -1765015, 443212, -378133, -63614, -1551509, -2100472, 376394, 882249, -56919, -625742, 876120, 393228, -1637754, -437749, -342803, -1609236, 174980, 119959, -1862235, -197156, 344530, -577570, 8948369, -1764389, 2088085, 2503927, 2545236, 1574731, -1638344, -2525936, -59661, 1356156, -5360968, 1502987, 392027, -368960 }, { -47636, 124832, 978772, -308316, -258900, -198796, 765355, -705099, -271853, -389564, 621491, 753326, 414552, 908055, 1155134, -1345055, -154198, -1779855, -200644, 192736, -127446, -304869, -684778, -854505, 288456, -1765501, -1579650, -1983947, -55720, 68686, 72343, 761661, -250815, -179878, 576127, 642730, -1939260, -331550, -215904, -1539816, -6288, 158191, -1619349, -543339, -88120, -177486, -1764389, 9130925, 2218720, 2309016, 1411297, 2630133, -1528201, -2222238, -340818, 1438399, -5296828, 1729061, 115197, -229295 }, { -5088578, -4795309, 574172, 1178460, -3200854, -3804025, 2637470, 2787313, 2382850, 2325617, 2897493, 2349673, -597724, -1281146, -692225, 8477804, 2614010, 2773685, 5096033, -4163786, -1231583, 6116930, 17053686, 17073993, 2407858, 2589914, 2169282, 2125508, 2828224, 2239639, -801939, -1217332, -4451120, 7573329, -238217, -913139, 1143706, 723091, 671108, 1326448, -5704747, -5430756, -650694, -1300570, -2871807, 8031699, 2088085, 2218720, 5288782, -2468150, -3178646, -3176211, 1064242, 1810760, 357359, -1230268, 7368719, -2040753, 949232, 1171497 }, { -5013620, -5249849, 2759542, 3734616, -5353978, -5955104, 2458334, 2932584, 2263714, 2413194, 2894383, 2331917, -260047, -997818, -1974792, 9636350, 2515825, 2303574, 7585065, -3890368, -2950726, 5044574, 16846975, 17073993, 2242905, 2723308, 1939921, 2331261, 2821130, 2209012, -841500, -1182985, -3165932, 6289278, -239680, -910948, 1010841, 653061, 727978, 1448740, -5414472, -5669979, -930447, -1619230, -2466149, 7662445, 2503927, 2309016, -2468150, 5337396, -5819478, -6125576, 3533536, 4354519, 428621, -1309456, 9322395, -3447675, 1028222, 1316063 }, { -3253847, -3154841, 386836, 3617835, -3054952, -4195634, 907216, 3357426, 2150539, 2271141, 1396294, 192786, -772016, -1308632, -1934348, 9222882, 2606238, 3556282, 6981948, -6141496, -956807, 5755905, 16925457, 17227159, 2337000, 3868037, 2835185, 3175056, 3000805, 1929147, -544546, -1419944, -3434306, 6598196, -462730, -1384543, 1661983, 720077, 768631, 981107, -5816802, -5805779, -1076932, -1579874, -2305917, 9117774, 2545236, 1411297, -3178646, -5819478, 11962726, 1120471, -1276353, -2407025, -519383, 544834, -4922921, 2040958, -357661, -999724 }, { -3180615, -3094350, 3123220, 1360963, -4014445, -4485277, 2880116, 1068284, 755793, 678383, 3009586, 2496085, -887315, -1286716, -2169637, 9766063, 3755822, 2884208, 5551021, -4425174, -1519733, 5855058, 17740069, 17639902, 3499857, 2631217, 2284326, 2199594, 3768919, 3196402, -895294, -1535269, -3564544, 7073180, -697919, -1249486, 1453029, 769009, 578377, 1344461, -5963228, -5828349, -1168424, -1620101, -2707507, 9535613, 1574731, 2630133, -3176211, -6125576, 1120471, 11932308, -1257381, -1942319, -740746, 603229, -4828882, 2181421, -504243, -933866 }, { 2711412, 2642865, -1235398, -2307922, 410478, 2898985, -2988096, -3746916, -943518, -1024047, -3031303, -814587, 216603, 1401975, 884616, -6790882, -2042299, -2088659, -4598968, 3039163, 628094, -3347241, -10816408, -13090061, -1642341, -2338451, -1471866, -1918560, -2097824, -1858975, -133277, 1248311, 3493641, -3058860, 368196, 527322, -1245950, -491982, -543201, -797117, 1298304, 1234328, 832989, 27263, 1670567, -6246703, -1638344, -1528201, 1064242, 3533536, -1276353, -1257381, 12468168, 2467027, 616024, -1458923, 8802460, -2560956, 999619, 1240917 }, { 3844202, 3795316, -2188412, -2689133, 3983005, 1978361, -1995274, -2087932, -3487005, -3555556, -2134450, -3847450, 1073384, 747166, 1606568, -8657391, -3216470, -2834284, -6184469, 4071256, 1443407, -5023645, -17150081, -15153773, -2653975, -2857429, -2331364, -2327297, -2821885, -2543681, 916054, 347458, 3467468, -5889436, 1243333, 1555940, -1105731, -982378, -699854, -1314329, 2336971, 2315406, -74466, 1559717, 2475144, -8146638, -2525936, -2222238, 1810760, 4354519, -2407025, -1942319, 2467027, 13625898, 957609, -1467811, 10212037, -2432498, 1187653, 1760262 }, { 880534, 872576, -119033, -407480, 1088413, 1142239, -783123, -673963, -942169, -851184, -403409, -315744, -1323896, -70699, 60140, -2361496, -2271286, -2541311, -1312378, 1008284, 427124, -1292896, -3704620, -3685660, -104749, -336626, 603310, 474751, -223074, -956770, -1535713, -226997, 724596, -1742525, 216098, 1777437, -1908689, -1366743, 759555, -1795929, 941672, 937305, 856824, 1159568, 1381304, -1076730, -59661, -340818, 357359, 428621, -519383, -740746, 616024, 957609, 8529162, 44483, -3881070, 914013, -2915631, -1377678 }, { -1042552, -1015702, 987303, 1067944, -1375640, -988737, 393286, -44993, 853872, 779183, 839727, 1314137, -231085, -1684165, -2105033, 460093, 202674, 179041, 1910194, -859215, -92232, 1911983, 4622406, 4624005, 1590181, 1456269, 774412, 231166, -602973, 713196, -471115, -1943992, -622178, 2385418, 769755, -318896, -872500, -1520225, -1492685, 1202468, -922438, -900239, 741985, 218374, -88777, 2607313, 1356156, 1438399, -1230268, -1309456, 544834, 603229, -1458923, -1467811, 44483, 9139606, -4197005, -1086105, 333347, -1196056 }, { 6946781, 6779035, -5601207, -6848988, 8044077, 9409193, -5564831, -5854907, -5023503, -4684921, -5502336, -4125681, 509060, 2374406, 4180691, -18777173, -5822175, -5926123, -14358844, 8542837, 2537576, -12155731, -35229968, -35368479, -6486955, -4733684, -4564306, -5196035, -4947020, -4624084, 418431, 1859797, 6745180, -14706099, 1283325, 1831454, -2607359, -2789582, -2966777, -3038978, 7623462, 9610408, 1744852, 3651176, 5538967, -18135663, -5360968, -5296828, 7368719, 9322395, -4922921, -4828882, 8802460, 10212037, -3881070, -4197005, 13337711, -3610183, 1073383, 753978 }, { -3015244, -2926770, 1946655, 2699162, -3289536, -3205744, 1655303, 2108010, 1542516, 1214615, 1239352, 1287673, -359227, -334264, -919229, 6979470, 1364777, 1727548, 4952535, -2865634, -990861, 2753977, 10987703, 11026349, 2704544, 1188362, 1649815, 1875155, 2564102, 1609316, -500743, -501906, -2739488, 3413449, 568448, -476864, 887605, -1051088, -947133, 843359, -1994802, -4033535, -825050, -685618, -1315201, 7145410, 1502987, 1729061, -2040753, -3447675, 2040958, 2181421, -2560956, -2432498, 914013, -1086105, -3610183, 15732413, -1189288, -2921216 }, { 406795, 386412, -583034, -925197, 441887, 894517, -297358, -584389, -396522, -415255, -1319653, -515796, 499417, -130586, -60329, -2385573, 91778, -243610, -1312334, 1060847, 413479, -1306931, -3590848, -3627619, -2191444, -2559537, 546095, -931648, -2223357, 1105386, 23010, 59397, 752126, -1547209, -1851094, 1224177, -2120318, 760491, -1393669, -1429736, 918570, 902614, 859086, 106377, 127143, -2145377, 392027, 115197, 949232, 1028222, -357661, -504243, 999619, 1187653, -2915631, 333347, 1073383, -1189288, 8409697, -1554249 }, { 1147260, 1127795, -1102184, -1068995, 1325474, 1606478, -1033184, -737864, -857101, -854396, -1327582, -1501943, 197952, 172260, 382106, -3107404, -759997, -508396, -2111121, 1616493, 652123, -2119034, -5669752, -5691331, -860476, -533359, -3560514, -1133053, -901689, -1561099, 169846, -138990, 1361112, -2557578, -247410, -662168, -762565, -358717, -375174, -3222343, 1451741, 1438372, 695081, 630957, 743682, -2919021, -368960, -229295, 1171497, 1316063, -999724, -933866, 1240917, 1760262, -1377678, -1196056, 753978, -2921216, -1554249, 10842338 } }; static int s[60][60] = { { 10073848, 3548639, 1815793, 2027614, -685064, -713206, 384210, 194997, 191338, 774290, 1003453, 1017050, 428633, 322923, -1075530, -1055311, -226724, -360063, 650127, 627888, 752097, 1429091, -891206, -370811, 166955, 8517, 33001, 539591, 829982, 893382, 591068, 749604, 412098, 710846, 531854, 617418, 569381, 421819, 209795, -187607, 38855, -246742, -70665, 323680, -306626, 1313064, 252035, 359595, -641626, 2146670, 450372, 544572, 974197, 970167, 685179, 842290, 413805, 710415, 641225, 672422 }, { 3548639, 10109758, -781009, -1010509, 1890047, 1859624, -299404, -48150, 110393, -321309, 127888, 150481, 109738, 99866, -792513, -769672, -356709, 265956, 1027277, 1009222, -627888, -966020, 1015023, 752628, -50284, 88982, 246951, -55014, 416996, 477553, 506287, 854074, 533805, 582544, 518398, 603574, 429213, 350288, 319924, -131064, -573935, 203417, -175601, 277745, 1142629, -511495, 690957, 138430, 2249771, -274693, 1168420, 548042, 122162, 114411, 353241, 701754, 276705, 324816, 359546, 404334 }, { 1815793, -781009, 9318628, -1465214, -379577, -296717, 1548855, -163448, 87398, -322720, 1992691, 2059199, 238076, 323387, -1182750, -150896, -217083, -646361, -70697, -792513, 1075530, -745609, 237041, -138673, -107528, 1139783, 952412, 617749, 381368, -50541, 582857, 529005, 542286, 938840, 513432, 132373, 88577, 360837, -140940, 31598, -46372, 703250, 141432, -364301, 1327432, 507491, 749677, -736067, 2283835, 1289791, -918231, 322981, -300697, -201852, 1011354, 579317, 689558, 740063, 583661, 198558 }, { 2027614, -1010509, -1465214, 9525899, 183886, -140179, -84488, 1425603, 1019961, 2102675, 728989, 322404, 533201, 303846, -1327432, -749565, -841902, -383446, -258563, -1142629, -306626, 1424693, -669550, 410595, 845735, -615335, -616139, 407036, 1719820, 1739733, 1324835, 657335, 948123, 847509, 823198, 760491, 497749, 181639, -417041, -56122, 392609, 386226, -168048, -173909, 1374468, 970448, -591665, 869959, 2296097, 844298, 354274, -922605, 676732, 304912, 939640, 672190, 1029280, 1270876, 797609, 837817 }, { -685064, 1890047, -379577, 183886, 10101791, -599126, -1495326, -2131242, -279534, 1027681, -154979, 1905806, 544527, -956896, -542286, -1603695, 137, -554735, -1478096, -533805, 412098, 412702, 253606, -248690, -94879, -219182, -368662, 1098949, 1375467, 1374865, 929543, 2028437, 2357544, 2194488, 1035746, 1188443, 626950, 511997, 248938, -647454, 338658, -504181, -14801, -645026, 948123, 1809872, 271102, 733117, 1180007, 2040804, -141671, 817507, -51641, 1658234, 930437, 789454, 1116057, 1017334, 1088753, 1137943 }, { -713206, 1859624, -296717, -140179, -599126, 9965406, 294915, 161409, -1978734, -677810, 1716065, -476988, -829956, 301167, -689558, -1725934, 169475, -703750, -1423594, -276705, 413805, 609164, -1355668, 1616180, 136776, -415582, -548725, 522508, 1238487, 1090973, 2236917, 723124, 1116057, 1080690, 2301594, 1985767, 456349, 211711, -643329, -61929, 883541, 40312, -831300, 92752, 1029280, 1870930, 5936, 922600, 1163360, 2033501, -237440, 274819, 1555024, -306251, 1265237, 970157, 1398089, 1304994, 1267008, 1050572 }, { 384210, -299404, 1548855, -84488, -1495326, 294915, 9455411, -1510944, 187219, 422146, -3251745, -1430459, -48777, 567080, -323387, -105601, 194867, -838816, 227594, -99866, 322923, -173581, -332767, 187293, -246330, 1006617, -787936, -338903, -72859, 314167, 30318, 903463, -956896, 566500, -207989, 255058, -218289, 138051, 62055, 235340, 358754, -456209, 142003, -705946, 303846, 8141, -458522, 938283, 202993, -548420, 1327027, -168721, -1411301, 412784, 192453, 33840, 301167, -228004, -296438, 171784 }, { 194997, -48150, -163448, 1425603, -2131242, 161409, -1510944, 9555644, -634455, -2024743, -2028703, 201659, -374435, 705946, -364301, 460877, -1033368, 880317, 388391, 277745, -323680, -314696, 420677, -209682, 907772, 598427, 822447, -259416, -1374481, -1367602, -539048, 619100, 645026, -1382240, -441739, -433341, -341831, -34570, 219882, 375144, 33921, -120954, 556038, -912101, 173909, -589699, 1282467, -938397, 120165, -76721, -194366, 1320694, -2384819, -48471, -6903, 195461, -92752, -672308, -514031, -479562 }, { 191338, 110393, 87398, 1019961, -279534, -1978734, 187219, -634455, 10364621, -3811053, -288635, -2003496, 427109, -62055, -140940, 914305, -1178850, 477785, 383068, 319924, -209795, -363388, 750164, -808159, -1001478, 740730, 1013772, -491691, 599275, -1262478, 387159, -248832, -248938, -398738, 595298, -1301930, -327223, -150855, 79658, 459105, 225110, 9644, -566398, 219882, 417041, -959827, 990976, -468241, 215172, 21883, 16527, 1064643, -163042, -1897300, -205594, 280188, 643329, -809582, -1050403, -802084 }, { 774290, -321309, -322720, 2102675, 1027681, -677810, 422146, -2024743, -3811053, 10304892, 1097416, -584577, 903583, 138051, -360837, -655599, -766294, -565518, -389124, -350288, 421819, 492429, -369929, 474565, -358107, -184581, -741037, 377647, -13578, 1592741, 1253222, 354489, 511997, 582183, -68465, 1508451, 444122, -114401, 150855, -330718, 628580, -369675, -928995, 34570, 181639, 801390, 786908, 478109, 705838, -296006, -333894, 2034273, 1029649, -705664, 457864, 85076, 211711, 848831, 1505096, 928627 }, { 1003453, 127888, 1992691, 728989, -154979, 1716065, -3251745, -2028703, -288635, 1097416, 10807115, 23060, 345938, 903463, -529005, -777043, -16402, -1329038, -525818, -854074, 749604, 471151, -805745, 813652, -73160, -1480632, 658381, 31428, 1379093, 1573128, 1038572, -88151, 2028437, 1701283, 1063674, 1204145, 500478, 354489, 248832, -298841, 268741, -568994, -504155, -619100, 657335, 958289, 184137, 1419884, 1026456, 183407, 2045993, 729610, -207553, 1608578, 851797, 791284, 723124, 1084875, 1815967, 1553990 }, { 1017050, 150481, 2059199, 322404, 1905806, -476988, -1430459, 201659, -2003496, -584577, 23060, 10318773, 1130957, 33840, -579317, -1014476, 199622, -1538324, -372173, -701754, 842290, 570996, -259915, 534694, 138873, -1626163, -1655486, 1580957, 1336998, 1170942, 259178, 791284, 789454, 579841, 2181651, 2056497, 318584, 85076, -280188, -56984, 787054, -37089, -974697, -195461, 672190, 1067415, -77371, 1592128, 975058, 116100, 2021029, 214989, 1689816, -650727, 1127444, 933159, 970157, 1412675, 1649898, 1903783 }, { 428633, 109738, 238076, 533201, 544527, -829956, -48777, -374435, 427109, 903583, 345938, 1130957, 9639653, -246330, 107528, 310149, -1153983, -1478699, 217415, 50284, 166955, 161601, -116650, 520787, -140804, -170314, -59720, 531510, 681783, 463749, -3190405, -73160, -94879, 106964, -1379009, -1337772, 612300, -358107, 1001478, -305639, -40156, 36680, 1280885, -907772, 845735, 977959, -88136, -37750, 93016, -12792, 50568, 361937, 133113, 819885, -1541056, 138873, 136776, 296474, 220882, 225128 }, { 322923, 99866, 323387, 303846, -956896, 301167, 567080, 705946, -62055, 138051, 903463, 33840, -246330, 9455411, -1548855, -1327027, 194867, 458522, 548420, 299404, 384210, 202993, 456209, 358754, -48777, -142003, -235340, -218289, 30318, 192453, -72859, -3251745, -1495326, -1411301, -207989, -296438, -338903, 422146, -187219, 787936, 187293, 332767, -1006617, 1510944, -84488, -168721, 838816, 938283, -173581, -227594, 105601, 8141, 566500, -228004, 314167, -1430459, 294915, 412784, 255058, 171784 }, { -1075530, -792513, -1182750, -1327432, -542286, -689558, -323387, -364301, -140940, -360837, -529005, -579317, 107528, -1548855, 9318628, -918231, 217083, 749677, 1289791, -781009, -1815793, -2283835, 703250, 46372, -238076, 141432, 31598, -88577, -582857, -1011354, -381368, -1992691, 379577, 300697, -513432, -583661, -617749, 322720, 87398, 952412, 138673, 237041, 1139783, -163448, 1465214, -322981, -646361, 736067, 745609, -70697, -150896, -507491, -938840, -740063, 50541, -2059199, 296717, 201852, -132373, -198558 }, { -1055311, -769672, -150896, -749565, -1603695, -1725934, -105601, 460877, 914305, -655599, -777043, -1014476, 310149, -1327027, -918231, 9366725, 239427, 274854, -875466, 1168420, -450372, -36916, -901303, -1778168, -50568, 202880, 654659, -886936, -380586, -931771, -382382, -2045993, 141671, 150298, -714527, -912445, -724395, 333894, 16527, 1131648, 71139, 419516, 1400473, -194366, -354274, 1370158, 983080, -1185154, -497648, 826358, -315612, -637431, -861221, -617974, 62102, -2021029, 237440, 240868, -282551, -466279 }, { -226724, -356709, -217083, -841902, 137, 169475, 194867, -1033368, -1178850, -766294, -16402, 199622, -1153983, 194867, 217083, 239427, 9107636, -1618486, 49667, 356709, -226724, 91780, -38746, 332565, -1153983, 264787, 47924, 381604, -1683014, -1583360, -1683014, -16402, 137, 109289, 605001, 376413, 381604, -766294, 1178850, -47924, 332565, 38746, -264787, 1033368, -841902, 932180, 1618486, -89570, 91780, -49667, -239427, 932180, 109289, -14748, -1583360, 199622, 169475, -14748, 376413, 121534 }, { -360063, 265956, -646361, -383446, -554735, -703750, -838816, 880317, 477785, -565518, -1329038, -1538324, -1478699, 458522, 749677, 274854, -1618486, 9430347, 575005, 690957, -252035, -349451, 564728, -556792, 88136, -1011186, -991207, -2015366, -457171, 113147, -1662370, -184137, -271102, -615937, -88030, 90307, 46323, -786908, 990976, 377848, 176847, 324349, -180275, 1282467, 591665, -1186711, -144650, 1369689, -156305, 160001, 983080, -553694, -52848, -628708, -2205485, 77371, -5936, -27911, -266108, -47895 }, { 650127, 1027277, -70697, -258563, -1478096, -1423594, 227594, 388391, 383068, -389124, -525818, -372173, 217415, 548420, 1289791, -875466, 49667, 575005, 9892701, -274693, -2146670, -40627, -464886, -2184399, 12792, 555681, 549076, -548474, -1037168, -881541, -487307, -183407, -2040804, -174626, -837310, -684086, -12117, 296006, 21883, 446862, -822442, 1193708, 339025, -76721, -844298, 1159232, 160001, -294770, -280012, 1929874, 826358, -1375351, -385767, -328489, -390691, -116100, -2033501, -145880, -715354, -596881 }, { 627888, 1009222, -792513, -1142629, -533805, -276705, -99866, 277745, 319924, -350288, -854074, -701754, 50284, 299404, -781009, 1168420, 356709, 690957, -274693, 10109758, -3548639, -2249771, 203417, 573935, -109738, -175601, -131064, -429213, -506287, -353241, -416996, -127888, -1890047, -122162, -518398, -359546, 55014, 321309, 110393, 246951, -752628, 1015023, 88982, -48150, 1010509, -548042, 265956, -138430, 966020, 1027277, -769672, 511495, -582544, -324816, -477553, -150481, -1859624, -114411, -603574, -404334 }, { 752097, -627888, 1075530, -306626, 412098, 413805, 322923, -323680, -209795, 421819, 749604, 842290, 166955, 384210, -1815793, -450372, -226724, -252035, -2146670, -3548639, 10073848, -641626, 246742, 38855, 428633, 70665, 187607, 569381, 591068, 685179, 829982, 1003453, -685064, 974197, 531854, 641225, 539591, 774290, -191338, -33001, -370811, 891206, -8517, -194997, 2027614, 544572, 360063, 359595, 1429091, -650127, 1055311, 1313064, 710846, 710415, 893382, 1017050, -713206, 970167, 617418, 672422 }, { 1429091, -966020, -745609, 1424693, 412702, 609164, -173581, -314696, -363388, 492429, 471151, 570996, 161601, 202993, -2283835, -36916, 91780, -349451, -40627, -2249771, -641626, 9650591, -2226103, -437370, 93016, -398116, -448790, 703575, 1063106, 1164234, 928398, 1026456, 1180007, -673360, 858688, 947959, 687597, 705838, -215172, -133451, 1224544, -787254, -75243, -120165, 2296097, 395949, 156305, 623743, 463232, 280012, 497648, 645482, 1460686, 1662689, 818541, 975058, 1163360, -715348, 727388, 876663 }, { -891206, 1015023, 237041, -669550, 253606, -1355668, -332767, 420677, 750164, -369929, -805745, -259915, -116650, 456209, 703250, -901303, -38746, 564728, -464886, 203417, 246742, -2226103, 10356582, -3801323, -36680, 862962, 779507, -497956, -681434, -550179, -54047, 568994, 504181, -1874509, -1011857, -881387, 20373, 369675, 9644, 365017, 742391, -260763, 540989, -120954, -386226, 987068, 324349, -345743, 787254, 1193708, 419516, -160927, 240058, -1369583, -235428, 37089, -40312, -1793762, -569944, -464691 }, { -370811, 752628, -138673, 410595, -248690, 1616180, 187293, -209682, -808159, 474565, 813652, 534694, 520787, 358754, 46372, -1778168, 332565, -556792, -2184399, 573935, 38855, -437370, -3801323, 10332390, -40156, -460565, -648252, 698431, 635757, 765957, 506720, 268741, 338658, -690022, 1030479, 1154656, 555644, 628580, -225110, -132479, 1275419, -742391, -230549, -33921, 392609, 1990107, -176847, 778274, 1224544, 822442, -71139, 917099, -232520, 1625911, 691823, 787054, 883541, -767926, 590846, 728966 }, { 166955, -50284, -107528, 845735, -94879, 136776, -246330, 907772, -1001478, -358107, -73160, 138873, -140804, -48777, -238076, -50568, -1153983, 88136, 12792, -109738, 428633, 93016, -36680, -40156, 9639653, -1280885, 305639, 612300, -3190405, -1541056, 681783, 345938, 544527, 133113, -1379009, 220882, 531510, 903583, -427109, 59720, 520787, 116650, 170314, 374435, 533201, 361937, 1478699, -37750, 161601, -217415, -310149, 977959, 106964, 296474, 463749, 1130957, -829956, 819885, -1337772, 225128 }, { 8517, 88982, 1139783, -615335, -219182, -415582, 1006617, 598427, 740730, -184581, -1480632, -1626163, -170314, -142003, 141432, 202880, 264787, -1011186, 555681, -175601, 70665, -398116, 862962, -460565, -1280885, 9542197, -732676, -1843811, -1881039, 193856, 383027, 504155, 14801, -361836, -2081210, -34398, 148093, 928995, -566398, 434800, 230549, 540989, 260646, 556038, 168048, 106704, -180275, 1314085, 75243, 339025, 1400473, -753093, -446150, -677944, -130918, 974697, 831300, -1001736, -1999405, 53151 }, { 33001, 246951, 952412, -616139, -368662, -548725, -787936, 822447, 1013772, -741037, 658381, -1655486, -59720, -235340, 31598, 654659, 47924, -991207, 549076, -131064, 187607, -448790, 779507, -648252, 305639, -732676, 10596548, -3717806, -213986, -1969096, 390699, 298841, 647454, -316040, -278950, -2001203, 942609, 330718, 459105, -349051, 132479, 365017, 434800, 375144, 56122, -243208, 377848, 1285755, 133451, 446862, 1131648, -496044, -304459, -452499, 928749, 56984, 61929, -222468, 688033, -3160187 }, { 539591, -55014, 617749, 407036, 1098949, 522508, -338903, -259416, -491691, 377647, 31428, 1580957, 531510, -218289, -88577, -886936, 381604, -2015366, -548474, -429213, 569381, 703575, -497956, 698431, 612300, -1843811, -3717806, 10038127, 1202708, -947943, 1054012, 500478, 626950, 1084874, 1475487, -643142, 1630193, 444122, 327223, -942609, 555644, -20373, -148093, 341831, 497749, 969010, -46323, 2392480, 687597, 12117, 724395, 514498, 1120123, 576540, 1739931, 318584, 456349, 971353, 416500, 431676 }, { 829982, 416996, 381368, 1719820, 1375467, 1238487, -72859, -1374481, 599275, -13578, 1379093, 1336998, 681783, 30318, -582857, -380586, -1683014, -457171, -1037168, -506287, 591068, 1063106, -681434, 635757, -3190405, -1881039, -213986, 1202708, 10884697, -43244, 1220232, 1038572, 929543, 1420834, 491978, 1803583, 1054012, 1253222, -387159, -390699, 506720, 54047, -383027, 539048, 1324835, 1076200, 1662370, 529993, 928398, 487307, 382382, 1797057, 1573000, 1419422, 1537872, 259178, 2236917, 1935230, -233522, 1382550 }, { 893382, 477553, -50541, 1739733, 1374865, 1090973, 314167, -1367602, -1262478, 1592741, 1573128, 1170942, 463749, 192453, -1011354, -931771, -1583360, 113147, -881541, -353241, 685179, 1164234, -550179, 765957, -1541056, 193856, -1969096, -947943, -43244, 9924096, 1537872, 851797, 930437, 1377257, 2088435, -171109, 1739931, 457864, 205594, -928749, 691823, 235428, 130918, 6903, 939640, 893440, 2205485, 560846, 818541, 390691, -62102, 1773876, 1450482, 1195850, 1056306, 1127444, 1265237, 1164000, 3110960, 570357 }, { 591068, 506287, 582857, 1324835, 929543, 2236917, 30318, -539048, 387159, 1253222, 1038572, 259178, -3190405, -72859, -381368, -382382, -1683014, -1662370, -487307, -416996, 829982, 928398, -54047, 506720, 681783, 383027, 390699, 1054012, 1220232, 1537872, 10884697, 1379093, 1375467, 1573000, 491978, -233522, 1202708, -13578, -599275, 213986, 635757, 681434, 1881039, 1374481, 1719820, 1797057, 457171, 529993, 1063106, 1037168, 380586, 1076200, 1420834, 1935230, -43244, 1336998, 1238487, 1419422, 1803583, 1382550 }, { 749604, 854074, 529005, 657335, 2028437, 723124, 903463, 619100, -248832, 354489, -88151, 791284, -73160, -3251745, -1992691, -2045993, -16402, -184137, -183407, -127888, 1003453, 1026456, 568994, 268741, 345938, 504155, 298841, 500478, 1038572, 851797, 1379093, 10807115, -154979, -207553, 1063674, 1815967, 31428, 1097416, 288635, -658381, 813652, 805745, 1480632, 2028703, 728989, 729610, 1329038, 1419884, 471151, 525818, 777043, 958289, 1701283, 1084875, 1573128, 23060, 1716065, 1608578, 1204145, 1553990 }, { 412098, 533805, 542286, 948123, 2357544, 1116057, -956896, 645026, -248938, 511997, 2028437, 789454, -94879, -1495326, 379577, 141671, 137, -271102, -2040804, -1890047, -685064, 1180007, 504181, 338658, 544527, 14801, 647454, 626950, 929543, 930437, 1375467, -154979, 10101791, -51641, 1035746, 1088753, 1098949, 1027681, 279534, 368662, -248690, -253606, 219182, 2131242, 183886, 817507, 554735, 733117, 412702, 1478096, 1603695, 1809872, 2194488, 1017334, 1374865, 1905806, -599126, 1658234, 1188443, 1137943 }, { 710846, 582544, 938840, 847509, 2194488, 1080690, 566500, -1382240, -398738, 582183, 1701283, 579841, 106964, -1411301, 300697, 150298, 109289, -615937, -174626, -122162, 974197, -673360, -1874509, -690022, 133113, -361836, -316040, 1084874, 1420834, 1377257, 1573000, -207553, -51641, 10316742, 1354558, 1382532, 1120123, 1029649, 163042, 304459, -232520, -240058, 446150, 2384819, 676732, 428854, 52848, 838622, 1460686, 385767, 861221, 941340, 3181394, 2126928, 1450482, 1689816, 1555024, -302301, 1262477, 1399098 }, { 531854, 518398, 513432, 823198, 1035746, 2301594, -207989, -441739, 595298, -68465, 1063674, 2181651, -1379009, -207989, -513432, -714527, 605001, -88030, -837310, -518398, 531854, 858688, -1011857, 1030479, -1379009, -2081210, -278950, 1475487, 491978, 2088435, 491978, 1063674, 1035746, 1354558, 10629882, -201757, 1475487, -68465, -595298, 278950, 1030479, 1011857, 2081210, 441739, 823198, 980270, 88030, 836672, 858688, 837310, 714527, 980270, 1354558, 2449803, 2088435, 2181651, 2301594, 2449803, -201757, 1772669 }, { 617418, 603574, 132373, 760491, 1188443, 1985767, 255058, -433341, -1301930, 1508451, 1204145, 2056497, -1337772, -296438, -583661, -912445, 376413, 90307, -684086, -359546, 641225, 947959, -881387, 1154656, 220882, -34398, -2001203, -643142, 1803583, -171109, -233522, 1815967, 1088753, 1382532, -201757, 10232054, 416500, 1505096, 1050403, -688033, 590846, 569944, 1999405, 514031, 797609, 1149437, 266108, 512340, 727388, 715354, 282551, 976350, 1262477, 2210810, 3110960, 1649898, 1267008, 1617815, 3201103, 921690 }, { 569381, 429213, 88577, 497749, 626950, 456349, -218289, -341831, -327223, 444122, 500478, 318584, 612300, -338903, -617749, -724395, 381604, 46323, -12117, 55014, 539591, 687597, 20373, 555644, 531510, 148093, 942609, 1630193, 1054012, 1739931, 1202708, 31428, 1098949, 1120123, 1475487, 416500, 10038127, 377647, 491691, 3717806, 698431, 497956, 1843811, 259416, 407036, 514498, 2015366, 2392480, 703575, 548474, 886936, 969010, 1084874, 971353, -947943, 1580957, 522508, 576540, -643142, 431676 }, { 421819, 350288, 360837, 181639, 511997, 211711, 138051, -34570, -150855, -114401, 354489, 85076, -358107, 422146, 322720, 333894, -766294, -786908, 296006, 321309, 774290, 705838, 369675, 628580, 903583, 928995, 330718, 444122, 1253222, 457864, -13578, 1097416, 1027681, 1029649, -68465, 1505096, 377647, 10304892, 3811053, 741037, 474565, 369929, 184581, 2024743, 2102675, 2034273, 565518, 478109, 492429, 389124, 655599, 801390, 582183, 848831, 1592741, -584577, -677810, -705664, 1508451, 928627 }, { 209795, 319924, -140940, -417041, 248938, -643329, 62055, 219882, 79658, 150855, 248832, -280188, 1001478, -187219, 87398, 16527, 1178850, 990976, 21883, 110393, -191338, -215172, 9644, -225110, -427109, -566398, 459105, 327223, -387159, 205594, -599275, 288635, 279534, 163042, -595298, 1050403, 491691, 3811053, 10364621, 1013772, 808159, 750164, 740730, -634455, -1019961, -1064643, 477785, 468241, 363388, 383068, 914305, 959827, 398738, 809582, 1262478, 2003496, 1978734, 1897300, 1301930, 802084 }, { -187607, -131064, 31598, -56122, -647454, -61929, 235340, 375144, 459105, -330718, -298841, -56984, -305639, 787936, 952412, 1131648, -47924, 377848, 446862, 246951, -33001, -133451, 365017, -132479, 59720, 434800, -349051, -942609, -390699, -928749, 213986, -658381, 368662, 304459, 278950, -688033, 3717806, 741037, 1013772, 10596548, 648252, 779507, -732676, 822447, 616139, 496044, -991207, -1285755, 448790, 549076, 654659, 243208, 316040, 222468, 1969096, 1655486, 548725, 452499, 2001203, 3160187 }, { 38855, -573935, -46372, 392609, 338658, 883541, 358754, 33921, 225110, 628580, 268741, 787054, -40156, 187293, 138673, 71139, 332565, 176847, -822442, -752628, -370811, 1224544, 742391, 1275419, 520787, 230549, 132479, 555644, 506720, 691823, 635757, 813652, -248690, -232520, 1030479, 590846, 698431, 474565, 808159, 648252, 10332390, 3801323, 460565, 209682, 410595, 917099, 556792, 778274, -437370, 2184399, 1778168, 1990107, -690022, -767926, 765957, 534694, 1616180, 1625911, 1154656, 728966 }, { -246742, 203417, 703250, 386226, -504181, 40312, -456209, -120954, 9644, -369675, -568994, -37089, 36680, 332767, 237041, 419516, 38746, 324349, 1193708, 1015023, 891206, -787254, -260763, -742391, 116650, 540989, 365017, -20373, 54047, 235428, 681434, 805745, -253606, -240058, 1011857, 569944, 497956, 369929, 750164, 779507, 3801323, 10356582, 862962, 420677, 669550, 160927, 564728, 345743, 2226103, -464886, -901303, -987068, 1874509, 1793762, 550179, 259915, 1355668, 1369583, 881387, 464691 }, { -70665, -175601, 141432, -168048, -14801, -831300, 142003, 556038, -566398, -928995, -504155, -974697, 1280885, -1006617, 1139783, 1400473, -264787, -180275, 339025, 88982, -8517, -75243, 540989, -230549, 170314, 260646, 434800, -148093, -383027, 130918, 1881039, 1480632, 219182, 446150, 2081210, 1999405, 1843811, 184581, 740730, -732676, 460565, 862962, 9542197, 598427, 615335, 753093, -1011186, -1314085, 398116, 555681, 202880, -106704, 361836, 1001736, -193856, 1626163, 415582, 677944, 34398, -53151 }, { 323680, 277745, -364301, -173909, -645026, 92752, -705946, -912101, 219882, 34570, -619100, -195461, -907772, 1510944, -163448, -194366, 1033368, 1282467, -76721, -48150, -194997, -120165, -120954, -33921, 374435, 556038, 375144, 341831, 539048, 6903, 1374481, 2028703, 2131242, 2384819, 441739, 514031, 259416, 2024743, -634455, 822447, 209682, 420677, 598427, 9555644, -1425603, -1320694, 880317, 938397, 314696, 388391, 460877, 589699, 1382240, 672308, 1367602, -201659, -161409, 48471, 433341, 479562 }, { -306626, 1142629, 1327432, 1374468, 948123, 1029280, 303846, 173909, 417041, 181639, 657335, 672190, 845735, -84488, 1465214, -354274, -841902, 591665, -844298, 1010509, 2027614, 2296097, -386226, 392609, 533201, 168048, 56122, 497749, 1324835, 939640, 1719820, 728989, 183886, 676732, 823198, 797609, 407036, 2102675, -1019961, 616139, 410595, 669550, 615335, -1425603, 9525899, -922605, 383446, 869959, 1424693, 258563, 749565, 970448, 847509, 1270876, 1739733, 322404, -140179, 304912, 760491, 837817 }, { 1313064, -511495, 507491, 970448, 1809872, 1870930, 8141, -589699, -959827, 801390, 958289, 1067415, 977959, -168721, -322981, 1370158, 932180, -1186711, 1159232, -548042, 544572, 395949, 987068, 1990107, 361937, 106704, -243208, 969010, 1076200, 893440, 1797057, 729610, 817507, 428854, 980270, 1149437, 514498, 2034273, -1064643, 496044, 917099, 160927, 753093, -1320694, -922605, 9636580, 553694, 534719, 645482, 1375351, 637431, 991478, 941340, 1371723, 1773876, 214989, 274819, -87262, 976350, 1060836 }, { 252035, 690957, 749677, -591665, 271102, 5936, -458522, 1282467, 990976, 786908, 184137, -77371, -88136, 838816, -646361, 983080, 1618486, -144650, 160001, 265956, 360063, 156305, 324349, -176847, 1478699, -180275, 377848, -46323, 1662370, 2205485, 457171, 1329038, 554735, 52848, 88030, 266108, 2015366, 565518, 477785, -991207, 556792, 564728, -1011186, 880317, 383446, 553694, 9430347, -1369689, 349451, 575005, 274854, 1186711, 615937, 27911, -113147, 1538324, 703750, 628708, -90307, 47895 }, { 359595, 138430, -736067, 869959, 733117, 922600, 938283, -938397, -468241, 478109, 1419884, 1592128, -37750, 938283, 736067, -1185154, -89570, 1369689, -294770, -138430, 359595, 623743, -345743, 778274, -37750, 1314085, 1285755, 2392480, 529993, 560846, 529993, 1419884, 733117, 838622, 836672, 512340, 2392480, 478109, 468241, -1285755, 778274, 345743, -1314085, 938397, 869959, 534719, -1369689, 9863218, 623743, 294770, 1185154, 534719, 838622, 630744, 560846, 1592128, 922600, 630744, 512340, 241465 }, { -641626, 2249771, 2283835, 2296097, 1180007, 1163360, 202993, 120165, 215172, 705838, 1026456, 975058, 93016, -173581, 745609, -497648, 91780, -156305, -280012, 966020, 1429091, 463232, 787254, 1224544, 161601, 75243, 133451, 687597, 928398, 818541, 1063106, 471151, 412702, 1460686, 858688, 727388, 703575, 492429, 363388, 448790, -437370, 2226103, 398116, 314696, 1424693, 645482, 349451, 623743, 9650591, 40627, 36916, 395949, -673360, -715348, 1164234, 570996, 609164, 1662689, 947959, 876663 }, { 2146670, -274693, 1289791, 844298, 2040804, 2033501, -548420, -76721, 21883, -296006, 183407, 116100, -12792, -227594, -70697, 826358, -49667, 160001, 1929874, 1027277, -650127, 280012, 1193708, 822442, -217415, 339025, 446862, 12117, 487307, 390691, 1037168, 525818, 1478096, 385767, 837310, 715354, 548474, 389124, 383068, 549076, 2184399, -464886, 555681, 388391, 258563, 1375351, 575005, 294770, 40627, 9892701, -875466, -1159232, 174626, 145880, 881541, 372173, 1423594, 328489, 684086, 596881 }, { 450372, 1168420, -918231, 354274, -141671, -237440, 1327027, -194366, 16527, -333894, 2045993, 2021029, 50568, 105601, -150896, -315612, -239427, 983080, 826358, -769672, 1055311, 497648, 419516, -71139, -310149, 1400473, 1131648, 724395, 382382, -62102, 380586, 777043, 1603695, 861221, 714527, 282551, 886936, 655599, 914305, 654659, 1778168, -901303, 202880, 460877, 749565, 637431, 274854, 1185154, 36916, -875466, 9366725, -1370158, -150298, -240868, 931771, 1014476, 1725934, 617974, 912445, 466279 }, { 544572, 548042, 322981, -922605, 817507, 274819, -168721, 1320694, 1064643, 2034273, 729610, 214989, 361937, 8141, -507491, -637431, 932180, -553694, -1375351, 511495, 1313064, 645482, -160927, 917099, 977959, -753093, -496044, 514498, 1797057, 1773876, 1076200, 958289, 1809872, 941340, 980270, 976350, 969010, 801390, 959827, 243208, 1990107, -987068, -106704, 589699, 970448, 991478, 1186711, 534719, 395949, -1159232, -1370158, 9636580, 428854, -87262, 893440, 1067415, 1870930, 1371723, 1149437, 1060836 }, { 974197, 122162, -300697, 676732, -51641, 1555024, -1411301, -2384819, -163042, 1029649, -207553, 1689816, 133113, 566500, -938840, -861221, 109289, -52848, -385767, -582544, 710846, 1460686, 240058, -232520, 106964, -446150, -304459, 1120123, 1573000, 1450482, 1420834, 1701283, 2194488, 3181394, 1354558, 1262477, 1084874, 582183, 398738, 316040, -690022, 1874509, 361836, 1382240, 847509, 941340, 615937, 838622, -673360, 174626, -150298, 428854, 10316742, -302301, 1377257, 579841, 1080690, 2126928, 1382532, 1399098 }, { 970167, 114411, -201852, 304912, 1658234, -306251, 412784, -48471, -1897300, -705664, 1608578, -650727, 819885, -228004, -740063, -617974, -14748, -628708, -328489, -324816, 710415, 1662689, -1369583, 1625911, 296474, -677944, -452499, 576540, 1419422, 1195850, 1935230, 1084875, 1017334, 2126928, 2449803, 2210810, 971353, 848831, 809582, 222468, -767926, 1793762, 1001736, 672308, 1270876, 1371723, 27911, 630744, -715348, 145880, -240868, -87262, -302301, 9973937, 1164000, 1412675, 1304994, 2348652, 1617815, 1274290 }, { 685179, 353241, 1011354, 939640, 930437, 1265237, 192453, -6903, -205594, 457864, 851797, 1127444, -1541056, 314167, 50541, 62102, -1583360, -2205485, -390691, -477553, 893382, 818541, -235428, 691823, 463749, -130918, 928749, 1739931, 1537872, 1056306, -43244, 1573128, 1374865, 1450482, 2088435, 3110960, -947943, 1592741, 1262478, 1969096, 765957, 550179, -193856, 1367602, 1739733, 1773876, -113147, 560846, 1164234, 881541, 931771, 893440, 1377257, 1164000, 9924096, 1170942, 1090973, 1195850, -171109, 570357 }, { 842290, 701754, 579317, 672190, 789454, 970157, 33840, 195461, 280188, 85076, 791284, 933159, 138873, -1430459, -2059199, -2021029, 199622, 77371, -116100, -150481, 1017050, 975058, 37089, 787054, 1130957, 974697, 56984, 318584, 259178, 1127444, 1336998, 23060, 1905806, 1689816, 2181651, 1649898, 1580957, -584577, 2003496, 1655486, 534694, 259915, 1626163, -201659, 322404, 214989, 1538324, 1592128, 570996, 372173, 1014476, 1067415, 579841, 1412675, 1170942, 10318773, -476988, -650727, 2056497, 1903783 }, { 413805, 276705, 689558, 1029280, 1116057, 1398089, 301167, -92752, 643329, 211711, 723124, 970157, 136776, 294915, 296717, 237440, 169475, -5936, -2033501, -1859624, -713206, 1163360, -40312, 883541, -829956, 831300, 61929, 456349, 2236917, 1265237, 1238487, 1716065, -599126, 1555024, 2301594, 1267008, 522508, -677810, 1978734, 548725, 1616180, 1355668, 415582, -161409, -140179, 274819, 703750, 922600, 609164, 1423594, 1725934, 1870930, 1080690, 1304994, 1090973, -476988, 9965406, -306251, 1985767, 1050572 }, { 710415, 324816, 740063, 1270876, 1017334, 1304994, -228004, -672308, -809582, 848831, 1084875, 1412675, 296474, 412784, 201852, 240868, -14748, -27911, -145880, -114411, 970167, -715348, -1793762, -767926, 819885, -1001736, -222468, 971353, 1935230, 1164000, 1419422, 1608578, 1658234, -302301, 2449803, 1617815, 576540, -705664, 1897300, 452499, 1625911, 1369583, 677944, 48471, 304912, -87262, 628708, 630744, 1662689, 328489, 617974, 1371723, 2126928, 2348652, 1195850, -650727, -306251, 9973937, 2210810, 1274290 }, { 641225, 359546, 583661, 797609, 1088753, 1267008, -296438, -514031, -1050403, 1505096, 1815967, 1649898, 220882, 255058, -132373, -282551, 376413, -266108, -715354, -603574, 617418, 727388, -569944, 590846, -1337772, -1999405, 688033, 416500, -233522, 3110960, 1803583, 1204145, 1188443, 1262477, -201757, 3201103, -643142, 1508451, 1301930, 2001203, 1154656, 881387, 34398, 433341, 760491, 976350, -90307, 512340, 947959, 684086, 912445, 1149437, 1382532, 1617815, -171109, 2056497, 1985767, 2210810, 10232054, 921690 }, { 672422, 404334, 198558, 837817, 1137943, 1050572, 171784, -479562, -802084, 928627, 1553990, 1903783, 225128, 171784, -198558, -466279, 121534, -47895, -596881, -404334, 672422, 876663, -464691, 728966, 225128, 53151, -3160187, 431676, 1382550, 570357, 1382550, 1553990, 1137943, 1399098, 1772669, 921690, 431676, 928627, 802084, 3160187, 728966, 464691, -53151, 479562, 837817, 1060836, 47895, 241465, 876663, 596881, 466279, 1060836, 1399098, 1274290, 570357, 1903783, 1050572, 1274290, 921690, 12691094 } }; static int map[60] = { 39, 38, 37, 36, 41, 40, 54, 55, 56, 57, 58, 59, 49, 48, 52, 53, 50, 51, 42, 43, 44, 45, 46, 47, 33, 32, 31, 30, 35, 34, 12, 13, 14, 15, 16, 17, 29, 28, 24, 25, 27, 26, 21, 20, 19, 18, 23, 22, 2, 3, 5, 4, 1, 0, 10, 11, 9, 8, 6, 7}; ./include/dieharder/diehard_bitstream.h0000664000175000017500000000347413707046103016475 0ustar eddedd/* * diehard_bitstream test header. */ /* * function prototype */ int diehard_bitstream(Test **test,int irun); static Dtest diehard_bitstream_dtest __attribute__((unused)) = { "Diehard Bitstream Test", "diehard_bitstream", "\n\ #==================================================================\n\ # Diehard Bitstream Test.\n\ # The file under test is viewed as a stream of bits. Call them \n\ # b1,b2,... . Consider an alphabet with two \"letters\", 0 and 1 \n\ # and think of the stream of bits as a succession of 20-letter \n\ # \"words\", overlapping. Thus the first word is b1b2...b20, the \n\ # second is b2b3...b21, and so on. The bitstream test counts \n\ # the number of missing 20-letter (20-bit) words in a string of \n\ # 2^21 overlapping 20-letter words. There are 2^20 possible 20 \n\ # letter words. For a truly random string of 2^21+19 bits, the \n\ # number of missing words j should be (very close to) normally \n\ # distributed with mean 141,909 and sigma 428. Thus \n\ # (j-141909)/428 should be a standard normal variate (z score) \n\ # that leads to a uniform [0,1) p value. The test is repeated \n\ # twenty times. \n\ #\n\ # NOTE WELL!\n\ #\n\ # The test is repeated 100 times by default in dieharder, but the\n\ # size of the sample is fixed (tsamples cannot/should not be\n\ # varied from the default). The sigma of this test REQUIRES the\n\ # use of overlapping samples, and overlapping samples are not\n\ # independent. If one uses the non-overlapping version of this\n\ # test, sigma = 290 is used instead, smaller because now there\n\ # are 2^21 INDEPENDENT samples.\n\ #==================================================================\n", 100, 2097152, 1, diehard_bitstream, 0 }; ./include/dieharder/marsaglia_tsang_gcd.h0000664000175000017500000000356013707046103016770 0ustar eddedd/* * diehard_marsaglia_tsang_gcd test header. */ /* * function prototype */ int marsaglia_tsang_gcd(Test **test,int irun); static Dtest marsaglia_tsang_gcd_dtest __attribute__((unused)) = { "Marsaglia and Tsang GCD Test", "marsaglia_tsang_gcd", "\ #==================================================================\n\ # Marsaglia and Tsang GCD Test\n\ #\n\ # 10^7 tsamples (default) of uint rands u, v are generated and two\n\ # statistics are generated: their greatest common divisor (GCD) (w)\n\ # and the number of steps of Euclid's Method required to find it\n\ # (k). Two tables of frequencies are thus generated -- one for the\n\ # number of times each value for k in the range 0 to 41 (with counts\n\ # greater than this range lumped in with the endpoints).\n\ # The other table is the frequency of occurrence of each GCD w.\n\ # k is be distributed approximately binomially, but this is useless for\n\ # the purposes of performing a stringent test. Instead four \"good\"\n\ # RNGs (gfsr4,mt19937_1999,rndlxs2,taus2) were used to construct a\n\ # simulated table of high precision probabilities for k (a process that\n\ # obviously begs the question as to whether or not THESE generators\n\ # are \"good\" wrt the test). At any rate, they produce very similar tables\n\ # and pass the test with each other's tables (and are otherwise very\n\ # different RNGs). The table of probabilities for the gcd distribution is\n\ # generated dynamically per test (it is easy to compute). Chisq tests\n\ # on both of these binned distributions yield two p-values per test,\n\ # and 100 (default) p-values of each are accumulated and subjected to\n\ # final KS tests and displayed in a histogram.\n\ #==================================================================\n", 100, 10000000, 2, /* This test returns two statistics */ marsaglia_tsang_gcd, 0 }; ./include/dieharder/dieharder_test_types.h0000664000175000017500000000372013707055701017233 0ustar eddedd/* * ======================================================================== * $Id: sts_runs.c 237 2006-08-23 01:33:46Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This program initializes a permanent internal vector of pointers to all * the tests known to dieharder that generate a pvalue or vector of * pvalues. With it we abandon our former addressing of tests by source * (the -d, -r, -s testnumber invocation) in favor of a segmented single * number. There is initial room for up to 1000 tests, but this can easily * be increased. * * We define the ranges: * * 0-99 diehard (or Marsaglia & Tsang) based tests. * 100-199 the NIST STS * 200-499 everything else. * 500-999 reserved for future sets of "named" tests if it seems * reasonable to use it that way, or straight expansion * space otherwise. 500 tests will hold us for a while... * * ======================================================================== */ /* * test global vectors and variables for tests. */ #define MAXTESTS 1000 void dieharder_test_types(); extern Dtest *dh_test_types[MAXTESTS]; #define ADD_TEST(t) {if (i==MAXTESTS) abort(); dh_test_types[i] = (t); i++; }; /* * Global shared counters for the new types of rngs in the organization * defined above. */ extern unsigned int dh_num_diehard_tests; /* diehard tests available in dieharder */ extern unsigned int dh_num_sts_tests; /* STS tests available in dieharder */ extern unsigned int dh_num_other_tests; /* other tests available in dieharder */ extern unsigned int dh_num_user_tests; /* user tests added in ui segment */ extern unsigned int dh_num_tests; /* total tests available in dieharder */ extern Dtest *dh_test; /* global pointer to the current test */ ./include/dieharder/skein_port.h0000664000175000017500000001054413707046103015174 0ustar eddedd#ifndef _SKEIN_PORT_H_ #define _SKEIN_PORT_H_ /******************************************************************* ** ** Platform-specific definitions for Skein hash function. ** ** Source code author: Doug Whiting, 2008. ** ** This algorithm and source code is released to the public domain. ** ** Many thanks to Brian Gladman for his portable header files. ** ** To port Skein to an "unsupported" platform, change the definitions ** in this file appropriately. ** ********************************************************************/ #include "brg_types.h" /* get integer type definitions */ typedef unsigned int uint_t; /* native unsigned integer */ typedef uint_8t u08b_t; /* 8-bit unsigned integer */ typedef uint_64t u64b_t; /* 64-bit unsigned integer */ #ifndef RotL_64 #define RotL_64(x,N) (((x) << (N)) | ((x) >> (64-(N)))) #endif /* * Skein is "natively" little-endian (unlike SHA-xxx), for optimal * performance on x86 CPUs. The Skein code requires the following * definitions for dealing with endianness: * * SKEIN_NEED_SWAP: 0 for little-endian, 1 for big-endian * Skein_Put64_LSB_First * Skein_Get64_LSB_First * Skein_Swap64 * * If SKEIN_NEED_SWAP is defined at compile time, it is used here * along with the portable versions of Put64/Get64/Swap64, which * are slow in general. * * Otherwise, an "auto-detect" of endianness is attempted below. * If the default handling doesn't work well, the user may insert * platform-specific code instead (e.g., for big-endian CPUs). * */ #ifndef SKEIN_NEED_SWAP /* compile-time "override" for endianness? */ #include "brg_endian.h" /* get endianness selection */ #if PLATFORM_BYTE_ORDER == IS_BIG_ENDIAN /* here for big-endian CPUs */ #define SKEIN_NEED_SWAP (1) #elif PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN /* here for x86 and x86-64 CPUs (and other detected little-endian CPUs) */ #define SKEIN_NEED_SWAP (0) #if PLATFORM_MUST_ALIGN == 0 /* ok to use "fast" versions? */ #define Skein_Put64_LSB_First(dst08,src64,bCnt) memcpy(dst08,src64,bCnt) #define Skein_Get64_LSB_First(dst64,src08,wCnt) memcpy(dst64,src08,8*(wCnt)) #endif #else #error "Skein needs endianness setting!" #endif #endif /* ifndef SKEIN_NEED_SWAP */ /* ****************************************************************** * Provide any definitions still needed. ****************************************************************** */ #ifndef Skein_Swap64 /* swap for big-endian, nop for little-endian */ #if SKEIN_NEED_SWAP #define Skein_Swap64(w64) \ ( (( ((u64b_t)(w64)) & 0xFF) << 56) | \ (((((u64b_t)(w64)) >> 8) & 0xFF) << 48) | \ (((((u64b_t)(w64)) >>16) & 0xFF) << 40) | \ (((((u64b_t)(w64)) >>24) & 0xFF) << 32) | \ (((((u64b_t)(w64)) >>32) & 0xFF) << 24) | \ (((((u64b_t)(w64)) >>40) & 0xFF) << 16) | \ (((((u64b_t)(w64)) >>48) & 0xFF) << 8) | \ (((((u64b_t)(w64)) >>56) & 0xFF) ) ) #else #define Skein_Swap64(w64) (w64) #endif #endif /* ifndef Skein_Swap64 */ #ifndef Skein_Put64_LSB_First void Skein_Put64_LSB_First(u08b_t *dst,const u64b_t *src,size_t bCnt) #ifdef SKEIN_PORT_CODE /* instantiate the function code here? */ { /* this version is fully portable (big-endian or little-endian), but slow */ size_t n; for (n=0;n>3] >> (8*(n&7))); } #else ; /* output only the function prototype */ #endif #endif /* ifndef Skein_Put64_LSB_First */ #ifndef Skein_Get64_LSB_First void Skein_Get64_LSB_First(u64b_t *dst,const u08b_t *src,size_t wCnt) #ifdef SKEIN_PORT_CODE /* instantiate the function code here? */ { /* this version is fully portable (big-endian or little-endian), but slow */ size_t n; for (n=0;n<8*wCnt;n+=8) dst[n/8] = (((u64b_t) src[n ]) ) + (((u64b_t) src[n+1]) << 8) + (((u64b_t) src[n+2]) << 16) + (((u64b_t) src[n+3]) << 24) + (((u64b_t) src[n+4]) << 32) + (((u64b_t) src[n+5]) << 40) + (((u64b_t) src[n+6]) << 48) + (((u64b_t) src[n+7]) << 56) ; } #else ; /* output only the function prototype */ #endif #endif /* ifndef Skein_Get64_LSB_First */ #endif /* ifndef _SKEIN_PORT_H_ */ ./include/dieharder/dieharder_rng_types.h0000664000175000017500000000735613707056001017045 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * This is being directly adapted from and modified for use in dieharder * so it can maintain its own independent RNG space of types not limited * by the GSL's current internal limit of 100. To avoid collisions, * we'll start our number space above 100, and extend it to 1000. * * To be concrete, I'm going to define the following ranges: * * 0-99 GSL generators, in GSL order. If it changes, tough. * 100-199 reserved for spillover if the GSL ends up with >100 generators * 200-399 libdieharder generators (fixed order from now on) * 400-499 R-based generators (fixed order from now on) * 500-599 hardware generators (starting with /dev/random and friends) * 600-699 user-defined generators (starting with dieharder example) * 700-999 reserved, e.g. for future integration with R-like environments * * I may have to experiment some to determine if there is any problem * with defining my own gsl_rng_type table of types and then filling it * first with the GSL routines, then with dieharder's. *======================================================================== */ #include /* #define GSL_VAR */ /* List new rng types to be added. */ GSL_VAR const gsl_rng_type *gsl_rng_stdin_input_raw; /* rgb Aug 2008 */ GSL_VAR const gsl_rng_type *gsl_rng_file_input_raw; GSL_VAR const gsl_rng_type *gsl_rng_file_input; GSL_VAR const gsl_rng_type *gsl_rng_dev_random; GSL_VAR const gsl_rng_type *gsl_rng_dev_arandom; GSL_VAR const gsl_rng_type *gsl_rng_dev_urandom; GSL_VAR const gsl_rng_type *gsl_rng_r_wichmann_hill; /* edd May 2007 */ GSL_VAR const gsl_rng_type *gsl_rng_r_marsaglia_mc; /* edd May 2007 */ GSL_VAR const gsl_rng_type *gsl_rng_r_super_duper; /* edd May 2007 */ GSL_VAR const gsl_rng_type *gsl_rng_r_mersenne_twister;/* edd May 2007 */ GSL_VAR const gsl_rng_type *gsl_rng_r_knuth_taocp; /* edd May 2007 */ GSL_VAR const gsl_rng_type *gsl_rng_r_knuth_taocp2; /* edd May 2007 */ GSL_VAR const gsl_rng_type *gsl_rng_ca; GSL_VAR const gsl_rng_type *gsl_rng_uvag; /* rgb Jun 2007 */ GSL_VAR const gsl_rng_type *gsl_rng_aes; /* bauer Oct 2009 */ GSL_VAR const gsl_rng_type *gsl_rng_threefish; /* bauer Oct 2009 */ GSL_VAR const gsl_rng_type *gsl_rng_kiss; /* rgb Jan 2011 */ GSL_VAR const gsl_rng_type *gsl_rng_superkiss; /* rgb Jan 2011 */ GSL_VAR const gsl_rng_type *gsl_rng_XOR; /* rgb Jan 2011 */ /* * rng global vectors and variables for setup and tests. */ #define MAXRNGS 1000 void dieharder_rng_types(); extern const gsl_rng_type *dh_rng_types[MAXRNGS]; extern const gsl_rng_type **gsl_types; /* where all the rng types go */ #define ADD(t) {if (i==MAXRNGS) abort(); dh_rng_types[i] = (t); i++; }; /* * Global shared counters for the new types of rngs in the organization * defined above. */ extern unsigned int dh_num_rngs; /* dh rngs available in dieharder */ extern unsigned int dh_num_gsl_rngs; /* GSL rngs available in dieharder */ extern unsigned int dh_num_dieharder_rngs; /* dh rngs available in libdieharder */ extern unsigned int dh_num_R_rngs; /* R-derived rngs available in libdieharder */ extern unsigned int dh_num_hardware_rngs; /* hardware rngs supported in libdieharder */ extern unsigned int dh_num_user_rngs; /* user-added rngs */ extern unsigned int dh_num_reserved_rngs; /* ngs added in reserved space by new UI */ extern gsl_rng *rng; /* global gsl random number generator */ ./include/dieharder/diehard_oqso.h0000664000175000017500000000206713707046103015461 0ustar eddedd/* * diehard_oqso test header. */ /* * function prototype */ int diehard_oqso(Test **test, int irun); static Dtest diehard_oqso_dtest __attribute__((unused)) = { "Diehard OQSO Test", "diehard_oqso", "\ #==================================================================\n\ # Diehard Overlapping Quadruples Sparce Occupancy (OQSO) Test\n\ #\n\ # Similar, to OPSO except that it considers 4-letter \n\ # words from an alphabet of 32 letters, each letter determined \n\ # by a designated string of 5 consecutive bits from the test \n\ # file, elements of which are assumed 32-bit random integers. \n\ # The mean number of missing words in a sequence of 2^21 four- \n\ # letter words, (2^21+3 \"keystrokes\"), is again 141909, with \n\ # sigma = 295. The mean is based on theory; sigma comes from \n\ # extensive simulation. \n\ # \n\ # Note 2^21 = 2097152, tsamples cannot be varied.\n\ #==================================================================\n", 100, 2097152, 1, diehard_oqso, 0 }; ./include/dieharder/diehard_runs.h0000664000175000017500000000264413707046103015470 0ustar eddedd/* * diehard_runs test header. */ /* * function prototype */ int diehard_runs(Test **test,int irun); static Dtest diehard_runs_dtest __attribute__((unused)) = { "Diehard Runs Test", "diehard_runs", "\ #==================================================================\n\ # Diehard Runs Test\n\ # This is the RUNS test. It counts runs up, and runs down, \n\ # in a sequence of uniform [0,1) variables, obtained by float- \n\ # ing the 32-bit integers in the specified file. This example \n\ # shows how runs are counted: .123,.357,.789,.425,.224,.416,.95\n\ # contains an up-run of length 3, a down-run of length 2 and an \n\ # up-run of (at least) 2, depending on the next values. The \n\ # covariance matrices for the runs-up and runs-down are well \n\ # known, leading to chisquare tests for quadratic forms in the \n\ # weak inverses of the covariance matrices. Runs are counted \n\ # for sequences of length 10,000. This is done ten times. Then \n\ # repeated. \n\ #\n\ # In Dieharder sequences of length tsamples = 100000 are used by\n\ # default, and 100 p-values thus generated are used in a final\n\ # KS test.\n\ #==================================================================\n", 100, /* Default psamples */ 100000, /* Default tsamples */ 2, /* runs returns two pvalues, not just one */ diehard_runs, 0 }; ./include/dieharder/sts_monobit.h0000664000175000017500000000131113707046103015347 0ustar eddedd/* * sts_monobit test header. */ /* * function prototype */ int sts_monobit(Test **test,int irun); static Dtest sts_monobit_dtest __attribute__((unused)) = { "STS Monobit Test", "sts_monobit", "\ #==================================================================\n\ # STS Monobit Test\n\ # Very simple. Counts the 1 bits in a long string of random uints.\n\ # Compares to expected number, generates a p-value directly from\n\ # erfc(). Very effective at revealing overtly weak generators;\n\ # Not so good at determining where stronger ones eventually fail.\n\ #==================================================================\n", 100, 100000, 1, sts_monobit, 0 }; ./include/dieharder/diehard_count_1s_stream.h0000664000175000017500000000302513707046103017601 0ustar eddedd/* * diehard_count_1s_stream test header. */ /* * function prototype */ int diehard_count_1s_stream(Test **test,int irun); static Dtest diehard_count_1s_stream_dtest __attribute__((unused)) = { "Diehard Count the 1s (stream) Test", "diehard_count_1s_stream", "\ #==================================================================\n\ # Diehard Count the 1s (stream) (modified) Test.\n\ # Consider the file under test as a stream of bytes (four per \n\ # 32 bit integer). Each byte can contain from 0 to 8 1's, \n\ # with probabilities 1,8,28,56,70,56,28,8,1 over 256. Now let \n\ # the stream of bytes provide a string of overlapping 5-letter \n\ # words, each \"letter\" taking values A,B,C,D,E. The letters are \n\ # determined by the number of 1's in a byte:: 0,1,or 2 yield A,\n\ # 3 yields B, 4 yields C, 5 yields D and 6,7 or 8 yield E. Thus \n\ # we have a monkey at a typewriter hitting five keys with vari- \n\ # ous probabilities (37,56,70,56,37 over 256). There are 5^5 \n\ # possible 5-letter words, and from a string of 256,000 (over- \n\ # lapping) 5-letter words, counts are made on the frequencies \n\ # for each word. The quadratic form in the weak inverse of \n\ # the covariance matrix of the cell counts provides a chisquare \n\ # test:: Q5-Q4, the difference of the naive Pearson sums of \n\ # (OBS-EXP)^2/EXP on counts for 5- and 4-letter cell counts. \n\ #==================================================================\n", 100, 256000, 1, diehard_count_1s_stream, 0 }; ./include/dieharder/tests.h0000664000175000017500000000554014350422742014163 0ustar eddedd/* *======================================================================== * $Id: libdieharder.h 221 2006-08-16 22:43:03Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include #include #include #include #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* #include #include */ /* Diehard Tests (by number) */ typedef enum { DIEHARD_NONE, DIEHARD_BDAY, DIEHARD_OPERM5, DIEHARD_RANK_32x32, DIEHARD_RANK_6x8, DIEHARD_BITSTREAM, DIEHARD_OPSO, DIEHARD_OQSO, DIEHARD_DNA, DIEHARD_COUNT_1S_STREAM, DIEHARD_COUNT_1S_BYTE, DIEHARD_PARKING_LOT, DIEHARD_2DSPHERE, DIEHARD_3DSPHERE, DIEHARD_SQUEEZE, DIEHARD_SUMS, DIEHARD_RUNS, DIEHARD_CRAPS, MARSAGLIA_TSANG_GCD, MARSAGLIA_TSANG_GORILLA, N_DIEHARD_TESTS } Diehard_Tests; /* RGB Tests (by number) */ typedef enum { RGB_NONE, RGB_TIMING, RGB_PERSIST, RGB_BITDIST, RGB_MINIMUM_DISTANCE, RGB_PERMUTATIONS, RGB_LAGGED_SUMS, RGB_LMN, //RGB_OPERM, DAB_BYTEDISTRIB, DAB_DCT, DAB_FILLTREE, DAB_FILLTREE2, DAB_MONOBIT2, N_RGB_TESTS } Rgb_Tests; typedef enum { STS_NONE, STS_MONOBIT, STS_RUNS, STS_SERIAL, N_STS_TESTS } Sts_Tests; /* * Add your own test types here! Use/rename/copy template here and in * the subroutine prototypes below. Note also the D_USER_TEMPLATE in * the Debug enum, in case you want to add controllable I/O to help * you debug with the -v flag. */ typedef enum { USER_NONE, USER_TEMPLATE, N_USER_TESTS } User_Tests; ./include/dieharder/diehard_opso.h0000664000175000017500000000247313707046103015461 0ustar eddedd/* * diehard_opso test header. */ /* * function prototype */ int diehard_opso(Test **test, int irun); static Dtest diehard_opso_dtest __attribute__((unused)) = { "Diehard OPSO", "diehard_opso", "\ #==================================================================\n\ # Diehard Overlapping Pairs Sparse Occupance (OPSO)\n\ # The OPSO test considers 2-letter words from an alphabet of \n\ # 1024 letters. Each letter is determined by a specified ten \n\ # bits from a 32-bit integer in the sequence to be tested. OPSO \n\ # generates 2^21 (overlapping) 2-letter words (from 2^21+1 \n\ # \"keystrokes\") and counts the number of missing words---that \n\ # is 2-letter words which do not appear in the entire sequence. \n\ # That count should be very close to normally distributed with \n\ # mean 141,909, sigma 290. Thus (missingwrds-141909)/290 should \n\ # be a standard normal variable. The OPSO test takes 32 bits at \n\ # a time from the test file and uses a designated set of ten \n\ # consecutive bits. It then restarts the file for the next de- \n\ # signated 10 bits, and so on. \n\ # \n\ # Note 2^21 = 2097152, tsamples cannot be varied.\n\ #==================================================================\n", 100, 2097152, 1, diehard_opso, 0 }; ./include/dieharder/rijndael-alg-fst.h0000664000175000017500000000365313707046103016145 0ustar eddedd/** * rijndael-alg-fst.h * * @version 3.0 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. */ #ifndef __RIJNDAEL_ALG_FST_H #define __RIJNDAEL_ALG_FST_H #define MAXKC (256/32) #define MAXKB (256/8) #define MAXNR 14 typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]); void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]); #ifdef INTERMEDIATE_VALUE_KAT void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); #endif /* INTERMEDIATE_VALUE_KAT */ #endif /* __RIJNDAEL_ALG_FST_H */ ./include/dieharder/diehard_2dsphere.h0000664000175000017500000000254013707046103016210 0ustar eddedd/* * diehard_2dsphere test header. */ /* * function prototype */ int diehard_2dsphere(Test **test,int irun); static Dtest diehard_2dsphere_dtest __attribute__((unused)) = { "Diehard Minimum Distance (2d Circle) Test", "diehard_2dsphere", "\ #==================================================================\n\ # Diehard Minimum Distance (2d Circle) Test \n\ # It does this 100 times:: choose n=8000 random points in a \n\ # square of side 10000. Find d, the minimum distance between \n\ # the (n^2-n)/2 pairs of points. If the points are truly inde- \n\ # pendent uniform, then d^2, the square of the minimum distance \n\ # should be (very close to) exponentially distributed with mean \n\ # .995 . Thus 1-exp(-d^2/.995) should be uniform on [0,1) and \n\ # a KSTEST on the resulting 100 values serves as a test of uni- \n\ # formity for random points in the square. Test numbers=0 mod 5 \n\ # are printed but the KSTEST is based on the full set of 100 \n\ # random choices of 8000 points in the 10000x10000 square. \n\ #\n\ # This test uses a fixed number of samples -- tsamples is ignored.\n\ # It also uses the default value of 100 psamples in the final\n\ # KS test, for once agreeing precisely with Diehard.\n\ #==================================================================\n", 100, 8000, 1, diehard_2dsphere, 0 }; ./include/dieharder/diehard_3dsphere.h0000664000175000017500000000231013707046103016204 0ustar eddedd/* * diehard_3dsphere test header. */ /* * function prototype */ int diehard_3dsphere(Test **test,int irun); static Dtest diehard_3dsphere_dtest __attribute__((unused)) = { "Diehard 3d Sphere (Minimum Distance) Test", "diehard_3dsphere", "\ #==================================================================\n\ # Diehard 3d Sphere (Minimum Distance) Test\n\ # Choose 4000 random points in a cube of edge 1000. At each \n\ # point, center a sphere large enough to reach the next closest \n\ # point. Then the volume of the smallest such sphere is (very \n\ # close to) exponentially distributed with mean 120pi/3. Thus \n\ # the radius cubed is exponential with mean 30. (The mean is \n\ # obtained by extensive simulation). The 3DSPHERES test gener- \n\ # ates 4000 such spheres 20 times. Each min radius cubed leads \n\ # to a uniform variable by means of 1-exp(-r^3/30.), then a \n\ # KSTEST is done on the 20 p-values. \n\ #\n\ # This test ignores tsamples, and runs the usual default 100\n\ # psamples to use in the final KS test.\n\ #==================================================================\n", 100, 4000, 1, diehard_3dsphere, 0 }; ./include/dieharder/rgb_bitdist.h0000664000175000017500000000254413707046103015314 0ustar eddedd/* * rgb_bitdist test header. */ /* * function prototype */ int rgb_bitdist(Test **test,int irun); static Dtest rgb_bitdist_dtest __attribute__((unused)) = { "RGB Bit Distribution Test", "rgb_bitdist", "\n\ #========================================================================\n\ # RGB Bit Distribution Test\n\ # Accumulates the frequencies of all n-tuples of bits in a list\n\ # of random integers and compares the distribution thus generated\n\ # with the theoretical (binomial) histogram, forming chisq and the\n\ # associated p-value. In this test n-tuples are selected without\n\ # WITHOUT overlap (e.g. 01|10|10|01|11|00|01|10) so the samples\n\ # are independent. Every other sample is offset modulus of the\n\ # sample index and ntuple_max.\n\ #\n\ # This test must be run with -n ntuple for ntuple > 0. Note that if\n\ # ntuple > 12, one should probably increase tsamples so that each of the\n\ # 2^ntuple bins should end up with an average of around 30 occurrences.\n\ # Note also that the memory requirements and CPU time requirements will\n\ # get quite large by e.g. ntuple = 20 -- use caution when sampling the\n\ # distribution of very large ntuples.\n\ #\n", 100, /* Default psamples */ 100000, /* Default tsamples */ 1, /* We magically make all the bit tests return a single histogram */ rgb_bitdist, 0 }; ./include/dieharder/diehard_birthdays.h0000664000175000017500000000313413707046103016465 0ustar eddedd/* * diehard_birthdays test header. */ /* * function prototype */ int diehard_birthdays(Test **test, int irun); static Dtest diehard_birthdays_dtest __attribute__((unused)) = { "Diehard Birthdays Test", "diehard_birthdays", "\n\ #==================================================================\n\ # Diehard \"Birthdays\" test (modified).\n\ # Each test determines the number of matching intervals from 512\n\ # \"birthdays\" (by default) drawn on a 24-bit \"year\" (by\n\ # default). This is repeated 100 times (by default) and the\n\ # results cumulated in a histogram. Repeated intervals should be\n\ # distributed in a Poisson distribution if the underlying generator\n\ # is random enough, and a a chisq and p-value for the test are\n\ # evaluated relative to this null hypothesis.\n\ #\n\ # It is recommended that you run this at or near the original\n\ # 100 test samples per p-value with -t 100.\n\ #\n\ # Two additional parameters have been added. In diehard, nms=512\n\ # but this CAN be varied and all Marsaglia's formulae still work. It\n\ # can be reset to different values with -x nmsvalue.\n\ # Similarly, nbits \"should\" 24, but we can really make it anything\n\ # we want that's less than or equal to rmax_bits = 32. It can be\n\ # reset to a new value with -y nbits. Both default to diehard's\n\ # values if no -x or -y options are used.\n\ #==================================================================\n", 100, 100, 1, diehard_birthdays, 0 }; /* * Global variables uint diehard_birthdays_nms,diehard_birthdays_nbits; uint *diehard_birthdays_rand_uint; */ ./include/dieharder/rgb_permutations.h0000664000175000017500000000176513707046103016410 0ustar eddedd/* * rgb_permutations test header. */ /* * function prototype */ int rgb_permutations(Test **test,int irun); static Dtest rgb_permutations_dtest __attribute__((unused)) = { "RGB Permutations Test", "rgb_permutations", "\n\ #========================================================================\n\ # RGB Permutations Test\n\ # This is a non-overlapping test that simply counts order permutations of\n\ # random numbers, pulled out n at a time. There are n! permutations\n\ # and all are equally likely. The samples are independent, so one can\n\ # do a simple chisq test on the count vector with n! - 1 degrees of\n\ # freedom. This is a poor-man's version of the overlapping permutations\n\ # tests, which are much more difficult because of the covariance of the\n\ # overlapping samples.\n\ #\n", 100, /* Default psamples */ 100000, /* Default tsamples */ 1, /* We magically make all the bit tests return a single histogram */ rgb_permutations, 0 }; ./include/dieharder/verbose.h0000664000175000017500000000245213707046103014463 0ustar eddedd/* *======================================================================== * $Id: libdieharder.h 220 2006-08-16 19:26:56Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #define MYDEBUG(b) if ( (verbose == b) || (verbose == D_ALL) ) typedef enum { D_QUIET, D_ALL, D_DIEHARD_BDAY, D_DIEHARD_OPERM5, D_DIEHARD_RANK_32x32, D_DIEHARD_RANK_6x8, D_DIEHARD_BITSTREAM, D_DIEHARD_OPSO, D_DIEHARD_OQSO, D_DIEHARD_DNA, D_DIEHARD_COUNT_1S_STREAM, D_DIEHARD_COUNT_1S_BYTE, D_DIEHARD_PARKING_LOT, D_DIEHARD_2DSPHERE, D_DIEHARD_3DSPHERE, D_DIEHARD_SQUEEZE, D_DIEHARD_SUMS, D_DIEHARD_RUNS, D_DIEHARD_CRAPS, D_MARSAGLIA_TSANG_GCD, D_MARSAGLIA_TSANG_GORILLA, D_RGB_TIMING, D_RGB_PERSIST, D_RGB_BITDIST, D_RGB_KSTEST_TEST, D_RGB_MINIMUM_DISTANCE, D_RGB_PERMUTATIONS, D_RGB_LAGGED_SUMS, D_RGB_LMN, D_RGB_OPERM, D_STS_MONOBIT, D_STS_RUNS, D_STS_SERIAL, D_STS_BLOCK, D_TYPES, D_USER_TEMPLATE, D_MEASURE, D_SEED, D_STARTUP, D_BITS, D_SAMPLE, D_CHISQ, D_KSTEST, D_VTEST, D_XTEST, D_BRANK, D_FILE_INPUT, D_FILE_INPUT_RAW, D_ADD_MY_TYPES, D_STD_TEST, D_RNGS, N_DEBUG } Debug; ./include/dieharder/Dtest.h0000664000175000017500000000154213707046103014100 0ustar eddedd/* *======================================================================== * $Id: libdieharder.h 221 2006-08-16 22:43:03Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ typedef struct { /* The name of the test */ char *name; /* The SHORT name of the test (its call name) */ char *sname; /* pointer to a test description */ char *description; /* Standard test default */ unsigned int psamples_std; /* Standard test default */ unsigned int tsamples_std; /* Number of independent statistics generated per run */ unsigned int nkps; /* A pointer to the test itself (must be filled at initialization) */ int (*test)(); /* void pointer to a vector of additional test arguments */ void *targs; } Dtest; ./include/dieharder/copyright.h0000664000175000017500000000132413707046103015023 0ustar eddedd/* * $Id: copyright.h 222 2006-08-17 04:54:59Z rgb $ * * Copyright (c) 2003 by Robert G. Brown, rgb@phy.duke.edu * GPL version 2b (b for beverage) granted as given * in the file COPYING in this distribution. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * */ ./include/dieharder/parse.h0000664000175000017500000000150313707056165014135 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== * Utility routines to support basic needs of the program like managing * models, creating and deleting directories with contents. Probable * cruft or yet-unused routines belong at the bottom... *======================================================================== */ /* * This is a somewhat sloppy way to do this, I suppose, but it will work */ #define PBUF 128 #define PK 1024 /* * Shared space */ extern char splitbuf[PK][PBUF]; /* * parse.c prototypes */ int split(char *inbuffer); int parse(char *inbuffer,char **outfields,int maxfields,int maxfieldlength); void chop(char *buf); ./include/dieharder/brg_endian.h.cruft0000664000175000017500000001354113707046103016231 0ustar eddedd/* --------------------------------------------------------------------------- Copyright (c) 2003, Dr Brian Gladman, Worcester, UK. All rights reserved. LICENSE TERMS The free distribution and use of this software in both source and binary form is allowed (with or without changes) provided that: 1. distributions of this source code include the above copyright notice, this list of conditions and the following disclaimer; 2. distributions in binary form include the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other associated materials; 3. the copyright holder's name is not used to endorse products built using this software without specific written permission. ALTERNATIVELY, provided that this notice is retained in full, this product may be distributed under the terms of the GNU General Public License (GPL), in which case the provisions of the GPL apply INSTEAD OF those given above. DISCLAIMER This software is provided 'as is' with no explicit or implied warranties in respect of its properties, including, but not limited to, correctness and/or fitness for purpose. --------------------------------------------------------------------------- Issue 16/08/2006 */ /* Symbolic defines, moved up - pcg */ #define IS_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */ #define IS_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */ /* * This test is very simple, and is derived directly from a test in * configure.ac, which is arguably the right/portable way to determine * byte order on all platforms. This test (and the derived makefiles) * pass LITTLE_ENDIAN in as 1 (true) or 0 (false). So we put it first, * and skip all the rest. rgb */ #ifdef LITTLE_ENDIAN # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN #else # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN #endif #if !defined(PLATFORM_BYTE_ORDER) /* Include files where endian defines and byteswap functions may reside */ #if defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ ) # include #elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \ defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) # include #elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) # if !defined( __MINGW32__ ) # include # if !defined( __BEOS__ ) # include # endif # endif #endif /* Now attempt to set the define for platform byte order using any */ /* of the four forms SYMBOL, _SYMBOL, __SYMBOL & __SYMBOL__, which */ /* seem to encompass most endian symbol definitions */ #if defined( BIG_ENDIAN ) && defined( LITTLE_ENDIAN ) # if defined( BYTE_ORDER ) && BYTE_ORDER == BIG_ENDIAN # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN # elif defined( BYTE_ORDER ) && BYTE_ORDER == LITTLE_ENDIAN # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN # endif #elif defined( BIG_ENDIAN ) # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN #elif defined( LITTLE_ENDIAN ) # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN #endif #if defined( _BIG_ENDIAN ) && defined( _LITTLE_ENDIAN ) # if defined( _BYTE_ORDER ) && _BYTE_ORDER == _BIG_ENDIAN # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN # elif defined( _BYTE_ORDER ) && _BYTE_ORDER == _LITTLE_ENDIAN # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN # endif #elif defined( _BIG_ENDIAN ) # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN #elif defined( _LITTLE_ENDIAN ) # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN #endif #if defined( __BIG_ENDIAN ) && defined( __LITTLE_ENDIAN ) # if defined( __BYTE_ORDER ) && __BYTE_ORDER == __BIG_ENDIAN # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN # elif defined( __BYTE_ORDER ) && __BYTE_ORDER == __LITTLE_ENDIAN # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN # endif #elif defined( __BIG_ENDIAN ) # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN #elif defined( __LITTLE_ENDIAN ) # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN #endif #if defined( __BIG_ENDIAN__ ) && defined( __LITTLE_ENDIAN__ ) # if defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __BIG_ENDIAN__ # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN # elif defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __LITTLE_ENDIAN__ # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN # endif #elif defined( __BIG_ENDIAN__ ) # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN #elif defined( __LITTLE_ENDIAN__ ) # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN #endif /* if the platform byte order could not be determined, then try to */ /* set this define using common machine defines */ #if !defined(PLATFORM_BYTE_ORDER) #if defined( __alpha__ ) || defined( __alpha ) || defined( i386 ) || \ defined( __i386__ ) || defined( _M_I86 ) || defined( _M_IX86 ) || \ defined( __OS2__ ) || defined( sun386 ) || defined( __TURBOC__ ) || \ defined( vax ) || defined( vms ) || defined( VMS ) || \ defined( __VMS ) || defined( _M_X64 ) # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN #elif defined( AMIGA ) || defined( applec ) || defined( __AS400__ ) || \ defined( _CRAY ) || defined( __hppa ) || defined( __hp9000 ) || \ defined( ibm370 ) || defined( mc68000 ) || defined( m68k ) || \ defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \ defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \ defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \ defined( THINK_C ) || defined( __VMCMS__ ) # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN #elif 0 /* **** EDIT HERE IF NECESSARY **** */ # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN #elif 0 /* **** EDIT HERE IF NECESSARY **** */ # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN #else # error Please edit lines 127 or 129 in brg_endian.h to set the platform byte order #endif #endif #endif ./include/dieharder/brg_endian.h0000664000175000017500000000370313707046103015106 0ustar eddedd/* --------------------------------------------------------------------------- Copyright (c) 2003, Dr Brian Gladman, Worcester, UK. All rights reserved. LICENSE TERMS The free distribution and use of this software in both source and binary form is allowed (with or without changes) provided that: 1. distributions of this source code include the above copyright notice, this list of conditions and the following disclaimer; 2. distributions in binary form include the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other associated materials; 3. the copyright holder's name is not used to endorse products built using this software without specific written permission. ALTERNATIVELY, provided that this notice is retained in full, this product may be distributed under the terms of the GNU General Public License (GPL), in which case the provisions of the GPL apply INSTEAD OF those given above. DISCLAIMER This software is provided 'as is' with no explicit or implied warranties in respect of its properties, including, but not limited to, correctness and/or fitness for purpose. --------------------------------------------------------------------------- Issue 16/08/2006 */ #define IS_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */ #define IS_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */ /* * Endianness is (now) set in configure.ac, using what is supposedly the * right/portable way to determine byte order on all platforms. This test * (and the derived makefiles) pass LITTLE_ENDIAN in as 1 (true) or 0 * (false). We pass this in the defines in Makefile.am, test here, and * set PLATFORM_BYTE_ORDER without any of the full on any GBT-supporting * platform, we hope. rgb, for dieharder version. */ #ifdef LITTLE_ENDIAN # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN #else # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN #endif ./include/dieharder/libdieharder.h0000664000175000017500000003032514350422742015436 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include "copyright.h" /* To enable large file support */ #define _FILE_OFFSET_BITS 64 #include #include #include #include #include #include /* This turns on uint macro in c99 */ #define __USE_MISC 1 #define _GNU_SOURCE 1 #include #include #include #include /* This turns on M_PI in math.h */ #define __USE_BSD 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* *======================================================================== * Useful defines *======================================================================== */ #define STDIN stdin #define STDOUT stdout #define STDERR stderr #define YES 1 #define NO 0 #define PI 3.141592653589793238462643 #define K 1024 #define LINE 80 #define PAGE 4096 #define M 1048576 #define M_2 2097152 /* * For reasons unknown and unknowable, free() doesn't null the pointer * it frees (possibly because it is called by value!) Nor does it return * a success value. In fact, it is just a leak or memory corruption waiting * to happen. Sigh. * * nullfree frees and sets the pointer it freed back to NULL. This let's * one e.g. if(a) nullfree(a) to safely free a IFF it is actually a pointer, * and let's one test on a in other ways to avoid leaking memory. */ #define nullfree(a) {free(a);a = 0;} /* * This is how one gets a macro into quotes; an important one to keep * in all program templates. */ #define _QUOTEME(x) #x #define QUOTEME(x) _QUOTEME(x) /* *======================================================================== * Subroutine Prototypes *======================================================================== */ unsigned long int random_seed(); void start_timing(); void stop_timing(); double delta_timing(); void measure_rate(); void Usage(); void help(); void dh_header(); void dh_version(); double binomial(unsigned int n, unsigned int k, double p); double chisq_eval(double *x,double *y,double *sigma, unsigned int n); double chisq_poisson(unsigned int *observed,double lambda,int kmax,unsigned int nsamp); double chisq_binomial(double *observed,double prob,unsigned int kmax,unsigned int nsamp); double chisq_pearson(double *observed,double *expected,int kmax); double sample(void *testfunc()); double kstest(double *pvalue,int count); double kstest_kuiper(double *pvalue,int count); double q_ks(double x); double q_ks_kuiper(double x,int count); void histogram(double *input, char *pvlabel, int inum, double min, double max, int nbins, char *label); unsigned int get_bit_ntuple(unsigned int *bitstring,unsigned int bslen,unsigned int blen,unsigned int boffset); void dumpbits(unsigned int *data, unsigned int nbits); void dumpbitwin(unsigned int data, unsigned int nbits); void dumpuintbits(unsigned int *data, unsigned int nbits); void cycle(unsigned int *data, unsigned int nbits); int get_bit(unsigned int *rand_uint, unsigned int n); int get_bit(unsigned int *rand_uint, unsigned int n); void dumpbits_left(unsigned int *data, unsigned int nbits); unsigned int bit2uint(char *abit,unsigned int blen); void fill_uint_buffer(unsigned int *data,unsigned int buflength); unsigned int b_umask(unsigned int bstart,unsigned int bstop); unsigned int b_window(unsigned int input,unsigned int bstart,unsigned int bstop,unsigned int boffset); unsigned int b_rotate_left(unsigned int input,unsigned int shift); unsigned int b_rotate_right(unsigned int input, unsigned int shift); void get_ntuple_cyclic(unsigned int *input,unsigned int ilen, unsigned int *output,unsigned int jlen,unsigned int ntuple,unsigned int offset); unsigned int get_uint_rand(gsl_rng *gsl_rng); void get_rand_bits(void *result,unsigned int rsize,unsigned int nbits,gsl_rng *gsl_rng); void mybitadd(char *dst, int doffset, char *src, int soffset, int slen); void get_rand_pattern(void *result,unsigned int rsize,int *pattern,gsl_rng *gsl_rng); void reset_bit_buffers(); /* Cruft int get_int_bit(unsigned int i, unsigned int n); */ void add_lib_rngs(); int binary_rank(unsigned int **mtx,int mrows,int ncols); /* *======================================================================== * Global Variables * * The primary control variables, in alphabetical order, with comments. *======================================================================== */ extern unsigned int all; /* Flag to do all tests on selected generator */ extern unsigned int binary; /* Flag to output rands in binary (with -o -f) */ extern unsigned int bits; /* bitstring size (in bits) */ extern unsigned int diehard; /* Diehard test number */ extern unsigned int generator; /* GSL generator id number to be tested */ /* * We will still need generator above, if only to select the XOR * generator. I need to make its number something that will pretty much * never collide, e.g. -1 cast to a unsigned int. I'm making an arbitrary * decision to set the upper bound of the number of generators that can * be XOR'd together to 100, but of course as a macro you can increase or * decrease it and recompile. Ordinarily, users will not select XOR -- * they will just select multiple generators and XOR will automatically * become the generator. * * Note well that at the moment one will NOT be able to XOR multiple * instances of the file or stdin generators, in the latter case for * obvious reasons. One SHOULD be able to XOR a file stream with any * of the built in generators. */ #define GVECMAX 100 extern char gnames[GVECMAX][128]; /* VECTOR of names to be XOR'd into a "super" generator */ extern unsigned int gseeds[GVECMAX]; /* VECTOR of unsigned int seeds used for the "super" generators */ extern unsigned int gnumbs[GVECMAX]; /* VECTOR of GSL generators to be XOR'd into a "super" generator */ extern unsigned int gvcount; /* Number of generators to be XOR'd into a "super" generator */ extern unsigned int gscount; /* Number of seeds entered on the CL in XOR mode */ extern unsigned int help_flag; /* Help flag */ extern unsigned int hist_flag; /* Histogram display flag */ extern unsigned int iterations; /* For timing loop, set iterations to be timed */ extern unsigned int ks_test; /* Selects the KS test to be used, 0 = Kuiper 1 = Anderson-Darling */ extern unsigned int list; /* List all tests flag */ extern unsigned int List; /* List all generators flag */ extern double multiply_p; /* multiplier for default # of psamples in -a(ll) */ extern unsigned int ntuple; /* n-tuple size for n-tuple tests */ extern unsigned int num_randoms; /* the number of randoms stored into memory and usable */ extern unsigned int output_file; /* equals 1 if you output to file, otherwise 0. */ extern unsigned int output_format; /* equals 0 (binary), 1 (unsigned int), 2 (decimal) output */ extern unsigned int overlap; /* 1 use overlapping samples, 0 don't (for tests with the option) */ extern unsigned int psamples; /* Number of test runs in final KS test */ extern unsigned int quiet; /* quiet flag -- surpresses full output report */ extern unsigned int rgb; /* rgb test number */ extern unsigned int sts; /* sts test number */ extern unsigned int Seed; /* user selected seed. Surpresses reseeding per sample.*/ extern off_t tsamples; /* Generally should be "a lot". off_t is u_int64_t. */ extern unsigned int user; /* user defined test number */ extern unsigned int verbose; /* Default is not to be verbose. */ extern double Xweak; /* "Weak" generator cut-off (one sided) */ extern double Xfail; /* "Unambiguous Fail" generator cut-off (one sided) */ extern unsigned int Xtrategy; /* Strategy used in TTD mode */ extern unsigned int Xstep; /* Number of additional psamples in TTD/RA mode */ extern unsigned int Xoff; /* Max number of psamples in TTD/RA mode */ extern double x_user; /* Reserved general purpose command line inputs for */ extern double y_user; /* use in any new user test. */ extern double z_user; /* *======================================================================== * * A few more needed variables. * * ks_pvalue is a vector of p-values obtained by samples, kspi is * its index. * * tv_start and tv_stop are used to record timings. * * dummy and idiot are there to fool the compiler into not optimizing * empty loops out of existence so we can time one accurately. * * fp is a file pointer for input or output purposes. * *======================================================================== */ #define KS_SAMPLES_PER_TEST_MAX 256 /* We need two of these to do diehard_craps. Sigh. */ extern double *ks_pvalue,*ks_pvalue2; extern unsigned int kspi; extern struct timeval tv_start,tv_stop; extern int dummy,idiot; extern FILE *fp; #define MAXFIELDNUMBER 8 extern char **fields; /* * Global variables and prototypes associated with file_input and * file_input_raw. */ unsigned int file_input_get_rewind_cnt(gsl_rng *rng); off_t file_input_get_rtot(gsl_rng *rng); void file_input_set_rtot(gsl_rng *rng,unsigned int value); extern char filename[K]; /* Input file name */ extern int fromfile; /* set true if file is used for rands */ extern int filenumbits; /* number of bits per integer */ /* * If we have large files, we can have a lot of rands. off_t is * automagically u_int64_t if FILE_OFFSET_BITS is 64, according to * legend. */ extern off_t filecount; /* number of rands in file */ extern char filetype; /* file type */ /* * This struct contains the data maintained on the operation of * the file_input rng, and can be accessed via rng->state->whatever * * fp is the file pointer * flen is the number of rands in the file (filecount) * rptr is a count of rands returned since last rewind * rtot is a count of rands returned since the file was opened * rewind_cnt is a count of how many times the file was rewound * since its last open. */ typedef struct { FILE *fp; off_t flen; off_t rptr; off_t rtot; unsigned int rewind_cnt; } file_input_state_t; /* * rng global vectors and variables for setup and tests. */ extern const gsl_rng_type **types; /* where all the rng types go */ extern gsl_rng *rng; /* global gsl random number generator */ /* * All required for GSL Singular Value Decomposition (to obtain * the rank of the random matrix for diehard rank tests). */ extern gsl_matrix *A,*V; extern gsl_vector *S,*svdwork; extern unsigned long int seed; /* rng seed of run (?) */ extern unsigned int random_max; /* maximum rng returned by generator */ extern unsigned int rmax; /* scratch space for random_max manipulation */ extern unsigned int rmax_bits; /* Number of valid bits in rng */ extern unsigned int rmax_mask; /* Mask for valid section of unsigned int */ /* * dTuple is used in a couple of my tests, but it seems like an * accident waiting to happen with it only 5 dimensions. * * For the moment we'll restrict ourselves to the five dimensions * for which we have Q. To go further, we need more Q. */ #define RGB_MINIMUM_DISTANCE_MAXDIM 5 typedef struct { double c[RGB_MINIMUM_DISTANCE_MAXDIM]; } dTuple; ./include/dieharder/Vtest.h0000664000175000017500000000173513707046103014126 0ustar eddedd/* *======================================================================== * $Id: Btest.c 212 2006-07-21 18:07:33Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* * This is the struct used in Vtest.c, a standard Pearson's chisq * test on a vector of measurements and corresponding expected * mean values. */ typedef struct { unsigned int nvec; /* Length of x,y vectors */ unsigned int ndof; /* Number of degrees of freedom, default nvec-1 */ double cutoff; /* y has to be greater than this to be included */ double *x; /* Vector of measurements */ double *y; /* Vector of expected values */ double chisq; /* Resulting Pearson's chisq */ double pvalue; /* Resulting p-value */ } Vtest; void Vtest_create(Vtest *vtest, unsigned int nvec); void Vtest_destroy(Vtest *vtest); void Vtest_eval(Vtest *vtest); ./libdieharder/0000775000175000017500000000000014345634463011721 5ustar eddedd./libdieharder/sts_runs.c0000664000175000017500000000564613707046103013745 0ustar eddedd/* * $Id: sts_runs.c 237 2006-08-23 01:33:46Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * See also accompanying file STS.COPYING * */ /* *======================================================================== * This is a the monobit test, rewritten from the description in the * STS suite. * * Rewriting means that I can standardize the interface to gsl-encapsulated * routines more easily. It also makes this my own code. *======================================================================== */ #include int sts_runs(Test **test, int irun) { int b,t; uint value; uint *rand_int; Xtest ptest; double pones,c00,c01,c10,c11;; /* * for display only. 2 means sts_runs tests 2-tuples. */ test[0]->ntuple = 2; /* * Allocate the space needed by the test. */ rand_int = (uint *)malloc(test[0]->tsamples*sizeof(uint)); /* * Number of total bits from -t test[0]->tsamples = size of rand_int[] */ bits = rmax_bits*test[0]->tsamples; /* * We have to initialize these a bit differently this time */ ptest.x = 0.0; /* * Create entire bitstring to be tested */ for(t=0;ttsamples;t++){ rand_int[t] = gsl_rng_get(rng); } /* * Fill vector of "random" integers with selected generator. * NOTE WELL: This can also be done by reading in a file! */ pones = 0.0; c00 = 0.0; c01 = 0.0; c10 = 0.0; /* Equal to c01 by obvious periodic symmetry */ c11 = 0.0; for(b=0;btsamples,2,b); switch(value){ case 0: /* 00 no new ones */ c00++; break; case 1: /* 01 no new ones */ c01++; ptest.x++; break; case 2: /* 10 one new one (from the left) */ c10++; ptest.x++; pones++; break; case 3: /* 11 one new one (from the left) */ c11++; pones++; break; } MYDEBUG(D_STS_RUNS) { printf("# sts_runs(): ptest.x = %f, pone = %f\n",ptest.x,pones); } } /* * form the probability of getting a one in the entire sample */ pones /= (double) test[0]->tsamples*rmax_bits; c00 /= (double) test[0]->tsamples*rmax_bits; c01 /= (double) test[0]->tsamples*rmax_bits; c10 /= (double) test[0]->tsamples*rmax_bits; c11 /= (double) test[0]->tsamples*rmax_bits; /* * Now we can finally compute the targets for the problem. */ ptest.y = 2.0*bits*pones*(1.0-pones); ptest.sigma = 2.0*sqrt(bits)*pones*(1.0-pones); MYDEBUG(D_STS_RUNS) { printf(" p = %f c00 = %f c01 = %f c10 = %f c11 = %f\n",pones,c00,c01,c10,c11); } Xtest_eval(&ptest); test[0]->pvalues[irun] = ptest.pvalue; MYDEBUG(D_STS_RUNS) { printf("# sts_runs(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } free(rand_int); return(0); } ./libdieharder/sts_serial.c0000664000175000017500000003051513707046103014226 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is a test that checks to see if the rng generates bit patterns * (n-tuples) that are distributed correctly (binomially). For example, * for 2-tuples (bit pairs) there are four possibilities: 00, 01, 10, 11. * Each should occur with a probability of 1/4, hence the count of (say) K * 00 bitpairs out of N trials should be distributed (over M samples) * according to the binomial probability p = binomial(N,K,0.25) -- that * is, the expected count for k 00's is M*p(N,K,0.25). * * This test should be more sensitive than just doing a large number of * trials and aggregating all the 00's over all the samples and comparing * the result to the expected mean, as there can be distributions that * have the expected mean of 0.25 that are >>not<< binomially distributed. * * By making a single program capable of doing any n-tuple, we gain * immediate benefit. Both STS and Diehard, for example, contain * tests that validate bit distribution frequencies; however, they typically * do so for specific n-tuples, e.g. 5 in several diehard tests. There * is nothing terribly special about 5, and no point in looking too * hard at e.g. intervals between patterns at 5, since testing pure * frequency at 6 bits simultaneously ensures that all 6 bit patterns have * the correct frequency (since they are sub-patterns of 6 bit patterns * that have the correct frequency, and if they had the INcorrect frequency * the six-bit patterns would as well by inheritance) and (less obviously, * but I'm pretty sure I can prove it) that intervals between the five * bit patterns must also be correct IF the test is satisfied robustly * for various arbitrary test string lengths and sampling counts. * * Anyway, I'm giving this one a shot as it may end up being a one-size * fits all tool for validating bitlevel randomness for any generator, * up to some n-tuple. I expect that 2004/2005 computers will easily * be able to validate through n=8 without really warming up or taking * terribly long (validating the frequency and distribution for e.g. * the entire ascii alphabet at the byte level) and MAY be able to do * actual frequency validation on 16-bit integers. Note that it only takes * a few seconds to generate millions of 32 bit integers with most of * the GSL routines. To get statistically valid results, one needs to * accumulate order of 100 trials per outcome, or test order of millions * of integers and accumulate the results in an outcome vector 64K long. * both of these are well within reach using at most hours of CPU time, * and partitioned on a beowulf might take only minutes or even seconds. * * The latest version of the actual test (below) tests only ONE ntuple, * the value set in the global variable sts_serial_ntuple which must * be a positive integer. The calling program is responsible for e.g. * testing a range of ntuples. *======================================================================== */ /* * Overlapping Test *================================================================== * We fill input with inlen uints. The test rules are that * nb < |log_2 (inlen*32) | - 2. Or inverting (which is * more useful) inlen = 2^(nb+2)/sizeof(uint). For example, if * nb=8, inlen = 1024/32 = 32. This is obviously very convervative. * Even if nb=16 (testing 65K number) it is only 2^18/2^5 = 2^13 or * around 8 MB of uints. * * To make this test fast, we should very likely just use * inlen = 2^nb UINTS, which is 8x the minimum recommended and easy * to compute, e.g. for nb = 16 we have input[65536], containing * 2^24 = 16 Mbits. We then allocate one extra uint at the end, * fill it, copy the 0 uint to the end for periodic wrap, and * simply rip a uint window along it with the inline shift trick * to generate the overlapping samples. The code we develop can * likely be backported to bits.c as being a bit more efficient. */ #include #include "static_get_bits.c" /* * This is a buffer of uint length (2^nb)+1 that we will fill with rands * to be tested, once per test. */ int sts_serial(Test **test,int irun) { uint bsize; /* number of bits/samples in uintbuf */ uint nb,nb1; /* number of bits in a tested ntuple */ uint value; /* value of sampled ntuple (as a uint) */ uint mask; /* mask in only nb bits */ uint bi; /* bit offset relative to window */ /* Look for cruft below */ uint i,j,m,t; /* generic loop indices */ uint ctotal; /* count of any ntuple per bitstring */ double **freq,*psi2,*delpsi2,*del2psi2; double pvalue; uint *uintbuf; uint window; /* uint window into uintbuf, slide along a byte at at time. */ double mono_mean,mono_sigma; /* For single bit test */ /* * Sample a bitstring of rgb_bitstring_ntuple in length (exactly). Note * that I'm going to force nb>=2, nb<=16 for the moment. The routine * might "work" for nb up to 24 or even (on a really big memory machine) * 32, but memory requirements in uints are around 2^(nb+1) + n where n * is order unity, maybe worse, so I think it would take a 12 to 16 GB * machine to be able to just hold the memory, and then it would take a * very long time. However, the testing process might parallelize * decently if we could farm out the blocks of bits to be run efficiently * over a network relative to the time required to generate them. */ nb = 16; /* Just ignore sts_serial_ntuple for now */ tsamples = test[0]->tsamples; /* ditto */ MYDEBUG(D_STS_SERIAL){ printf("#==================================================================\n"); printf("# Starting sts_serial.\n"); printf("# sts_serial: Testing ntuple = %u\n",nb); } /* * This is useful as a limit here and there as we have things that range * from 0 to nb INclusive (unless/until we fix the mallocs up a bit). */ nb1 = nb+1; /* * We need a vector of freq vectors. We make each frequency counter * vector only as large as it needs to be. We zero each accumulator as * we make it. Note that we cannot sample "0 bits at a time" so m starts * at 1. */ freq = (double **) malloc(nb1*sizeof(double *)); for(m = 1;m < nb1;m++) { freq[m] = (double *)malloc(pow(2,m)*sizeof(double)); memset(freq[m],0,pow(2,m)*sizeof(double)); } /* * These are the statistics required by sts_serial in SP800. psi2[m] is * basically the sum of the squares of the bitpattern frequences for a * given number of bits m. delpsi2 is the difference between psi2[m] and * psi2[m-1]. del2psi2 is the difference of delpsi2[m] and delpsi2[m-1]. * We zero only need to zero psi2, as the other two are set directly. * * Note that we can only generate psi2 for m>0, delpsi2 for m>1, delpsi3 * for m>2. We can therefore only generate both test statistics (based * on delpsi2 and del2psi2) for m>=3 to m=16. What we CAN do for m=1 * is generate a straight normal p-value on a binomial probability for * e.g. average number of 1's, basically sts_monobit. That would give * us one test for m = 1, one test for m = 2, and two tests each for * m = [3,16]. */ psi2 = (double *) malloc(nb1*sizeof(double)); delpsi2 = (double *) malloc(nb1*sizeof(double)); del2psi2 = (double *) malloc(nb1*sizeof(double)); memset(psi2,0,nb1*sizeof(double)); /* * uintbuf is the one true vector of rands processed during this test. * It needs to be at LEAST 2^16 = 64K uints in length, 2^20 = 1M is much * better. We'll default this from tsamples == 100000, though; it doesn't * have to be divisible by 2 or anything. Note that we add one to tsamples * to permit cyclic wraparound of the overlapping samples, although honestly * this hardly matters in the limit of large tsamples. */ uintbuf = (uint *)malloc((tsamples+1)*sizeof(uint)); /* * If uintbuf[test[0]->tsamples] is allocated (plus one for wraparound) * then we need to count the number of bits, which is the number of * OVERLAPPING samples we will pull. */ bsize = tsamples*sizeof(uint)*CHAR_BIT; MYDEBUG(D_STS_SERIAL){ printf("# sts_serial(): bsize = %u\n",bsize); } /* * We start by filling testbuf with rands and cloning the first into * the last slot for cyclic wrap. This initial effort just uses the * fast gsl_rng_get() call, but we'll need to use the inline from the * static_get_rng routines in production. */ for(t=0;t> (32 - m - bi)) & mask; MYDEBUG(D_STS_SERIAL){ dumpbitwin(value,m); printf("\n"); } freq[m][value]++; ctotal++; if(bi == 15){ window = (window << 16); window += (uintbuf[j] >> 16); MYDEBUG(D_STS_SERIAL){ printf("half window[%u] = %08x = ",j,window); dumpuintbits(&window,1); printf("\n"); } } } MYDEBUG(D_STS_SERIAL){ printf("# sts_serial():=====================================================\n"); printf("# sts_serial(): Count table\n"); printf("# sts_serial():\tbits\tvalue\tcount\tprob\n"); for(i = 0; intuple = 1; } test[j++]->pvalues[irun] = gsl_cdf_gaussian_P(mono_mean,mono_sigma); for(m=2;mntuple = m; } test[j++]->pvalues[irun] = pvalue; MYDEBUG(D_STS_SERIAL){ printf("pvalue 1[%u] = %f\n",m,pvalue); } if(m>2){ pvalue = gsl_sf_gamma_inc_Q(pow(2,m-3),del2psi2[m]/2.0); if(irun == 0){ test[j]->ntuple = m; } test[j++]->pvalues[irun] = pvalue; MYDEBUG(D_STS_SERIAL){ printf("pvalue 2[%u] = %f\n",m,pvalue); } } } free(uintbuf); free(psi2); free(del2psi2); free(delpsi2); for(m = 1;m < nb1;m++){ free(freq[m]); } free(freq); return(0); } ./libdieharder/sample.c0000664000175000017500000000555213707046103013342 0ustar eddedd/* * $Id: sample.c 223 2006-08-17 06:19:38Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * See also accompanying file STS.COPYING * */ /* *======================================================================== * This routine generates "samples" p-values from the test routines, where * each test routine is a double function that returns a single * p-value. The p-value returned can be made "independent" by optionally * reseeding the rng for each test call according to the -i flag. * * The p-values are packed into a vector. This vector is subjected to * analysis to ensure that it is uniform. Minimally this analysis * consists of a straightforward Kuiper Kolmogorov-Smirnov test (the * Kuiper form is chosen because of its relative simplicity and because * it manages the tails of the interval symmetrically). However, * this is where alternative tests can also be applied if/when it is * determined necessary and an appropriate control structure is built * to permit their selection. Possibilities for tests include binning the * p-values and applying a discrete (Pearson chisq) analysis to determine * an overall p value (possibly accompanied by plotting of the binned * histogram of p-values for visual validation), using a confidence * interval test, using other KS tests (the ordinary KS test, the * Anderson-Darling KS test). * * However, it is to be expected that >>none of this will matter<< in * assessing the quality of an rng. The issue of robustness and * sensitivity come into play here. For each test, it should be * simple to find a region of test parameters (e.g. number of random * numbers tested per test) that makes a weak generator fail * unambiguously and consistently, generating an aggregate p-value of * 0.0000 (zero to four decimals) from any sensible assessment tool * that generates a p-value. *======================================================================== */ #include double sample(void *testfunc()) { int p; double pks; if(verbose == D_SAMPLE || verbose == D_ALL){ printf("# samples(): sample\n"); } for(p=0;p 32 or thereabouts. There are 4 billion-odd bins at l = 32 (m = 0, * n = 0). To test uniformity on this, one needs to generate roughly * 400 billion rands (to get an average of 100 hits per bin, with a * reasonable sigma). Cumulating e.g. chisquare across this would be * difficult, but conceivably could be done on a cluster if nothing else. * At 64 bits, though, one cannot imagine holding the bins on any extant * system, and it would take far longer than the lifetime of the universe * to compute etc. 128 bits is just laughable. * * Hence the "lmn" part -- if we assume that (say) 24 bits is a practical * upper bound on what we can bin, we can extend our test into a PARTIAL * projection of randomness over longer sequences by testing: * l+n = 24, m=0-104. This slides two windows across 128 bits and looks * at the relative frequency of the integers thus generated. If the * RNG generates numbers that are uniform at 24 bits but correlated across * 128, this has some chance of revealing the correlation. Indeed, * m can be quite large here -- one can potentially discover long range * fourier correlations in this way. * * This approach has one more weakness, though. It is known that certain * generators fail because e.g. triples of integers, viewed as coordinates, * fall only on certain hyperplanes. The lmn test should reveal this * profoundly for doublets of integers, but might have a hard time doing * third order correlations for triplets. That is, for large enough l it * can do so, but there is probably a projection of numbers that will pass * second order at l+n one can afford while missing a glaring third order * violation). And so on -- there is likely a four-at-a-time correlated * sequency that passes three-at-a-time tests. So the MOST general test * may need to be an lmnop... series. * * This isn't quite the only test one would ever need. One may well want * to look at particular statistics for l=32 (for example), m = whatever, * n = 32, where one cannot afford to actually bin the 64 bits. In that * case one has to e.g. figure out some sort of asymptotic statistic that * would deviate for at least a certain class of nonrandomness and pray. * this is what e.g. monkey tests do today, but they are not arranged * anywhere nearly this systematically and hence do not reveal specific * details about the correlations they uncover. *======================================================================== */ #include #include int rgb_lmn() { double pks; uint ps_save=0,ts_save=0; /* * Do a standard test if -a(ll) is selected. * ALSO use standard values if tsamples or psamples are 0 */ if(all == YES){ ts_save = tsamples; tsamples = dtest->tsamples_std; ps_save = psamples; psamples = dtest->psamples_std; } if(tsamples == 0){ tsamples = dtest->tsamples_std; } if(psamples == 0){ psamples = dtest->psamples_std; } /* * Allocate memory for THIS test's ks_pvalues, etc. Make sure that * any missed prior allocations are freed. */ if(ks_pvalue) nullfree(ks_pvalue); ks_pvalue = (double *)malloc((size_t) psamples*sizeof(double)); /* * Reseed FILE random number generators once per individual test. * This correctly resets the rewind counter per test. */ if(strncmp("file_input",gsl_rng_name(rng),10) == 0){ gsl_rng_set(rng,1); } /* show_test_header(dtest); */ /* * Any custom test header output lines go here. They should be * used VERY sparingly. */ /* * This is the standard test call. */ kspi = 0; /* Always zero first */ /* pks = sample((void *)rgb_lmn_test); */ /* * Test Results, standard form. show_test_results(dtest,pks,ks_pvalue,"Lagged Sum Test"); */ /* * Put back tsamples */ if(all == YES){ tsamples = ts_save; psamples = ps_save; } if(ks_pvalue) nullfree(ks_pvalue); return(0); } void rgb_lmn_test() { uint t,i,lag; Xtest ptest; /* * ptest.x = actual sum of tsamples lagged samples from rng * ptest.y = tsamples*0.5 is the expected mean value of the sum * ptest.sigma = sqrt(tsamples/12.0) is the standard deviation */ ptest.x = 0.0; /* Initial value */ ptest.y = (double) tsamples*0.5; ptest.sigma = sqrt(tsamples/12.0); /* * sample only every lag returns from the rng, discard the rest. * We have to get the (float) value from the user input and set * a uint */ if(x_user){ lag = x_user; } else { lag = 2; /* Why not? Anything but 0, really... */ } if(verbose == D_USER_TEMPLATE || verbose == D_ALL){ printf("# rgb_lmn(): Doing a test on lag %u\n",lag); } for(t=0;tdescription); } ./libdieharder/Makefile.in0000664000175000017500000037135613707046265014003 0ustar eddedd# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 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@ #======================================================================== # This is a Makefile.am for the libdieharder library, part of the # overall dieharder package. It pretty much sets up standard library # # These two targets execute in the toplevel project directory only. # make svn does a svn commit and creates the timestamp $(SVNTIME) # make sync does a svn commit and rsyncs the project repo to a # list of hosts and also creates $(SVNTIME) #======================================================================== VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libdieharder ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" LTLIBRARIES = $(lib_LTLIBRARIES) libdieharder_la_DEPENDENCIES = am_libdieharder_la_OBJECTS = libdieharder_la-bits.lo \ libdieharder_la-chisq.lo libdieharder_la-countx.lo \ libdieharder_la-dab_bytedistrib.lo libdieharder_la-dab_dct.lo \ libdieharder_la-dab_filltree.lo \ libdieharder_la-dab_filltree2.lo \ libdieharder_la-dab_monobit2.lo \ libdieharder_la-diehard_2dsphere.lo \ libdieharder_la-diehard_3dsphere.lo \ libdieharder_la-diehard_birthdays.lo \ libdieharder_la-diehard_bitstream.lo \ libdieharder_la-diehard_count_1s_byte.lo \ libdieharder_la-diehard_count_1s_stream.lo \ libdieharder_la-diehard_craps.lo \ libdieharder_la-diehard_dna.lo \ libdieharder_la-diehard_operm5.lo \ libdieharder_la-diehard_opso.lo \ libdieharder_la-diehard_oqso.lo \ libdieharder_la-diehard_parking_lot.lo \ libdieharder_la-diehard_rank_32x32.lo \ libdieharder_la-diehard_rank_6x8.lo \ libdieharder_la-diehard_runs.lo \ libdieharder_la-diehard_squeeze.lo \ libdieharder_la-diehard_sums.lo \ libdieharder_la-dieharder_rng_types.lo \ libdieharder_la-dieharder_test_types.lo \ libdieharder_la-histogram.lo libdieharder_la-kstest.lo \ libdieharder_la-marsaglia_tsang_gcd.lo \ libdieharder_la-marsaglia_tsang_gorilla.lo \ libdieharder_la-parse.lo libdieharder_la-prob.lo \ libdieharder_la-random_seed.lo libdieharder_la-rank.lo \ libdieharder_la-rgb_bitdist.lo \ libdieharder_la-rgb_kstest_test.lo \ libdieharder_la-rgb_lagged_sums.lo \ libdieharder_la-rgb_minimum_distance.lo \ libdieharder_la-rgb_permutations.lo \ libdieharder_la-rgb_persist.lo libdieharder_la-rgb_timing.lo \ libdieharder_la-rngav.lo libdieharder_la-rng_aes.lo \ libdieharder_la-rijndael-alg-fst.lo libdieharder_la-rng_ca.lo \ libdieharder_la-rng_dev_random.lo \ libdieharder_la-rng_dev_arandom.lo \ libdieharder_la-rng_dev_urandom.lo \ libdieharder_la-rng_file_input.lo \ libdieharder_la-rng_file_input_raw.lo \ libdieharder_la-rngs_gnu_r.lo libdieharder_la-rng_kiss.lo \ libdieharder_la-rng_jenkins.lo \ libdieharder_la-rng_superkiss.lo \ libdieharder_la-rng_stdin_input_raw.lo \ libdieharder_la-rng_threefish.lo libdieharder_la-rng_uvag.lo \ libdieharder_la-rng_XOR.lo libdieharder_la-sample.lo \ libdieharder_la-skein_block64.lo \ libdieharder_la-skein_block_ref.lo libdieharder_la-std_test.lo \ libdieharder_la-sts_monobit.lo libdieharder_la-sts_runs.lo \ libdieharder_la-sts_serial.lo libdieharder_la-timing.lo \ libdieharder_la-Vtest.lo libdieharder_la-version.lo \ libdieharder_la-Xtest.lo libdieharder_la_OBJECTS = $(am_libdieharder_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdieharder_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libdieharder_la_CFLAGS) $(CFLAGS) $(libdieharder_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libdieharder_la-Vtest.Plo \ ./$(DEPDIR)/libdieharder_la-Xtest.Plo \ ./$(DEPDIR)/libdieharder_la-bits.Plo \ ./$(DEPDIR)/libdieharder_la-chisq.Plo \ ./$(DEPDIR)/libdieharder_la-countx.Plo \ ./$(DEPDIR)/libdieharder_la-dab_bytedistrib.Plo \ ./$(DEPDIR)/libdieharder_la-dab_dct.Plo \ ./$(DEPDIR)/libdieharder_la-dab_filltree.Plo \ ./$(DEPDIR)/libdieharder_la-dab_filltree2.Plo \ ./$(DEPDIR)/libdieharder_la-dab_monobit2.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_2dsphere.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_3dsphere.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_birthdays.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_bitstream.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_count_1s_byte.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_count_1s_stream.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_craps.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_dna.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_operm5.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_opso.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_oqso.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_parking_lot.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_rank_32x32.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_rank_6x8.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_runs.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_squeeze.Plo \ ./$(DEPDIR)/libdieharder_la-diehard_sums.Plo \ ./$(DEPDIR)/libdieharder_la-dieharder_rng_types.Plo \ ./$(DEPDIR)/libdieharder_la-dieharder_test_types.Plo \ ./$(DEPDIR)/libdieharder_la-histogram.Plo \ ./$(DEPDIR)/libdieharder_la-kstest.Plo \ ./$(DEPDIR)/libdieharder_la-marsaglia_tsang_gcd.Plo \ ./$(DEPDIR)/libdieharder_la-marsaglia_tsang_gorilla.Plo \ ./$(DEPDIR)/libdieharder_la-parse.Plo \ ./$(DEPDIR)/libdieharder_la-prob.Plo \ ./$(DEPDIR)/libdieharder_la-random_seed.Plo \ ./$(DEPDIR)/libdieharder_la-rank.Plo \ ./$(DEPDIR)/libdieharder_la-rgb_bitdist.Plo \ ./$(DEPDIR)/libdieharder_la-rgb_kstest_test.Plo \ ./$(DEPDIR)/libdieharder_la-rgb_lagged_sums.Plo \ ./$(DEPDIR)/libdieharder_la-rgb_minimum_distance.Plo \ ./$(DEPDIR)/libdieharder_la-rgb_permutations.Plo \ ./$(DEPDIR)/libdieharder_la-rgb_persist.Plo \ ./$(DEPDIR)/libdieharder_la-rgb_timing.Plo \ ./$(DEPDIR)/libdieharder_la-rijndael-alg-fst.Plo \ ./$(DEPDIR)/libdieharder_la-rng_XOR.Plo \ ./$(DEPDIR)/libdieharder_la-rng_aes.Plo \ ./$(DEPDIR)/libdieharder_la-rng_ca.Plo \ ./$(DEPDIR)/libdieharder_la-rng_dev_arandom.Plo \ ./$(DEPDIR)/libdieharder_la-rng_dev_random.Plo \ ./$(DEPDIR)/libdieharder_la-rng_dev_urandom.Plo \ ./$(DEPDIR)/libdieharder_la-rng_file_input.Plo \ ./$(DEPDIR)/libdieharder_la-rng_file_input_raw.Plo \ ./$(DEPDIR)/libdieharder_la-rng_jenkins.Plo \ ./$(DEPDIR)/libdieharder_la-rng_kiss.Plo \ ./$(DEPDIR)/libdieharder_la-rng_stdin_input_raw.Plo \ ./$(DEPDIR)/libdieharder_la-rng_superkiss.Plo \ ./$(DEPDIR)/libdieharder_la-rng_threefish.Plo \ ./$(DEPDIR)/libdieharder_la-rng_uvag.Plo \ ./$(DEPDIR)/libdieharder_la-rngav.Plo \ ./$(DEPDIR)/libdieharder_la-rngs_gnu_r.Plo \ ./$(DEPDIR)/libdieharder_la-sample.Plo \ ./$(DEPDIR)/libdieharder_la-skein_block64.Plo \ ./$(DEPDIR)/libdieharder_la-skein_block_ref.Plo \ ./$(DEPDIR)/libdieharder_la-std_test.Plo \ ./$(DEPDIR)/libdieharder_la-sts_monobit.Plo \ ./$(DEPDIR)/libdieharder_la-sts_runs.Plo \ ./$(DEPDIR)/libdieharder_la-sts_serial.Plo \ ./$(DEPDIR)/libdieharder_la-timing.Plo \ ./$(DEPDIR)/libdieharder_la-version.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdieharder_la_SOURCES) DIST_SOURCES = $(libdieharder_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man3_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs COPYING README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ACTAR = @ACTAR@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIEHARDER_CFLAGS = @DIEHARDER_CFLAGS@ DIEHARDER_LIBS = @DIEHARDER_LIBS@ DIEHARDER_LIB_VERSION = @DIEHARDER_LIB_VERSION@ DIEHARDER_LT_VERSION = @DIEHARDER_LT_VERSION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LITTLE_ENDIAN = @LITTLE_ENDIAN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ RELEASED = @RELEASED@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ # This is automagically set in the toplevel build. Do not edit by # hand. VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dieharder_CFLAGS = @dieharder_CFLAGS@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdieharder_lo_CFLAGS = @libdieharder_lo_CFLAGS@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # VERSION_MAJOR = $(shell expr $(VERSION) : '\(.*\)\..*\..*' \| $(VERSION)) # RELEASE=0 # Man page man3_MANS = libdieharder.3 # Library definitions lib_LTLIBRARIES = libdieharder.la libdieharder_la_LIBADD = -lgsl -lgslcblas -lm libdieharder_la_LDFLAGS = -version-number @DIEHARDER_LT_VERSION@ libdieharder_la_CFLAGS = -std=c99 -Wall -pedantic # Sources # The shell script is the easy way to do this, by far. But it may not # be sufficiently portable. # libdieharder_la_SOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d") libdieharder_la_SOURCES = \ bits.c \ chisq.c \ countx.c \ dab_bytedistrib.c \ dab_dct.c \ dab_filltree.c \ dab_filltree2.c \ dab_monobit2.c \ diehard_2dsphere.c \ diehard_3dsphere.c \ diehard_birthdays.c \ diehard_bitstream.c \ diehard_count_1s_byte.c \ diehard_count_1s_stream.c \ diehard_craps.c \ diehard_dna.c \ diehard_operm5.c \ diehard_opso.c \ diehard_oqso.c \ diehard_parking_lot.c \ diehard_rank_32x32.c \ diehard_rank_6x8.c \ diehard_runs.c \ diehard_squeeze.c \ diehard_sums.c \ dieharder_rng_types.c \ dieharder_test_types.c \ histogram.c \ kstest.c \ marsaglia_tsang_gcd.c \ marsaglia_tsang_gorilla.c \ parse.c \ prob.c \ random_seed.c \ rank.c \ rgb_bitdist.c \ rgb_kstest_test.c \ rgb_lagged_sums.c \ rgb_minimum_distance.c \ rgb_permutations.c \ rgb_persist.c \ rgb_timing.c \ rngav.c \ rng_aes.c \ rijndael-alg-fst.c \ rng_ca.c \ rng_dev_random.c \ rng_dev_arandom.c \ rng_dev_urandom.c \ rng_file_input.c \ rng_file_input_raw.c \ rngs_gnu_r.c \ rng_kiss.c \ rng_jenkins.c \ rng_superkiss.c \ rng_stdin_input_raw.c \ rng_threefish.c \ rng_uvag.c \ rng_XOR.c \ sample.c \ skein_block64.c \ skein_block_ref.c \ std_test.c \ sts_monobit.c \ sts_runs.c \ sts_serial.c \ timing.c \ Vtest.c \ version.c \ Xtest.c # rgb_operm.c # rgb_lmn.c # The program/library may need to know what version it is, define # the VERSION macro. DEFINES = -DVERSION=$(VERSION) -DLITTLE_ENDIAN=$(LITTLE_ENDIAN) #======================================================================== # Define parameters and directives needed in compile/link steps. #======================================================================== # C Compiler. Change only if you must. # CC = gcc # Compile flags (use fairly standard -O3 as default) AM_CPPFLAGS = $(DEFINES) -I ${top_srcdir}/include -I ${includedir} AM_CFLAGS = -O3 -Wall -pedantic -Wno-unused-variable #======================================================================== # The only safe place to do commits is in the toplevel directory #======================================================================== SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/dieharder SVNTIME = dieharder.svn.time all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libdieharder/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libdieharder/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdieharder.la: $(libdieharder_la_OBJECTS) $(libdieharder_la_DEPENDENCIES) $(EXTRA_libdieharder_la_DEPENDENCIES) $(AM_V_CCLD)$(libdieharder_la_LINK) -rpath $(libdir) $(libdieharder_la_OBJECTS) $(libdieharder_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-Vtest.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-Xtest.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-bits.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-chisq.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-countx.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-dab_bytedistrib.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-dab_dct.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-dab_filltree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-dab_filltree2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-dab_monobit2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_2dsphere.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_3dsphere.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_birthdays.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_bitstream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_count_1s_byte.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_count_1s_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_craps.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_dna.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_operm5.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_opso.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_oqso.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_parking_lot.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_rank_32x32.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_rank_6x8.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_runs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_squeeze.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-diehard_sums.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-dieharder_rng_types.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-dieharder_test_types.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-histogram.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-kstest.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-marsaglia_tsang_gcd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-marsaglia_tsang_gorilla.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-parse.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-prob.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-random_seed.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rank.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rgb_bitdist.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rgb_kstest_test.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rgb_lagged_sums.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rgb_minimum_distance.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rgb_permutations.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rgb_persist.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rgb_timing.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rijndael-alg-fst.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_XOR.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_aes.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_ca.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_dev_arandom.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_dev_random.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_dev_urandom.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_file_input.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_file_input_raw.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_jenkins.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_kiss.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_stdin_input_raw.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_superkiss.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_threefish.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rng_uvag.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rngav.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-rngs_gnu_r.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-sample.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-skein_block64.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-skein_block_ref.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-std_test.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-sts_monobit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-sts_runs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-sts_serial.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-timing.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdieharder_la-version.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libdieharder_la-bits.lo: bits.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-bits.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-bits.Tpo -c -o libdieharder_la-bits.lo `test -f 'bits.c' || echo '$(srcdir)/'`bits.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-bits.Tpo $(DEPDIR)/libdieharder_la-bits.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bits.c' object='libdieharder_la-bits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-bits.lo `test -f 'bits.c' || echo '$(srcdir)/'`bits.c libdieharder_la-chisq.lo: chisq.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-chisq.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-chisq.Tpo -c -o libdieharder_la-chisq.lo `test -f 'chisq.c' || echo '$(srcdir)/'`chisq.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-chisq.Tpo $(DEPDIR)/libdieharder_la-chisq.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chisq.c' object='libdieharder_la-chisq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-chisq.lo `test -f 'chisq.c' || echo '$(srcdir)/'`chisq.c libdieharder_la-countx.lo: countx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-countx.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-countx.Tpo -c -o libdieharder_la-countx.lo `test -f 'countx.c' || echo '$(srcdir)/'`countx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-countx.Tpo $(DEPDIR)/libdieharder_la-countx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='countx.c' object='libdieharder_la-countx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-countx.lo `test -f 'countx.c' || echo '$(srcdir)/'`countx.c libdieharder_la-dab_bytedistrib.lo: dab_bytedistrib.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-dab_bytedistrib.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-dab_bytedistrib.Tpo -c -o libdieharder_la-dab_bytedistrib.lo `test -f 'dab_bytedistrib.c' || echo '$(srcdir)/'`dab_bytedistrib.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-dab_bytedistrib.Tpo $(DEPDIR)/libdieharder_la-dab_bytedistrib.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dab_bytedistrib.c' object='libdieharder_la-dab_bytedistrib.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-dab_bytedistrib.lo `test -f 'dab_bytedistrib.c' || echo '$(srcdir)/'`dab_bytedistrib.c libdieharder_la-dab_dct.lo: dab_dct.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-dab_dct.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-dab_dct.Tpo -c -o libdieharder_la-dab_dct.lo `test -f 'dab_dct.c' || echo '$(srcdir)/'`dab_dct.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-dab_dct.Tpo $(DEPDIR)/libdieharder_la-dab_dct.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dab_dct.c' object='libdieharder_la-dab_dct.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-dab_dct.lo `test -f 'dab_dct.c' || echo '$(srcdir)/'`dab_dct.c libdieharder_la-dab_filltree.lo: dab_filltree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-dab_filltree.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-dab_filltree.Tpo -c -o libdieharder_la-dab_filltree.lo `test -f 'dab_filltree.c' || echo '$(srcdir)/'`dab_filltree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-dab_filltree.Tpo $(DEPDIR)/libdieharder_la-dab_filltree.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dab_filltree.c' object='libdieharder_la-dab_filltree.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-dab_filltree.lo `test -f 'dab_filltree.c' || echo '$(srcdir)/'`dab_filltree.c libdieharder_la-dab_filltree2.lo: dab_filltree2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-dab_filltree2.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-dab_filltree2.Tpo -c -o libdieharder_la-dab_filltree2.lo `test -f 'dab_filltree2.c' || echo '$(srcdir)/'`dab_filltree2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-dab_filltree2.Tpo $(DEPDIR)/libdieharder_la-dab_filltree2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dab_filltree2.c' object='libdieharder_la-dab_filltree2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-dab_filltree2.lo `test -f 'dab_filltree2.c' || echo '$(srcdir)/'`dab_filltree2.c libdieharder_la-dab_monobit2.lo: dab_monobit2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-dab_monobit2.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-dab_monobit2.Tpo -c -o libdieharder_la-dab_monobit2.lo `test -f 'dab_monobit2.c' || echo '$(srcdir)/'`dab_monobit2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-dab_monobit2.Tpo $(DEPDIR)/libdieharder_la-dab_monobit2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dab_monobit2.c' object='libdieharder_la-dab_monobit2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-dab_monobit2.lo `test -f 'dab_monobit2.c' || echo '$(srcdir)/'`dab_monobit2.c libdieharder_la-diehard_2dsphere.lo: diehard_2dsphere.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_2dsphere.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_2dsphere.Tpo -c -o libdieharder_la-diehard_2dsphere.lo `test -f 'diehard_2dsphere.c' || echo '$(srcdir)/'`diehard_2dsphere.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_2dsphere.Tpo $(DEPDIR)/libdieharder_la-diehard_2dsphere.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_2dsphere.c' object='libdieharder_la-diehard_2dsphere.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_2dsphere.lo `test -f 'diehard_2dsphere.c' || echo '$(srcdir)/'`diehard_2dsphere.c libdieharder_la-diehard_3dsphere.lo: diehard_3dsphere.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_3dsphere.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_3dsphere.Tpo -c -o libdieharder_la-diehard_3dsphere.lo `test -f 'diehard_3dsphere.c' || echo '$(srcdir)/'`diehard_3dsphere.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_3dsphere.Tpo $(DEPDIR)/libdieharder_la-diehard_3dsphere.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_3dsphere.c' object='libdieharder_la-diehard_3dsphere.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_3dsphere.lo `test -f 'diehard_3dsphere.c' || echo '$(srcdir)/'`diehard_3dsphere.c libdieharder_la-diehard_birthdays.lo: diehard_birthdays.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_birthdays.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_birthdays.Tpo -c -o libdieharder_la-diehard_birthdays.lo `test -f 'diehard_birthdays.c' || echo '$(srcdir)/'`diehard_birthdays.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_birthdays.Tpo $(DEPDIR)/libdieharder_la-diehard_birthdays.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_birthdays.c' object='libdieharder_la-diehard_birthdays.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_birthdays.lo `test -f 'diehard_birthdays.c' || echo '$(srcdir)/'`diehard_birthdays.c libdieharder_la-diehard_bitstream.lo: diehard_bitstream.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_bitstream.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_bitstream.Tpo -c -o libdieharder_la-diehard_bitstream.lo `test -f 'diehard_bitstream.c' || echo '$(srcdir)/'`diehard_bitstream.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_bitstream.Tpo $(DEPDIR)/libdieharder_la-diehard_bitstream.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_bitstream.c' object='libdieharder_la-diehard_bitstream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_bitstream.lo `test -f 'diehard_bitstream.c' || echo '$(srcdir)/'`diehard_bitstream.c libdieharder_la-diehard_count_1s_byte.lo: diehard_count_1s_byte.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_count_1s_byte.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_count_1s_byte.Tpo -c -o libdieharder_la-diehard_count_1s_byte.lo `test -f 'diehard_count_1s_byte.c' || echo '$(srcdir)/'`diehard_count_1s_byte.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_count_1s_byte.Tpo $(DEPDIR)/libdieharder_la-diehard_count_1s_byte.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_count_1s_byte.c' object='libdieharder_la-diehard_count_1s_byte.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_count_1s_byte.lo `test -f 'diehard_count_1s_byte.c' || echo '$(srcdir)/'`diehard_count_1s_byte.c libdieharder_la-diehard_count_1s_stream.lo: diehard_count_1s_stream.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_count_1s_stream.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_count_1s_stream.Tpo -c -o libdieharder_la-diehard_count_1s_stream.lo `test -f 'diehard_count_1s_stream.c' || echo '$(srcdir)/'`diehard_count_1s_stream.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_count_1s_stream.Tpo $(DEPDIR)/libdieharder_la-diehard_count_1s_stream.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_count_1s_stream.c' object='libdieharder_la-diehard_count_1s_stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_count_1s_stream.lo `test -f 'diehard_count_1s_stream.c' || echo '$(srcdir)/'`diehard_count_1s_stream.c libdieharder_la-diehard_craps.lo: diehard_craps.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_craps.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_craps.Tpo -c -o libdieharder_la-diehard_craps.lo `test -f 'diehard_craps.c' || echo '$(srcdir)/'`diehard_craps.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_craps.Tpo $(DEPDIR)/libdieharder_la-diehard_craps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_craps.c' object='libdieharder_la-diehard_craps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_craps.lo `test -f 'diehard_craps.c' || echo '$(srcdir)/'`diehard_craps.c libdieharder_la-diehard_dna.lo: diehard_dna.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_dna.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_dna.Tpo -c -o libdieharder_la-diehard_dna.lo `test -f 'diehard_dna.c' || echo '$(srcdir)/'`diehard_dna.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_dna.Tpo $(DEPDIR)/libdieharder_la-diehard_dna.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_dna.c' object='libdieharder_la-diehard_dna.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_dna.lo `test -f 'diehard_dna.c' || echo '$(srcdir)/'`diehard_dna.c libdieharder_la-diehard_operm5.lo: diehard_operm5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_operm5.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_operm5.Tpo -c -o libdieharder_la-diehard_operm5.lo `test -f 'diehard_operm5.c' || echo '$(srcdir)/'`diehard_operm5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_operm5.Tpo $(DEPDIR)/libdieharder_la-diehard_operm5.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_operm5.c' object='libdieharder_la-diehard_operm5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_operm5.lo `test -f 'diehard_operm5.c' || echo '$(srcdir)/'`diehard_operm5.c libdieharder_la-diehard_opso.lo: diehard_opso.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_opso.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_opso.Tpo -c -o libdieharder_la-diehard_opso.lo `test -f 'diehard_opso.c' || echo '$(srcdir)/'`diehard_opso.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_opso.Tpo $(DEPDIR)/libdieharder_la-diehard_opso.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_opso.c' object='libdieharder_la-diehard_opso.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_opso.lo `test -f 'diehard_opso.c' || echo '$(srcdir)/'`diehard_opso.c libdieharder_la-diehard_oqso.lo: diehard_oqso.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_oqso.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_oqso.Tpo -c -o libdieharder_la-diehard_oqso.lo `test -f 'diehard_oqso.c' || echo '$(srcdir)/'`diehard_oqso.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_oqso.Tpo $(DEPDIR)/libdieharder_la-diehard_oqso.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_oqso.c' object='libdieharder_la-diehard_oqso.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_oqso.lo `test -f 'diehard_oqso.c' || echo '$(srcdir)/'`diehard_oqso.c libdieharder_la-diehard_parking_lot.lo: diehard_parking_lot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_parking_lot.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_parking_lot.Tpo -c -o libdieharder_la-diehard_parking_lot.lo `test -f 'diehard_parking_lot.c' || echo '$(srcdir)/'`diehard_parking_lot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_parking_lot.Tpo $(DEPDIR)/libdieharder_la-diehard_parking_lot.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_parking_lot.c' object='libdieharder_la-diehard_parking_lot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_parking_lot.lo `test -f 'diehard_parking_lot.c' || echo '$(srcdir)/'`diehard_parking_lot.c libdieharder_la-diehard_rank_32x32.lo: diehard_rank_32x32.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_rank_32x32.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_rank_32x32.Tpo -c -o libdieharder_la-diehard_rank_32x32.lo `test -f 'diehard_rank_32x32.c' || echo '$(srcdir)/'`diehard_rank_32x32.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_rank_32x32.Tpo $(DEPDIR)/libdieharder_la-diehard_rank_32x32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_rank_32x32.c' object='libdieharder_la-diehard_rank_32x32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_rank_32x32.lo `test -f 'diehard_rank_32x32.c' || echo '$(srcdir)/'`diehard_rank_32x32.c libdieharder_la-diehard_rank_6x8.lo: diehard_rank_6x8.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_rank_6x8.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_rank_6x8.Tpo -c -o libdieharder_la-diehard_rank_6x8.lo `test -f 'diehard_rank_6x8.c' || echo '$(srcdir)/'`diehard_rank_6x8.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_rank_6x8.Tpo $(DEPDIR)/libdieharder_la-diehard_rank_6x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_rank_6x8.c' object='libdieharder_la-diehard_rank_6x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_rank_6x8.lo `test -f 'diehard_rank_6x8.c' || echo '$(srcdir)/'`diehard_rank_6x8.c libdieharder_la-diehard_runs.lo: diehard_runs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_runs.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_runs.Tpo -c -o libdieharder_la-diehard_runs.lo `test -f 'diehard_runs.c' || echo '$(srcdir)/'`diehard_runs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_runs.Tpo $(DEPDIR)/libdieharder_la-diehard_runs.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_runs.c' object='libdieharder_la-diehard_runs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_runs.lo `test -f 'diehard_runs.c' || echo '$(srcdir)/'`diehard_runs.c libdieharder_la-diehard_squeeze.lo: diehard_squeeze.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_squeeze.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_squeeze.Tpo -c -o libdieharder_la-diehard_squeeze.lo `test -f 'diehard_squeeze.c' || echo '$(srcdir)/'`diehard_squeeze.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_squeeze.Tpo $(DEPDIR)/libdieharder_la-diehard_squeeze.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_squeeze.c' object='libdieharder_la-diehard_squeeze.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_squeeze.lo `test -f 'diehard_squeeze.c' || echo '$(srcdir)/'`diehard_squeeze.c libdieharder_la-diehard_sums.lo: diehard_sums.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-diehard_sums.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-diehard_sums.Tpo -c -o libdieharder_la-diehard_sums.lo `test -f 'diehard_sums.c' || echo '$(srcdir)/'`diehard_sums.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-diehard_sums.Tpo $(DEPDIR)/libdieharder_la-diehard_sums.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='diehard_sums.c' object='libdieharder_la-diehard_sums.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-diehard_sums.lo `test -f 'diehard_sums.c' || echo '$(srcdir)/'`diehard_sums.c libdieharder_la-dieharder_rng_types.lo: dieharder_rng_types.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-dieharder_rng_types.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-dieharder_rng_types.Tpo -c -o libdieharder_la-dieharder_rng_types.lo `test -f 'dieharder_rng_types.c' || echo '$(srcdir)/'`dieharder_rng_types.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-dieharder_rng_types.Tpo $(DEPDIR)/libdieharder_la-dieharder_rng_types.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dieharder_rng_types.c' object='libdieharder_la-dieharder_rng_types.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-dieharder_rng_types.lo `test -f 'dieharder_rng_types.c' || echo '$(srcdir)/'`dieharder_rng_types.c libdieharder_la-dieharder_test_types.lo: dieharder_test_types.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-dieharder_test_types.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-dieharder_test_types.Tpo -c -o libdieharder_la-dieharder_test_types.lo `test -f 'dieharder_test_types.c' || echo '$(srcdir)/'`dieharder_test_types.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-dieharder_test_types.Tpo $(DEPDIR)/libdieharder_la-dieharder_test_types.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dieharder_test_types.c' object='libdieharder_la-dieharder_test_types.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-dieharder_test_types.lo `test -f 'dieharder_test_types.c' || echo '$(srcdir)/'`dieharder_test_types.c libdieharder_la-histogram.lo: histogram.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-histogram.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-histogram.Tpo -c -o libdieharder_la-histogram.lo `test -f 'histogram.c' || echo '$(srcdir)/'`histogram.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-histogram.Tpo $(DEPDIR)/libdieharder_la-histogram.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='histogram.c' object='libdieharder_la-histogram.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-histogram.lo `test -f 'histogram.c' || echo '$(srcdir)/'`histogram.c libdieharder_la-kstest.lo: kstest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-kstest.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-kstest.Tpo -c -o libdieharder_la-kstest.lo `test -f 'kstest.c' || echo '$(srcdir)/'`kstest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-kstest.Tpo $(DEPDIR)/libdieharder_la-kstest.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kstest.c' object='libdieharder_la-kstest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-kstest.lo `test -f 'kstest.c' || echo '$(srcdir)/'`kstest.c libdieharder_la-marsaglia_tsang_gcd.lo: marsaglia_tsang_gcd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-marsaglia_tsang_gcd.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-marsaglia_tsang_gcd.Tpo -c -o libdieharder_la-marsaglia_tsang_gcd.lo `test -f 'marsaglia_tsang_gcd.c' || echo '$(srcdir)/'`marsaglia_tsang_gcd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-marsaglia_tsang_gcd.Tpo $(DEPDIR)/libdieharder_la-marsaglia_tsang_gcd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='marsaglia_tsang_gcd.c' object='libdieharder_la-marsaglia_tsang_gcd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-marsaglia_tsang_gcd.lo `test -f 'marsaglia_tsang_gcd.c' || echo '$(srcdir)/'`marsaglia_tsang_gcd.c libdieharder_la-marsaglia_tsang_gorilla.lo: marsaglia_tsang_gorilla.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-marsaglia_tsang_gorilla.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-marsaglia_tsang_gorilla.Tpo -c -o libdieharder_la-marsaglia_tsang_gorilla.lo `test -f 'marsaglia_tsang_gorilla.c' || echo '$(srcdir)/'`marsaglia_tsang_gorilla.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-marsaglia_tsang_gorilla.Tpo $(DEPDIR)/libdieharder_la-marsaglia_tsang_gorilla.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='marsaglia_tsang_gorilla.c' object='libdieharder_la-marsaglia_tsang_gorilla.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-marsaglia_tsang_gorilla.lo `test -f 'marsaglia_tsang_gorilla.c' || echo '$(srcdir)/'`marsaglia_tsang_gorilla.c libdieharder_la-parse.lo: parse.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-parse.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-parse.Tpo -c -o libdieharder_la-parse.lo `test -f 'parse.c' || echo '$(srcdir)/'`parse.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-parse.Tpo $(DEPDIR)/libdieharder_la-parse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse.c' object='libdieharder_la-parse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-parse.lo `test -f 'parse.c' || echo '$(srcdir)/'`parse.c libdieharder_la-prob.lo: prob.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-prob.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-prob.Tpo -c -o libdieharder_la-prob.lo `test -f 'prob.c' || echo '$(srcdir)/'`prob.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-prob.Tpo $(DEPDIR)/libdieharder_la-prob.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prob.c' object='libdieharder_la-prob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-prob.lo `test -f 'prob.c' || echo '$(srcdir)/'`prob.c libdieharder_la-random_seed.lo: random_seed.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-random_seed.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-random_seed.Tpo -c -o libdieharder_la-random_seed.lo `test -f 'random_seed.c' || echo '$(srcdir)/'`random_seed.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-random_seed.Tpo $(DEPDIR)/libdieharder_la-random_seed.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='random_seed.c' object='libdieharder_la-random_seed.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-random_seed.lo `test -f 'random_seed.c' || echo '$(srcdir)/'`random_seed.c libdieharder_la-rank.lo: rank.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rank.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rank.Tpo -c -o libdieharder_la-rank.lo `test -f 'rank.c' || echo '$(srcdir)/'`rank.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rank.Tpo $(DEPDIR)/libdieharder_la-rank.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rank.c' object='libdieharder_la-rank.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rank.lo `test -f 'rank.c' || echo '$(srcdir)/'`rank.c libdieharder_la-rgb_bitdist.lo: rgb_bitdist.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rgb_bitdist.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rgb_bitdist.Tpo -c -o libdieharder_la-rgb_bitdist.lo `test -f 'rgb_bitdist.c' || echo '$(srcdir)/'`rgb_bitdist.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rgb_bitdist.Tpo $(DEPDIR)/libdieharder_la-rgb_bitdist.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rgb_bitdist.c' object='libdieharder_la-rgb_bitdist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rgb_bitdist.lo `test -f 'rgb_bitdist.c' || echo '$(srcdir)/'`rgb_bitdist.c libdieharder_la-rgb_kstest_test.lo: rgb_kstest_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rgb_kstest_test.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rgb_kstest_test.Tpo -c -o libdieharder_la-rgb_kstest_test.lo `test -f 'rgb_kstest_test.c' || echo '$(srcdir)/'`rgb_kstest_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rgb_kstest_test.Tpo $(DEPDIR)/libdieharder_la-rgb_kstest_test.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rgb_kstest_test.c' object='libdieharder_la-rgb_kstest_test.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rgb_kstest_test.lo `test -f 'rgb_kstest_test.c' || echo '$(srcdir)/'`rgb_kstest_test.c libdieharder_la-rgb_lagged_sums.lo: rgb_lagged_sums.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rgb_lagged_sums.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rgb_lagged_sums.Tpo -c -o libdieharder_la-rgb_lagged_sums.lo `test -f 'rgb_lagged_sums.c' || echo '$(srcdir)/'`rgb_lagged_sums.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rgb_lagged_sums.Tpo $(DEPDIR)/libdieharder_la-rgb_lagged_sums.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rgb_lagged_sums.c' object='libdieharder_la-rgb_lagged_sums.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rgb_lagged_sums.lo `test -f 'rgb_lagged_sums.c' || echo '$(srcdir)/'`rgb_lagged_sums.c libdieharder_la-rgb_minimum_distance.lo: rgb_minimum_distance.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rgb_minimum_distance.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rgb_minimum_distance.Tpo -c -o libdieharder_la-rgb_minimum_distance.lo `test -f 'rgb_minimum_distance.c' || echo '$(srcdir)/'`rgb_minimum_distance.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rgb_minimum_distance.Tpo $(DEPDIR)/libdieharder_la-rgb_minimum_distance.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rgb_minimum_distance.c' object='libdieharder_la-rgb_minimum_distance.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rgb_minimum_distance.lo `test -f 'rgb_minimum_distance.c' || echo '$(srcdir)/'`rgb_minimum_distance.c libdieharder_la-rgb_permutations.lo: rgb_permutations.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rgb_permutations.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rgb_permutations.Tpo -c -o libdieharder_la-rgb_permutations.lo `test -f 'rgb_permutations.c' || echo '$(srcdir)/'`rgb_permutations.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rgb_permutations.Tpo $(DEPDIR)/libdieharder_la-rgb_permutations.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rgb_permutations.c' object='libdieharder_la-rgb_permutations.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rgb_permutations.lo `test -f 'rgb_permutations.c' || echo '$(srcdir)/'`rgb_permutations.c libdieharder_la-rgb_persist.lo: rgb_persist.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rgb_persist.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rgb_persist.Tpo -c -o libdieharder_la-rgb_persist.lo `test -f 'rgb_persist.c' || echo '$(srcdir)/'`rgb_persist.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rgb_persist.Tpo $(DEPDIR)/libdieharder_la-rgb_persist.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rgb_persist.c' object='libdieharder_la-rgb_persist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rgb_persist.lo `test -f 'rgb_persist.c' || echo '$(srcdir)/'`rgb_persist.c libdieharder_la-rgb_timing.lo: rgb_timing.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rgb_timing.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rgb_timing.Tpo -c -o libdieharder_la-rgb_timing.lo `test -f 'rgb_timing.c' || echo '$(srcdir)/'`rgb_timing.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rgb_timing.Tpo $(DEPDIR)/libdieharder_la-rgb_timing.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rgb_timing.c' object='libdieharder_la-rgb_timing.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rgb_timing.lo `test -f 'rgb_timing.c' || echo '$(srcdir)/'`rgb_timing.c libdieharder_la-rngav.lo: rngav.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rngav.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rngav.Tpo -c -o libdieharder_la-rngav.lo `test -f 'rngav.c' || echo '$(srcdir)/'`rngav.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rngav.Tpo $(DEPDIR)/libdieharder_la-rngav.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rngav.c' object='libdieharder_la-rngav.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rngav.lo `test -f 'rngav.c' || echo '$(srcdir)/'`rngav.c libdieharder_la-rng_aes.lo: rng_aes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_aes.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_aes.Tpo -c -o libdieharder_la-rng_aes.lo `test -f 'rng_aes.c' || echo '$(srcdir)/'`rng_aes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_aes.Tpo $(DEPDIR)/libdieharder_la-rng_aes.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_aes.c' object='libdieharder_la-rng_aes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_aes.lo `test -f 'rng_aes.c' || echo '$(srcdir)/'`rng_aes.c libdieharder_la-rijndael-alg-fst.lo: rijndael-alg-fst.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rijndael-alg-fst.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rijndael-alg-fst.Tpo -c -o libdieharder_la-rijndael-alg-fst.lo `test -f 'rijndael-alg-fst.c' || echo '$(srcdir)/'`rijndael-alg-fst.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rijndael-alg-fst.Tpo $(DEPDIR)/libdieharder_la-rijndael-alg-fst.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rijndael-alg-fst.c' object='libdieharder_la-rijndael-alg-fst.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rijndael-alg-fst.lo `test -f 'rijndael-alg-fst.c' || echo '$(srcdir)/'`rijndael-alg-fst.c libdieharder_la-rng_ca.lo: rng_ca.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_ca.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_ca.Tpo -c -o libdieharder_la-rng_ca.lo `test -f 'rng_ca.c' || echo '$(srcdir)/'`rng_ca.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_ca.Tpo $(DEPDIR)/libdieharder_la-rng_ca.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_ca.c' object='libdieharder_la-rng_ca.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_ca.lo `test -f 'rng_ca.c' || echo '$(srcdir)/'`rng_ca.c libdieharder_la-rng_dev_random.lo: rng_dev_random.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_dev_random.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_dev_random.Tpo -c -o libdieharder_la-rng_dev_random.lo `test -f 'rng_dev_random.c' || echo '$(srcdir)/'`rng_dev_random.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_dev_random.Tpo $(DEPDIR)/libdieharder_la-rng_dev_random.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_dev_random.c' object='libdieharder_la-rng_dev_random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_dev_random.lo `test -f 'rng_dev_random.c' || echo '$(srcdir)/'`rng_dev_random.c libdieharder_la-rng_dev_arandom.lo: rng_dev_arandom.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_dev_arandom.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_dev_arandom.Tpo -c -o libdieharder_la-rng_dev_arandom.lo `test -f 'rng_dev_arandom.c' || echo '$(srcdir)/'`rng_dev_arandom.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_dev_arandom.Tpo $(DEPDIR)/libdieharder_la-rng_dev_arandom.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_dev_arandom.c' object='libdieharder_la-rng_dev_arandom.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_dev_arandom.lo `test -f 'rng_dev_arandom.c' || echo '$(srcdir)/'`rng_dev_arandom.c libdieharder_la-rng_dev_urandom.lo: rng_dev_urandom.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_dev_urandom.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_dev_urandom.Tpo -c -o libdieharder_la-rng_dev_urandom.lo `test -f 'rng_dev_urandom.c' || echo '$(srcdir)/'`rng_dev_urandom.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_dev_urandom.Tpo $(DEPDIR)/libdieharder_la-rng_dev_urandom.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_dev_urandom.c' object='libdieharder_la-rng_dev_urandom.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_dev_urandom.lo `test -f 'rng_dev_urandom.c' || echo '$(srcdir)/'`rng_dev_urandom.c libdieharder_la-rng_file_input.lo: rng_file_input.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_file_input.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_file_input.Tpo -c -o libdieharder_la-rng_file_input.lo `test -f 'rng_file_input.c' || echo '$(srcdir)/'`rng_file_input.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_file_input.Tpo $(DEPDIR)/libdieharder_la-rng_file_input.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_file_input.c' object='libdieharder_la-rng_file_input.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_file_input.lo `test -f 'rng_file_input.c' || echo '$(srcdir)/'`rng_file_input.c libdieharder_la-rng_file_input_raw.lo: rng_file_input_raw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_file_input_raw.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_file_input_raw.Tpo -c -o libdieharder_la-rng_file_input_raw.lo `test -f 'rng_file_input_raw.c' || echo '$(srcdir)/'`rng_file_input_raw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_file_input_raw.Tpo $(DEPDIR)/libdieharder_la-rng_file_input_raw.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_file_input_raw.c' object='libdieharder_la-rng_file_input_raw.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_file_input_raw.lo `test -f 'rng_file_input_raw.c' || echo '$(srcdir)/'`rng_file_input_raw.c libdieharder_la-rngs_gnu_r.lo: rngs_gnu_r.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rngs_gnu_r.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rngs_gnu_r.Tpo -c -o libdieharder_la-rngs_gnu_r.lo `test -f 'rngs_gnu_r.c' || echo '$(srcdir)/'`rngs_gnu_r.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rngs_gnu_r.Tpo $(DEPDIR)/libdieharder_la-rngs_gnu_r.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rngs_gnu_r.c' object='libdieharder_la-rngs_gnu_r.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rngs_gnu_r.lo `test -f 'rngs_gnu_r.c' || echo '$(srcdir)/'`rngs_gnu_r.c libdieharder_la-rng_kiss.lo: rng_kiss.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_kiss.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_kiss.Tpo -c -o libdieharder_la-rng_kiss.lo `test -f 'rng_kiss.c' || echo '$(srcdir)/'`rng_kiss.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_kiss.Tpo $(DEPDIR)/libdieharder_la-rng_kiss.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_kiss.c' object='libdieharder_la-rng_kiss.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_kiss.lo `test -f 'rng_kiss.c' || echo '$(srcdir)/'`rng_kiss.c libdieharder_la-rng_jenkins.lo: rng_jenkins.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_jenkins.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_jenkins.Tpo -c -o libdieharder_la-rng_jenkins.lo `test -f 'rng_jenkins.c' || echo '$(srcdir)/'`rng_jenkins.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_jenkins.Tpo $(DEPDIR)/libdieharder_la-rng_jenkins.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_jenkins.c' object='libdieharder_la-rng_jenkins.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_jenkins.lo `test -f 'rng_jenkins.c' || echo '$(srcdir)/'`rng_jenkins.c libdieharder_la-rng_superkiss.lo: rng_superkiss.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_superkiss.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_superkiss.Tpo -c -o libdieharder_la-rng_superkiss.lo `test -f 'rng_superkiss.c' || echo '$(srcdir)/'`rng_superkiss.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_superkiss.Tpo $(DEPDIR)/libdieharder_la-rng_superkiss.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_superkiss.c' object='libdieharder_la-rng_superkiss.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_superkiss.lo `test -f 'rng_superkiss.c' || echo '$(srcdir)/'`rng_superkiss.c libdieharder_la-rng_stdin_input_raw.lo: rng_stdin_input_raw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_stdin_input_raw.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_stdin_input_raw.Tpo -c -o libdieharder_la-rng_stdin_input_raw.lo `test -f 'rng_stdin_input_raw.c' || echo '$(srcdir)/'`rng_stdin_input_raw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_stdin_input_raw.Tpo $(DEPDIR)/libdieharder_la-rng_stdin_input_raw.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_stdin_input_raw.c' object='libdieharder_la-rng_stdin_input_raw.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_stdin_input_raw.lo `test -f 'rng_stdin_input_raw.c' || echo '$(srcdir)/'`rng_stdin_input_raw.c libdieharder_la-rng_threefish.lo: rng_threefish.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_threefish.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_threefish.Tpo -c -o libdieharder_la-rng_threefish.lo `test -f 'rng_threefish.c' || echo '$(srcdir)/'`rng_threefish.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_threefish.Tpo $(DEPDIR)/libdieharder_la-rng_threefish.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_threefish.c' object='libdieharder_la-rng_threefish.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_threefish.lo `test -f 'rng_threefish.c' || echo '$(srcdir)/'`rng_threefish.c libdieharder_la-rng_uvag.lo: rng_uvag.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_uvag.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_uvag.Tpo -c -o libdieharder_la-rng_uvag.lo `test -f 'rng_uvag.c' || echo '$(srcdir)/'`rng_uvag.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_uvag.Tpo $(DEPDIR)/libdieharder_la-rng_uvag.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_uvag.c' object='libdieharder_la-rng_uvag.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_uvag.lo `test -f 'rng_uvag.c' || echo '$(srcdir)/'`rng_uvag.c libdieharder_la-rng_XOR.lo: rng_XOR.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-rng_XOR.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-rng_XOR.Tpo -c -o libdieharder_la-rng_XOR.lo `test -f 'rng_XOR.c' || echo '$(srcdir)/'`rng_XOR.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-rng_XOR.Tpo $(DEPDIR)/libdieharder_la-rng_XOR.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rng_XOR.c' object='libdieharder_la-rng_XOR.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-rng_XOR.lo `test -f 'rng_XOR.c' || echo '$(srcdir)/'`rng_XOR.c libdieharder_la-sample.lo: sample.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-sample.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-sample.Tpo -c -o libdieharder_la-sample.lo `test -f 'sample.c' || echo '$(srcdir)/'`sample.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-sample.Tpo $(DEPDIR)/libdieharder_la-sample.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample.c' object='libdieharder_la-sample.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-sample.lo `test -f 'sample.c' || echo '$(srcdir)/'`sample.c libdieharder_la-skein_block64.lo: skein_block64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-skein_block64.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-skein_block64.Tpo -c -o libdieharder_la-skein_block64.lo `test -f 'skein_block64.c' || echo '$(srcdir)/'`skein_block64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-skein_block64.Tpo $(DEPDIR)/libdieharder_la-skein_block64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='skein_block64.c' object='libdieharder_la-skein_block64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-skein_block64.lo `test -f 'skein_block64.c' || echo '$(srcdir)/'`skein_block64.c libdieharder_la-skein_block_ref.lo: skein_block_ref.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-skein_block_ref.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-skein_block_ref.Tpo -c -o libdieharder_la-skein_block_ref.lo `test -f 'skein_block_ref.c' || echo '$(srcdir)/'`skein_block_ref.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-skein_block_ref.Tpo $(DEPDIR)/libdieharder_la-skein_block_ref.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='skein_block_ref.c' object='libdieharder_la-skein_block_ref.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-skein_block_ref.lo `test -f 'skein_block_ref.c' || echo '$(srcdir)/'`skein_block_ref.c libdieharder_la-std_test.lo: std_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-std_test.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-std_test.Tpo -c -o libdieharder_la-std_test.lo `test -f 'std_test.c' || echo '$(srcdir)/'`std_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-std_test.Tpo $(DEPDIR)/libdieharder_la-std_test.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='std_test.c' object='libdieharder_la-std_test.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-std_test.lo `test -f 'std_test.c' || echo '$(srcdir)/'`std_test.c libdieharder_la-sts_monobit.lo: sts_monobit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-sts_monobit.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-sts_monobit.Tpo -c -o libdieharder_la-sts_monobit.lo `test -f 'sts_monobit.c' || echo '$(srcdir)/'`sts_monobit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-sts_monobit.Tpo $(DEPDIR)/libdieharder_la-sts_monobit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sts_monobit.c' object='libdieharder_la-sts_monobit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-sts_monobit.lo `test -f 'sts_monobit.c' || echo '$(srcdir)/'`sts_monobit.c libdieharder_la-sts_runs.lo: sts_runs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-sts_runs.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-sts_runs.Tpo -c -o libdieharder_la-sts_runs.lo `test -f 'sts_runs.c' || echo '$(srcdir)/'`sts_runs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-sts_runs.Tpo $(DEPDIR)/libdieharder_la-sts_runs.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sts_runs.c' object='libdieharder_la-sts_runs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-sts_runs.lo `test -f 'sts_runs.c' || echo '$(srcdir)/'`sts_runs.c libdieharder_la-sts_serial.lo: sts_serial.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-sts_serial.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-sts_serial.Tpo -c -o libdieharder_la-sts_serial.lo `test -f 'sts_serial.c' || echo '$(srcdir)/'`sts_serial.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-sts_serial.Tpo $(DEPDIR)/libdieharder_la-sts_serial.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sts_serial.c' object='libdieharder_la-sts_serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-sts_serial.lo `test -f 'sts_serial.c' || echo '$(srcdir)/'`sts_serial.c libdieharder_la-timing.lo: timing.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-timing.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-timing.Tpo -c -o libdieharder_la-timing.lo `test -f 'timing.c' || echo '$(srcdir)/'`timing.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-timing.Tpo $(DEPDIR)/libdieharder_la-timing.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='timing.c' object='libdieharder_la-timing.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-timing.lo `test -f 'timing.c' || echo '$(srcdir)/'`timing.c libdieharder_la-Vtest.lo: Vtest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-Vtest.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-Vtest.Tpo -c -o libdieharder_la-Vtest.lo `test -f 'Vtest.c' || echo '$(srcdir)/'`Vtest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-Vtest.Tpo $(DEPDIR)/libdieharder_la-Vtest.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Vtest.c' object='libdieharder_la-Vtest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-Vtest.lo `test -f 'Vtest.c' || echo '$(srcdir)/'`Vtest.c libdieharder_la-version.lo: version.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-version.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-version.Tpo -c -o libdieharder_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-version.Tpo $(DEPDIR)/libdieharder_la-version.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='version.c' object='libdieharder_la-version.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c libdieharder_la-Xtest.lo: Xtest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -MT libdieharder_la-Xtest.lo -MD -MP -MF $(DEPDIR)/libdieharder_la-Xtest.Tpo -c -o libdieharder_la-Xtest.lo `test -f 'Xtest.c' || echo '$(srcdir)/'`Xtest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdieharder_la-Xtest.Tpo $(DEPDIR)/libdieharder_la-Xtest.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Xtest.c' object='libdieharder_la-Xtest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdieharder_la_CFLAGS) $(CFLAGS) -c -o libdieharder_la-Xtest.lo `test -f 'Xtest.c' || echo '$(srcdir)/'`Xtest.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man3: $(man3_MANS) @$(NORMAL_INSTALL) @list1='$(man3_MANS)'; \ list2=''; \ test -n "$(man3dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.3[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(MANS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libdieharder_la-Vtest.Plo -rm -f ./$(DEPDIR)/libdieharder_la-Xtest.Plo -rm -f ./$(DEPDIR)/libdieharder_la-bits.Plo -rm -f ./$(DEPDIR)/libdieharder_la-chisq.Plo -rm -f ./$(DEPDIR)/libdieharder_la-countx.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_bytedistrib.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_dct.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_filltree.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_filltree2.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_monobit2.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_2dsphere.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_3dsphere.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_birthdays.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_bitstream.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_count_1s_byte.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_count_1s_stream.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_craps.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_dna.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_operm5.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_opso.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_oqso.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_parking_lot.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_rank_32x32.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_rank_6x8.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_runs.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_squeeze.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_sums.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dieharder_rng_types.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dieharder_test_types.Plo -rm -f ./$(DEPDIR)/libdieharder_la-histogram.Plo -rm -f ./$(DEPDIR)/libdieharder_la-kstest.Plo -rm -f ./$(DEPDIR)/libdieharder_la-marsaglia_tsang_gcd.Plo -rm -f ./$(DEPDIR)/libdieharder_la-marsaglia_tsang_gorilla.Plo -rm -f ./$(DEPDIR)/libdieharder_la-parse.Plo -rm -f ./$(DEPDIR)/libdieharder_la-prob.Plo -rm -f ./$(DEPDIR)/libdieharder_la-random_seed.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rank.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_bitdist.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_kstest_test.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_lagged_sums.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_minimum_distance.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_permutations.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_persist.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_timing.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rijndael-alg-fst.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_XOR.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_aes.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_ca.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_dev_arandom.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_dev_random.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_dev_urandom.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_file_input.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_file_input_raw.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_jenkins.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_kiss.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_stdin_input_raw.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_superkiss.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_threefish.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_uvag.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rngav.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rngs_gnu_r.Plo -rm -f ./$(DEPDIR)/libdieharder_la-sample.Plo -rm -f ./$(DEPDIR)/libdieharder_la-skein_block64.Plo -rm -f ./$(DEPDIR)/libdieharder_la-skein_block_ref.Plo -rm -f ./$(DEPDIR)/libdieharder_la-std_test.Plo -rm -f ./$(DEPDIR)/libdieharder_la-sts_monobit.Plo -rm -f ./$(DEPDIR)/libdieharder_la-sts_runs.Plo -rm -f ./$(DEPDIR)/libdieharder_la-sts_serial.Plo -rm -f ./$(DEPDIR)/libdieharder_la-timing.Plo -rm -f ./$(DEPDIR)/libdieharder_la-version.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man3 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libdieharder_la-Vtest.Plo -rm -f ./$(DEPDIR)/libdieharder_la-Xtest.Plo -rm -f ./$(DEPDIR)/libdieharder_la-bits.Plo -rm -f ./$(DEPDIR)/libdieharder_la-chisq.Plo -rm -f ./$(DEPDIR)/libdieharder_la-countx.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_bytedistrib.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_dct.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_filltree.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_filltree2.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dab_monobit2.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_2dsphere.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_3dsphere.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_birthdays.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_bitstream.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_count_1s_byte.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_count_1s_stream.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_craps.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_dna.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_operm5.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_opso.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_oqso.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_parking_lot.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_rank_32x32.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_rank_6x8.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_runs.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_squeeze.Plo -rm -f ./$(DEPDIR)/libdieharder_la-diehard_sums.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dieharder_rng_types.Plo -rm -f ./$(DEPDIR)/libdieharder_la-dieharder_test_types.Plo -rm -f ./$(DEPDIR)/libdieharder_la-histogram.Plo -rm -f ./$(DEPDIR)/libdieharder_la-kstest.Plo -rm -f ./$(DEPDIR)/libdieharder_la-marsaglia_tsang_gcd.Plo -rm -f ./$(DEPDIR)/libdieharder_la-marsaglia_tsang_gorilla.Plo -rm -f ./$(DEPDIR)/libdieharder_la-parse.Plo -rm -f ./$(DEPDIR)/libdieharder_la-prob.Plo -rm -f ./$(DEPDIR)/libdieharder_la-random_seed.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rank.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_bitdist.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_kstest_test.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_lagged_sums.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_minimum_distance.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_permutations.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_persist.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rgb_timing.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rijndael-alg-fst.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_XOR.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_aes.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_ca.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_dev_arandom.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_dev_random.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_dev_urandom.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_file_input.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_file_input_raw.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_jenkins.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_kiss.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_stdin_input_raw.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_superkiss.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_threefish.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rng_uvag.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rngav.Plo -rm -f ./$(DEPDIR)/libdieharder_la-rngs_gnu_r.Plo -rm -f ./$(DEPDIR)/libdieharder_la-sample.Plo -rm -f ./$(DEPDIR)/libdieharder_la-skein_block64.Plo -rm -f ./$(DEPDIR)/libdieharder_la-skein_block_ref.Plo -rm -f ./$(DEPDIR)/libdieharder_la-std_test.Plo -rm -f ./$(DEPDIR)/libdieharder_la-sts_monobit.Plo -rm -f ./$(DEPDIR)/libdieharder_la-sts_runs.Plo -rm -f ./$(DEPDIR)/libdieharder_la-sts_serial.Plo -rm -f ./$(DEPDIR)/libdieharder_la-timing.Plo -rm -f ./$(DEPDIR)/libdieharder_la-version.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-man uninstall-man: uninstall-man3 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man \ install-man3 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES uninstall-man \ uninstall-man3 .PRECIOUS: Makefile svn: (cd ..;make svn) sync: (cd ..;make sync) # 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: ./libdieharder/diehard_operm5.c.save0000664000175000017500000001520713707046103015703 0ustar eddedd/* * ======================================================================== * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* *======================================================================== * This is the Diehard OPERM5 test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * THE OVERLAPPING 5-PERMUTATION TEST :: * This is the OPERM5 test. It looks at a sequence of one mill- :: * ion 32-bit random integers. Each set of five consecutive :: * integers can be in one of 120 states, for the 5! possible or- :: * derings of five numbers. Thus the 5th, 6th, 7th,...numbers :: * each provide a state. As many thousands of state transitions :: * are observed, cumulative counts are made of the number of :: * occurences of each state. Then the quadratic form in the :: * weak inverse of the 120x120 covariance matrix yields a test :: * equivalent to the likelihood ratio test that the 120 cell :: * counts came from the specified (asymptotically) normal dis- :: * tribution with the specified 120x120 covariance matrix (with :: * rank 99). This version uses 1,000,000 integers, twice. :: * * Note -- the original diehard test almost certainly had errors, * as did the documentation. For example, the actual rank is * 5!-4!=96, not 99. The original dieharder version validated * against the c port of dieharder to give the same answers from * the same data, but failed gold-standard generators such as AES * or the XOR supergenerator with AES and several other top rank * generators. Frustration with trying to fix the test with very * little useful documentation caused me to eventually write * the rgb permutations test, which uses non-overlapping samples * (and hence avoids the covariance problem altogether) and can * be used for permutations of other than 5 integers. I was able * to compute the covariance matrix for the problem, but was unable * break it down into the combination of R, S and map that Marsaglia * used, and I wanted to (if possible) use the GSL permutations * routines to count/index the permutations, which yield a different * permutation index from Marsaglia's (adding to the problem). * * Fortunately, Stephen Moenkehues (moenkehues@googlemail.com) was * bored and listless and annoyed all at the same time while using * dieharder to test his SWIFFTX rng, a SHA3-candidate and fixed * diehard_operm5. His fix avoids the R, S and map -- he too went * the route of directly computing the correlation matrix but he * figured out how to transform the correlation matrix plus the * counts from a run directly into the desired statistic (a thing * that frustrated me in my own previous attempts) and now it works! * * So >>thank you<< Stephen! Thank you Open Source development * process! Thank you Ifni, Goddess of Luck and Numbers! And anybody * who wants to tackle the remaining diehard "problem" tests, (sums in * particular) should feel free to play through... *======================================================================== */ #include static int tflag=0; static double tcount[120]; /* * kperm computes the permutation number of a vector of five integers * passed to it. */ int kperm(uint v[],uint voffset) { int i,j,k,max; int w[5]; int pindex,uret,tmp; /* * work on a copy of v, not v itself in case we are using overlapping * 5-patterns. */ for(i=0;i<5;i++){ j = (i+voffset)%5; w[i] = v[j]; } if(verbose == -1){ printf("==================================================================\n"); printf("%10u %10u %10u %10u %10u\n",w[0],w[1],w[2],w[3],w[4]); printf(" Permutations = \n"); } pindex = 0; for(i=4;i>0;i--){ max = w[0]; k = 0; for(j=1;j<=i;j++){ if(max <= w[j]){ max = w[j]; k = j; } } pindex = (i+1)*pindex + k; tmp = w[i]; w[i] = w[k]; w[k] = tmp; if(verbose == -1){ printf("%10u %10u %10u %10u %10u\n",w[0],w[1],w[2],w[3],w[4]); } } uret = pindex; if(verbose == -1){ printf(" => %u\n",pindex); } return uret; } void diehard_operm5(Test **test, int irun) { int i,j,k,kp,t,vind; uint v[5]; double count[120]; double av,norm,x[120],chisq,ndof,pvalue; /* * Zero count vector, was t(120) in diehard.f90. */ for(i=0;i<120;i++) { count[i] = 0.0; if(tflag == 0){ tcount[i] = 0.0; tflag = 1; } } if(overlap){ for(i=0;i<5;i++){ v[i] = gsl_rng_get(rng); } vind = 0; } else { for(i=0;i<5;i++){ v[i] = gsl_rng_get(rng); } } for(t=0;ttsamples;t++){ /* * OK, now we are ready to generate a list of permutation indices. * Basically, we take a vector of 5 integers and transform it into a * number with the kperm function. We will use the overlap flag to * determine whether or not to refill the entire v vector or just * rotate bytes. */ if(overlap){ kp = kperm(v,vind); count[kp] += 1; v[vind] = gsl_rng_get(rng); vind = (vind+1)%5; } else { for(i=0;i<5;i++){ v[i] = gsl_rng_get(rng); } kp = kperm(v,0); count[kp] += 1; } } for(i=0;i<120;i++){ tcount[i] += count[i]; /* printf("%u: %f\n",i,tcount[i]); */ } chisq = 0.0; av = test[0]->tsamples/120.0; norm = test[0]->tsamples; // this belongs to the pseudoinverse /* The pseudoinverse P of the covariancematrix C is computed for n = 1. If n = 100 the new covariancematrix is C_100 = 100*C. Therefore the new pseudoinverse is P_100 = (1/100)*P. You can see this from the equation C*P*C = C */ if(overlap==0){ norm = av; } for(i=0;i<120;i++){ x[i] = count[i] - av; } if(overlap){ for(i=0;i<120;i++){ for(j=0;j<120;j++){ chisq = chisq + x[i]*pseudoInv[i][j]*x[j]; } } } if(overlap==0){ for(i=0;i<120;i++){ chisq = chisq + x[i]*x[i]; } } if(verbose == -2){ printf("norm = %10.2f, av = %10.2f",norm,av); for(i=0;i<120;i++){ printf("count[%u] = %4.0f; x[%u] = %3.2f ",i,count[i],i,x[i]); if((i%2)==0){printf("\n");} } if((chisq/norm) >= 0){ printf("\n\nchisq/norm: %10.5f :-) and chisq: %10.5f\n",(chisq/norm), chisq); } } if((chisq/norm) < 0){ printf("\n\nCHISQ NEG.! chisq/norm: %10.5f and chisq: %10.5f",(chisq/norm), chisq); } chisq = fabs(chisq / norm); ndof = 96; // the rank of the covariancematrix and the pseudoinverse if(overlap == 0){ ndof = 120-1; } MYDEBUG(D_DIEHARD_OPERM5){ printf("# diehard_operm5(): chisq[%u] = %10.5f\n",kspi,chisq); } test[0]->pvalues[irun] = gsl_sf_gamma_inc_Q((double)(ndof)/2.0,chisq/2.0); MYDEBUG(D_DIEHARD_OPERM5){ printf("# diehard_operm5(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } kspi++; } ./libdieharder/dab_filltree.c0000664000175000017500000001037114273744276014507 0ustar eddedd/* *========================================================= * DAB Fill Tree Test * This test fills small binary trees of fixed depth with * words from the the RNG. When a word cannot be inserted * into the tree, the current count of words in the tree is * recorded, along with the position at which the word * would have been inserted. * * The words from the RNG are rotated (in long cycles) to * better detect RNGs that may bias only the high, middle, * or low bytes. * * The test returns two p-values. The first is a Pearson * chi-sq test against the expected values (which were * estimated empirically). The second is a Pearson chi-sq * test for a uniform distribution of the positions at * which the insert failed. * * Because of the target data for the first p-value, * ntuple must be kept at the default (32). */ #include #define RotL(x,N) (rmax_mask & (((x) << (N)) | ((x) >> (rmax_bits-(N))))) #define CYCLES 4 static double targetData1[] __attribute__((unused)) = { 0,0,0,0,0.00000000,0.04446648,0.08890238,0.11821510,0.13166032,0.13135398,0.12074333,0.10339043,0.08300095,0.06272901,0.04470878,0.02987510,0.01872015,0.01095902,0.00597167,0.00298869,0.00138878,0.00059125,0.00022524,0.00007782,0.00002346,0.00000634,0.00000133,0.00000035,0.00000003,0.00000001,0.00000000,0.00000000 }; // n = 64, 0, 0.04446648, 0.08890238, .... static double targetData[] = { 0.0, 0.0, 0.0, 0.0, 0.13333333, 0.20000000, 0.20634921, 0.17857143, 0.13007085, 0.08183633, 0.04338395, 0.01851828, 0.00617270, 0.00151193, 0.00023520, 0.00001680, 0.00000000, 0.00000000, 0.00000000, 0.00000000 }; static inline int insert(double x, double *array, unsigned int startVal); int dab_filltree(Test **test,int irun) { int size = (ntuple == 0) ? 32 : ntuple; unsigned int target = sizeof(targetData)/sizeof(double); int startVal = (size / 2) - 1; double *array = (double *) malloc(sizeof(double) * size); double *counts, *expected; int i, j; double x; unsigned int start = 0; unsigned int end = 0; unsigned int rotAmount = 0; double *positionCounts; counts = (double *) malloc(sizeof(double) * target); expected = (double *) malloc(sizeof(double) * target); memset(counts, 0, sizeof(double) * target); positionCounts = (double *) malloc(sizeof(double) * size/2); memset(positionCounts, 0, sizeof(double) * size/2); test[0]->ntuple = size; test[1]->ntuple = size; /* Calculate expected counts. */ for (i = 0; i < target; i++) { expected[i] = targetData[i] * test[0]->tsamples; if (expected[i] < 4) { if (end == 0) start = i; } else if (expected[i] > 4) end = i; } start++; for (j = 0; j < test[0]->tsamples; j++) { int ret; memset(array, 0, sizeof(double) * size); i = 0; do { unsigned int v = gsl_rng_get(rng); x = ((double) RotL(v, rotAmount)) / rmax_mask; i++; if (i > size * 2) { test[0]->pvalues[irun] = 0; return(0); } ret = insert(x, array, startVal); } while (ret == -1); positionCounts[ret/2]++; counts[i-1]++; if (j % (test[0]->tsamples/CYCLES) == 0) rotAmount++; } test[0]->pvalues[irun] = chisq_pearson(counts + start, expected + start, end - start); for (i = 0; i < size/2; i++) expected[i] = test[0]->tsamples/(size/2); test[1]->pvalues[irun] = chisq_pearson(positionCounts, expected, size/2); nullfree(positionCounts); nullfree(expected); nullfree(counts); nullfree(array); return(0); } static inline int insert(double x, double *array, unsigned int startVal) { uint d = (startVal + 1) / 2; uint i = startVal; while (d > 0) { if (array[i] == 0) { array[i] = x; return -1; } if (array[i] < x) { i += d; } else { i -= d; } d /= 2; } return i; } #include int main_filltree(int argc, char **argv) { int size = 64; int startVal = (size / 2) - 1; double *array = (double *) malloc(sizeof(double) * size); int i, j; double x; i = time(NULL); if (argc > 1) srand((i ^ (atoi(argv[1])<<7)) + (i<<4)); else srand(i); for (j = 0; j < 10000000; j++) { memset(array, 0, sizeof(double) * size); i = 0; do { x = (double) rand() / RAND_MAX; i++; } while (insert(x, array, startVal) == 0); printf("%d\n", i); } // for (i = 0; i < size; i++) printf("%f\n", array[i]); return(0); } ./libdieharder/rng_file_input_raw.c0000664000175000017500000001714213707046103015734 0ustar eddedd/* * file_input_raw * * See copyright in copyright.h and the accompanying file COPYING * */ #include /* * This is a wrapper for getting random numbers in RAW (binary integer) * format from a file. A raw file has no headers -- it is presumed to be * a pure bit stream. We therefore have to read it in a page at a time, * realloc its required storage as needed, and count as we go. In this * way we can figure out if e.g. a compressed file is sufficiently * "random" to make it likely that the compression is good and so on. */ static unsigned long int file_input_raw_get (void *vstate); static double file_input_raw_get_double (void *vstate); static void file_input_raw_set (void *vstate, unsigned long int s); /* * This typedef struct file_input_state_t struct contains the data * maintained on the operation of the file_input rng, and can be accessed * via rng->state->whatever * * fp is the file pointer * flen is the number of rands in the file (filecount) * rptr is a count of rands returned since last rewind * rtot is a count of rands returned since the file was opened or it * was deliberately reset. * rewind_cnt is a count of how many times the file was rewound since * its last open. * * file_input_state_t is defined in libdieharder.h currently and shared with * file_input_raw.c */ static unsigned long int file_input_raw_get(void *vstate) { file_input_state_t *state = (file_input_state_t *) vstate; unsigned int iret; /* * Check that the file is open (via file_input_raw_set()). */ if(state->fp != NULL) { /* * Read in the next random number from the file */ if(fread(&iret,sizeof(uint),1,state->fp) != 1){ fprintf(stderr,"# file_input_raw(): Error. This cannot happen.\n"); exit(0); } /* * Success. iret is presumably valid and ready to return. Increment the * counter of rands read so far. */ state->rptr++; state->rtot++; if(verbose){ fprintf(stdout,"# file_input() %u: %u/%u -> %u\n",(uint)state->rtot,(uint)state->rptr,(uint)state->flen,(uint)iret); } /* * This (with seed s == 0) basically rewinds the file and resets * state->rptr to 0, but rtot keeps running, */ if(state->flen && state->rptr == state->flen){ /* * Reset/rewind the file */ file_input_raw_set(vstate, 0); } return(iret); } else { fprintf(stderr,"Error: %s not open. Exiting.\n", filename); exit(0); } } static double file_input_raw_get_double (void *vstate) { return file_input_raw_get (vstate) / (double) UINT_MAX; } /* * file_input_raw_set() is very simple. If the file hasn't been opened * yet, it opens it and sets flen and rptr to zero. Otherwise it * rewinds it and sets rptr to zero. Typically it is only called one * time per file by the user, although it will be called once per read * page by file_input_raw_get(). */ static void file_input_raw_set (void *vstate, unsigned long int s) { static uint first=1; struct stat sbuf; file_input_state_t *state = (file_input_state_t *) vstate; if(verbose == D_FILE_INPUT_RAW || verbose == D_ALL){ fprintf(stdout,"# file_input_raw(): entering file_input_raw_set\n"); fprintf(stdout,"# file_input_raw(): state->fp = %p, seed = %lu\n",(void*) state->fp,s); } /* * Get and set the file length, check to make sure the file exists, * whatever... */ if(first){ if(verbose){ fprintf(stdout,"# file_input_raw(): entering file_input_raw_set 1st call.\n"); } /* * This clears an obscure bug in FreeBSD reported by Lucius Windschuh, * lwindschuh@googlemail.com, I think. Otherwise it should be * harmless. It just initializes state->fp to 0 so that the file * correctly opens later. */ state->fp = NULL; if(stat(filename, &sbuf)){ if(errno == EBADF){ fprintf(stderr,"# file_input_raw(): Error -- file descriptor %s bad.\n",filename); exit(0); } } /* * Is this a regular file? If so, turn its byte length into a 32 bit uint * length. */ if(S_ISREG(sbuf.st_mode)){ /* * sbuf.st_size should be type off_t, which is automatically u_int64_t * if FILE_OFFSET_BITS is set to 64, which it is. So this should be * able to manage large file sizes. Similarly, in the struct * file_input_state_t flen should be type off_t. This means that * filecount has to be off_t as well. */ state->flen = sbuf.st_size/sizeof(uint); filecount = state->flen; if (filecount < 16) { fprintf(stderr,"# file_input_raw(): Error -- file %s is too small.\n",filename); exit(0); } } else if (S_ISDIR(sbuf.st_mode)){ fprintf(stderr,"# file_input_raw(): Error -- path %s is a directory.\n",filename); exit(0); } else { /* * This is neither a file nor a directory, so we will not * even try to seek. */ state->flen = 0; } /* * This segment is executed only one time when the file is FIRST opened. */ first = 0; } /* * We use the "seed" to determine whether or not to reopen or * rewind. A seed s == 0 for an open file means rewind; a seed * of anything else forces a close (resetting rewind_cnt) followed * by a reopen. */ if(state->fp && s ) { if(verbose == D_FILE_INPUT || verbose == D_ALL){ fprintf(stdout,"# file_input(): Closing/reopening/resetting %s\n",filename); } fclose(state->fp); state->fp = NULL; } if (state->fp == NULL){ if(verbose == D_FILE_INPUT_RAW || verbose == D_ALL){ fprintf(stdout,"# file_input_raw(): Opening %s\n", filename); } /* * If we get here, the file exists, is a regular file, and we know its * length. We can now open it. The test catches all other conditions * that might keep the file from reading, e.g. permissions. */ if ((state->fp = fopen(filename,"r")) == NULL) { fprintf(stderr,"# file_input_raw(): Error: Cannot open %s, exiting.\n", filename); exit(0); } /* * OK, so if we get here, the file is open. */ if(verbose == D_FILE_INPUT_RAW || verbose == D_ALL){ fprintf(stdout,"# file_input_raw(): Opened %s for the first time.\n", filename); fprintf(stdout,"# file_input_raw(): state->fp is %8p, file contains %u unsigned integers.\n",(void*) state->fp,(uint)state->flen); } state->rptr = 0; /* No rands read yet */ /* * We only reset the entire file if there is a nonzero seed passed in. * This clears both rtot and rewind_cnt in addition to rptr. */ if(s) { state->rtot = 0; state->rewind_cnt = 0; } } else { /* * Rewinding seriously reduces the size of the space being explored. * On the other hand, bombing a test also sucks, especially in a long * -a(ll) run. Therefore we rewind every time our file pointer reaches * the end of the file or call gsl_rng_set(rng,0). */ if(state->flen && state->rptr >= state->flen){ rewind(state->fp); state->rptr = 0; state->rewind_cnt++; if(verbose == D_FILE_INPUT_RAW || verbose == D_ALL){ fprintf(stderr,"# file_input_raw(): Rewinding %s at rtot = %u\n", filename,(uint) state->rtot); fprintf(stderr,"# file_input_raw(): Rewind count = %u, resetting rptr = %u\n",state->rewind_cnt,(uint) state->rptr); } } else { return; } } } static const gsl_rng_type file_input_raw_type = {"file_input_raw", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (file_input_state_t), &file_input_raw_set, &file_input_raw_get, &file_input_raw_get_double}; const gsl_rng_type *gsl_rng_file_input_raw = &file_input_raw_type; ./libdieharder/diehard_runs_working.c0000664000175000017500000001317613707046103016271 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is the Diehard Runs test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * Here is the test description from diehard_tests.txt: * * This is the RUNS test. It counts runs up, and runs down,in a sequence * of uniform [0,1) variables, obtained by floating the 32-bit integers * in the specified file. This example shows how runs are counted: * .123, .357, .789, .425,. 224, .416, .95 * contains an up-run of length 3, a down-run of length 2 and an up-run * of (at least) 2, depending on the next values. The covariance matrices * for the runs-up and runs-down are well-known, leading to chisquare tests * for quadratic forms in the weak inverses of the covariance matrices. * Runs are counted for sequences of length 10,000. This is done ten times, * then repeated. * * Comment * * I modify this the following ways. First, I let the sequence length be * the variable -t (vector length) instead of fixing it at 10,000. This * lets one test sequences that are much longer (entirely possible with * a modern CPU even for a fairly slow RNG). Second, I repeat this for * the variable -s (samples) times, default 100 and not just 10. Third, * because RNG's often have "bad seeds" for which they misbehave, the * individual sequences can be optionally -i reseeded for each sample. * Because this CAN let bad behavior be averaged out to where * it isn't apparent for many samples with few bad seeds, we may need to * plot the actual distribution of p-values for this and other tests where * this option is used. Fourth, it is silly to convert integers into floats * in order to do this test. Up sequences in integers are down sequences in * floats once one divides by the largest integer available to the generator, * period. Integer arithmetic is much faster than float AND one skips the * very costly division associated with conversion. * *======================================================================== */ #include /* * The following are the definitions and parameters for runs, based on * Journal of Applied Statistics v30, Algorithm AS 157, 1981: * The Runs-Up and Runs-Down Tests, by R. G. T. Grafton. * (and before that Knuth's The Art of Programming v. 2). */ #define RUN_MAX 6 /* * a_ij */ static double a[6][6] = { { 4529.4, 9044.9, 13568.0, 18091.0, 22615.0, 27892.0}, { 9044.9, 18097.0, 27139.0, 36187.0, 45234.0, 55789.0}, {13568.0, 27139.0, 40721.0, 54281.0, 67852.0, 83685.0}, {18091.0, 36187.0, 54281.0, 72414.0, 90470.0, 111580.0}, {22615.0, 45234.0, 67852.0, 90470.0, 113262.0, 139476.0}, {27892.0, 55789.0, 83685.0, 111580.0, 139476.0, 172860.0} }; /* * b_i */ static double b[6] = { 1.0/6.0, 5.0/24.0, 11.0/120.0, 19.0/720.0, 29.0/5040.0, 1.0/840.0,}; uint *runs_rand; int diehard_runs(Test **test, int irun) { int i,j,k,t,ns; unsigned int ucount,dcount,increased; int upruns[RUN_MAX],downruns[RUN_MAX]; double uv,dv,up_pks,dn_pks; double *uv_pvalue,*dv_pvalue; runs_rand = (uint *)malloc(test[0]->tsamples*sizeof(uint)); /* * This is just for display. */ test[0]->ntuple = 0; test[1]->ntuple = 0; /* * Clear up and down run bins */ for(k=0;ktsamples;t++) { runs_rand[t] = gsl_rng_get(rng); if(verbose){ printf("%d: %10u %u %u\n",t,runs_rand[t],ucount,dcount); } /* * Did we increase? */ if(runs_rand[t] > runs_rand[t-1]){ ucount++; if(ucount > RUN_MAX) ucount = RUN_MAX; downruns[dcount-1]++; dcount = 1; } else { dcount++; if(dcount > RUN_MAX) dcount = RUN_MAX; upruns[ucount-1]++; ucount = 1; } } if(runs_rand[test[0]->tsamples-1] > runs_rand[0]){ ucount++; if(ucount > RUN_MAX) ucount = RUN_MAX; downruns[dcount-1]++; dcount = 1; } else { dcount++; if(dcount > RUN_MAX) dcount = RUN_MAX; upruns[ucount-1]++; ucount = 1; } /* * This ends a single sample. * Compute the test statistic for up and down runs. */ uv=0.0; dv=0.0; if(verbose){ printf(" i upruns downruns\n"); } for(i=0;itsamples*b[i])*(upruns[j] - test[0]->tsamples*b[j])*a[i][j]; dv += ((double)downruns[i] - test[0]->tsamples*b[i])*(downruns[j] - test[0]->tsamples*b[j])*a[i][j]; } } uv /= (double)test[0]->tsamples; dv /= (double)test[0]->tsamples; /* * This NEEDS WORK! It isn't right, somehow... */ up_pks = 1.0 - exp ( -0.5 * uv ) * ( 1.0 + 0.5 * uv + 0.125 * uv*uv ); dn_pks = 1.0 - exp ( -0.5 * dv ) * ( 1.0 + 0.5 * dv + 0.125 * dv*dv ); MYDEBUG(D_DIEHARD_RUNS) { printf("uv = %f dv = %f\n",uv,dv); } test[0]->pvalues[irun] = gsl_sf_gamma_inc_Q(3.0,uv/2.0); test[1]->pvalues[irun] = gsl_sf_gamma_inc_Q(3.0,dv/2.0); MYDEBUG(D_DIEHARD_RUNS) { printf("# diehard_runs(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); printf("# diehard_runs(): test[1]->pvalues[%u] = %10.5f\n",irun,test[1]->pvalues[irun]); } free(runs_rand); return(0); } ./libdieharder/rgb_permutations.c0000664000175000017500000001014013707046103015432 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This just counts the permutations of n samples. They should * occur n! times each. We count them and do a straight chisq. *======================================================================== */ #include #define RGB_PERM_KMAX 10 uint nperms; double fpipi(int pi1,int pi2,int nkp); uint rgb_permutations_k; int rgb_permutations(Test **test,int irun) { uint i,k,permindex=0,t; Vtest vtest; double *testv; size_t ps[4096]; gsl_permutation** lookup; MYDEBUG(D_RGB_PERMUTATIONS){ printf("#==================================================================\n"); printf("# rgb_permutations: Debug with %u\n",D_RGB_PERMUTATIONS); } /* * Number of permutations. Note that the minimum ntuple value for a * valid test is 2. If ntuple is less than 2, we choose the default * test size as 5 (like operm5). */ if(ntuple<2){ test[0]->ntuple = 5; } else { test[0]->ntuple = ntuple; } k = test[0]->ntuple; nperms = gsl_sf_fact(k); /* * A vector to accumulate rands in some sort order */ testv = (double *)malloc(k*sizeof(double)); MYDEBUG(D_RGB_PERMUTATIONS){ printf("# rgb_permutations: There are %u permutations of length k = %u\n",nperms,k); } /* * Create a test, initialize it. */ Vtest_create(&vtest,nperms); vtest.cutoff = 5.0; for(i=0;itsamples/nperms; } MYDEBUG(D_RGB_PERMUTATIONS){ printf("# rgb_permutations: Allocating permutation lookup table.\n"); } lookup = (gsl_permutation**) malloc(nperms*sizeof(gsl_permutation*)); for(i=0;i ",i); gsl_permutation_fprintf(stdout,lookup[i]," %u"); printf("\n"); } } /* * We count the order permutations in a long string of samples of * rgb_permutation_k non-overlapping rands. This is done by: * a) Filling testv[] with rgb_permutation_k rands. * b) Using gsl_sort_index to generate the permutation index. * c) Incrementing a counter for that index (a-c done tsamples times) * d) Doing a straight chisq on the counter vector with nperms-1 DOF * * This test should be done with tsamples > 30*nperms, easily met for * reasonable rgb_permutation_k */ for(t=0;ttsamples;t++){ /* * To sort into a perm, test vector needs to be double. */ for(i=0;idata,k*sizeof(size_t))==0){ permindex = i; MYDEBUG(D_RGB_PERMUTATIONS){ printf("# Found permutation: "); gsl_permutation_fprintf(stdout,lookup[i]," %u"); printf(" = %u\n",i); } break; } } vtest.x[permindex]++; MYDEBUG(D_RGB_PERMUTATIONS){ printf("# rgb_permutations: Augmenting vtest.x[%u] = %f\n",permindex,vtest.x[permindex]); } } MYDEBUG(D_RGB_PERMUTATIONS){ printf("# rgb_permutations:==============================\n"); printf("# rgb_permutations: permutation count = \n"); for(i=0;ipvalues[irun] = vtest.pvalue; MYDEBUG(D_RGB_PERMUTATIONS) { printf("# rgb_permutations(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } for(i=0;i #include #include #include #include #include typedef unsigned char u1; typedef unsigned long u4; typedef unsigned long long u8; #define LOGBUCKETS 2 #define BUCKETS (1<>(32-k))) /* static u4 iii = 0; */ static u4 ranval( ranctx *x ) { u4 e; e = x->a; x->a = x->b; x->b = rot(x->c, 19) + x->d; x->c = x->d ^ x->a; x->d = e + x->b; return x->c; } static void raninit( ranctx *x, u4 seed ) { u4 i; x->a = 0xf1ea5eed; x->b = x->c = x->d = seed; for (i=0; i<20; ++i) { (void)ranval(x); } } /* count how many bits are set in a 32-bit integer, returns 0..32 */ static u4 count(u4 x) { u4 c = x; if (GRAY_CODE) c = c^(c<<1); c = (c & 0x55555555) + ((c>>1 ) & 0x55555555); c = (c & 0x33333333) + ((c>>2 ) & 0x33333333); c = (c & 0x0f0f0f0f) + ((c>>4 ) & 0x0f0f0f0f); c = (c & 0x00ff00ff) + ((c>>8 ) & 0x00ff00ff); c = (c & 0x0000ffff) + ((c>>16) & 0x0000ffff); return c; } /* somehow covert 0..32 into 0..BUCKETS-1 */ static u4 ftab[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; /* initialize the data collection array -- UNUSED (yet) static void datainit2( u8 *data, u4 index, u4 depth, u4 terms) { u4 i; index *= 3; if (depth == terms-1) { for (i=0; i<3; ++i) data[index+i] = 0; } else { for (i=0; i<3; ++i) datainit2(data, index+i, depth+1, terms); } } */ static void datainit( u8 *data, u4 terms) { u4 i; for (i=0; i<(1<<(LOGBUCKETS*terms)); ++i) data[i] = 0; } /* gather statistics on len overlapping subsequences of "terms" values each */ static void gather( ranctx *r, u8 *data, u8 len, u4 terms) { u8 i; u4 val = 0; u4 mask = (1<<(LOGBUCKETS*terms))-1; for (i=0; i>= LOGBUCKETS; } /* calculate the variance for this bucket */ if (expect < 5.0) { expectother += expect; countother += data[i]; } else { ++buckets; temp = (double)data[i] - expect; temp = temp*temp/expect; if (temp > 20.0) { k = i; for (j=0; j>= LOGBUCKETS; } printf("%14.4f %14.4f %14.4f\n", (float)temp,(float)expect,(float)data[i]); } var += temp; } } /* lump all the others into one bucket */ if (expectother > 5.0) { ++buckets; temp = (double)countother - expectother; temp = temp*temp/expectother; if (temp > 20.0) { printf("other %14.4f %14.4f %14.4f\n", (float)temp,(float)expectother,(float)countother); } var += temp; } --buckets; /* calculate the total variance and chi-square measure */ printf("expected variance: %11.4f got: %11.4f chi-square: %6.4f\n", (float)buckets, (float)var, (float)((var-buckets)/sqrt((float)buckets))); } int main_countx( int argc, char **argv) { u8 len; u8 *data; u4 i, loglen, terms; ranctx r; time_t a,z; time(&a); if (argc == 3) { sscanf(argv[1], "%lu", &loglen); printf("sequence length: 2^^%lu\n", loglen); len = (((u8)1)< BUCKETS) { fprintf(stderr, "ftab[%lu]=%lu needs a bigger LOGBUCKETS\n", i, ftab[i]); return 1; } } datainit(data, terms); raninit(&r, 0); gather(&r, data, len, terms); chi(data, len, terms); free(data); time(&z); printf("number of seconds: %6lu\n", (size_t)(z-a)); return 0; } ./libdieharder/libdieharder.30000664000175000017500000001554013707046103014415 0ustar eddedd.\" Copyright (c) 1999 Andries Brouwer (aeb@cwi.nl) .\" .\" This is free documentation; 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. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual 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 manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .TH libdieharder 3 "Copyright 2006 Robert G. Brown" "libdieharder" .SH NAME libdieharder \- A testing and benchmarking library for random number generators .SH SYNOPSIS .B #include "dieharder.h" .sp .B void run_user_template() .br .B { .B "Test **user_template_test;" .br .B "/*" .br .B " * Create the test" .br .B " */" .br .B "user_template_test = create_test(&user_template_dtest,tsamples,psamples,&user_template);" .sp .B "/*" .br .B " * Set any GLOBAL data used by the test." .br .B " */" .br .B "user_template_lag = (int)x_user;" .sp .B "/*" .br .B " * Show the standard test header" .br .B " */" .br .B "show_test_header(&user_template_dtest,user_template_test);" .sp .B "/*" .br .B " * Call the test" .br .B " */" .br .B "std_test(&user_template_dtest,user_template_test);" .sp .B "/*" .br .B " * This almost certainly belongs in the show_test_results section," .br .B " * possibly with additional conditionals rejecting test results involving" .br .B " * rewinds, period." .br .B " */" .br .B "if(strncmp(\"file_input\",gsl_rng_name(rng),10) == 0){" .br .B " printf("# %u rands were used in this test\n",file_input_get_rtot(rng));" .br .B " printf("# The file %s was rewound %u times\n",gsl_rng_name(rng),file_input_get_rewind_cnt(rng));" .br .B "}" .sp .B "/*" .br .B " * Show standard test results" .br .B " */". .br .B "show_test_results(&user_template_dtest,user_template_test);" .sp .B "}" .SH DESCRIPTION .B libdieharder The libdieharder library provides an API to user interface programs wishing to call dieharder tests. Commands are defined for creating tests, initializing the tests and running the tests. Showing the results is of course the responsibility of the UI. libdieharder also wraps certain additional random number generators so that they can be tested. libdieharder can be default test all the random number generators in the Gnu Scientific Library plus these additional generators (which include "generators" for reading in numbers from a file). libdieharder is extensible. It is fairly easy to add additional test "objects" or random number generators using existing sources as templates. The API will be documented in more detail as the project approaches completion. In the meantime, it is strongly recommended that users wishing to call the library use the source of the dieharder tty UI as a template and list of all currently supported objects, as this is the primary libdieharder debugging vehicle in addition to being the current "standard" application of the library. .SH PUBLICATION RULES .B libdieharder is entirely original code and can be modified and used at will by any user, provided that: a) The original copyright notices are maintained and that the source, including all modifications, is made publically available at the time of any derived publication. This is open source software according to the precepts and spirit of the Gnu Public License. See the accompanying file COPYING, which also must accompany any redistribution. b) The author of the code (Robert G. Brown) is appropriately acknowledged and referenced in any derived publication. It is strongly suggested that George Marsaglia and the Diehard suite and the various authors of the Statistical Test Suite be similarly acknowledged, although this suite shares no actual code with these random number test suites. c) Full responsibility for the accuracy, suitability, and effectiveness of the program rests with the users and/or modifiers. As is clearly stated in the accompanying copyright.h: THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .SH ACKNOWLEDGEMENTS The author of this suite gratefully acknowledges George Marsaglia (the author of the diehard test suite) and the various authors of NIST Special Publication 800-22 (which describes the Statistical Test Suite for testing pseudorandom number generators for cryptographic applications), for excellent descriptions of the tests therein. These descriptions enabled this suite to be developed with a clean copyright, licensable under the GPL. The author also wishes to reiterate that the academic correctness and accuracy of the implementation of these tests is his sole responsibility and not that of the authors of the Diehard or STS suites. This is especially true where he has seen fit to modify those tests from their strict original descriptions. .SH COPYRIGHT GPL 2b; see the file COPYING that accompanies the source of this program. This is the "standard Gnu General Public License version 2 or any later version", with the one minor (humorous) "Beverage" modification listed below. Note that this modification is probably not legally defensible and can be followed really pretty much according to the honor rule. As to my personal preferences in beverages, red wine is great, beer is delightful, and Coca Cola or coffee or tea or even milk acceptable to those who for religious or personal reasons wish to avoid stressing my liver. .B The "Beverage" Modification to the GPL: Any satisfied user of this software shall, upon meeting the primary author(s) of this software for the first time under the appropriate circumstances, offer to buy him or her or them a beverage. This beverage may or may not be alcoholic, depending on the personal ethical and moral views of the offerer. The beverage cost need not exceed one U.S. dollar (although it certainly may at the whim of the offerer:-) and may be accepted or declined with no further obligation on the part of the offerer. It is not necessary to repeat the offer after the first meeting, but it can't hurt... ./libdieharder/diehard_oqso.c0000664000175000017500000001017413707046103014516 0ustar eddedd/* * ======================================================================== * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This is the Diehard QPSO test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * OQSO means Overlapping-Quadruples-Sparse-Occupancy :: * The test OQSO is similar, except that it considers 4-letter :: * words from an alphabet of 32 letters, each letter determined :: * by a designated string of 5 consecutive bits from the test :: * file, elements of which are assumed 32-bit random integers. :: * The mean number of missing words in a sequence of 2^21 four- :: * letter words, (2^21+3 "keystrokes"), is again 141909, with :: * sigma = 295. The mean is based on theory; sigma comes from :: * extensive simulation. :: * * Note: 2^21 = 2097152 * Note: One must use overlapping samples to get the right sigma. * The tests BITSTREAM, OPSO, OQSO and DNA are all closely related. * * This test is now CORRECTED on the basis of a private communication * from Paul Leopardi (MCQMC-2008 presentation) and Noonan and Zeilberger * (1999), Rivals and Rahmann (2003), and Rahmann and Rivals (2003). * The "exact" target statistic (to many places) is: * \mu = 141909.6005321316, \sigma = 294.6558723658 * ======================================================================== */ #include int diehard_oqso(Test **test, int irun) { uint i,j,k,l,i0=0,j0=0,k0=0,l0=0,t,boffset=0; Xtest ptest; char w[32][32][32][32]; /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * p = 141909, with sigma 295, FOR tsamples 2^21 2 letter words. * These cannot be varied unless one figures out the actual * expected "missing works" count as a function of sample size. SO: * * ptest.x = number of "missing words" given 2^21 trials * ptest.y = 141909.6005321316 * ptest.sigma = 294.6558723658 */ ptest.x = 0.0; /* Initial value */ ptest.y = 141909.6005321316; ptest.sigma = 294.6558723658; /* * We now make tsamples measurements, as usual, to generate the * missing statistic. We proceed exactly as we did in opso, but * with a 4d 32x32x32x32 matrix and 5 bit indices. This should * basically be strongly related to a Knuth hyperplane test in * four dimensions. Equally obviously there is a sequence of * tests, all basically identical, that can be done here much * as rgb_bitdist tries to do them. I'll postpone thinking about * this in detail until I'm done with diehard and some more of STS * and maybe have implemented the REAL Knuth tests from the Art of * Programming. */ memset(w,0,sizeof(char)*32*32*32*32); /* * To minimize the number of rng calls, we use each j and k mod 32 * to determine the offset of the 10-bit long string (with * periodic wraparound) to be used for the next iteration. We * therefore have to "seed" the process with a random l */ for(t=0;ttsamples;t++){ if(t%6 == 0) { i0 = gsl_rng_get(rng); j0 = gsl_rng_get(rng); k0 = gsl_rng_get(rng); l0 = gsl_rng_get(rng); boffset = 0; } /* * Get four "letters" (indices into w) */ i = (i0 >> boffset) & 0x01f; j = (j0 >> boffset) & 0x01f; k = (k0 >> boffset) & 0x01f; l = (l0 >> boffset) & 0x01f; w[i][j][k][l]=1; boffset+=5; } /* * Now we count the holes, so to speak */ t = 0; for(i=0;i<32;i++){ for(j=0;j<32;j++){ for(k=0;k<32;k++){ for(l=0;l<32;l++){ if(w[i][j][k][l] == 0){ t++; /* printf("ptest.x = %f Hole: w[%u][%u][%u][%u] = %u\n",t,i,j,k,l,w[i][j][k][l]); */ } } } } } ptest.x = t; MYDEBUG(D_DIEHARD_OQSO){ printf("%f %f %f\n",ptest.y,ptest.x,ptest.x-ptest.y); } Xtest_eval(&ptest); test[0]->pvalues[irun] = ptest.pvalue; MYDEBUG(D_DIEHARD_OQSO) { printf("# diehard_oqso(): ks_pvalue[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } return(0); } ./libdieharder/Vtest.c0000664000175000017500000001601213707046103013157 0ustar eddedd/* *======================================================================== * $Id: Vtest.c 223 2006-08-17 06:19:38Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * Vtest.c contains a set of routines for evaluating a p-value, the * probability that a given test result was obtained IF the underlying * random number generator was a "good" one (the null hypothesis), given a * vector x of observed results and a vector y of expected results. It * determines the p-value using Pearson's chisq, which does not require * the independent input of the expected sigma for each "bin" (vector * position). *======================================================================== */ #include void Vtest_create(Vtest *vtest, unsigned int nvec) { int i; MYDEBUG(D_VTEST){ printf("#==================================================================\n"); printf("# Vtest_create(): Creating test struct for %u nvec.\n",nvec); } vtest->x = (double *) malloc(sizeof(double)*nvec); /* sample results */ vtest->y = (double *) malloc(sizeof(double)*nvec); /* expected sample results */ /* zero or set everything */ for(i=0;ix[i] = 0.0; vtest->y[i] = 0.0; } vtest->nvec = nvec; vtest->ndof = 0; /* The user must enter this, or it will try to compute it */ vtest->chisq = 0.0; vtest->pvalue = 0.0; vtest->cutoff = 5; MYDEBUG(D_VTEST){ printf("# Vtest_create(): Done.\n"); } } void Vtest_destroy(Vtest *vtest) { free(vtest->x); free(vtest->y); } void Vtest_eval(Vtest *vtest) { uint i,ndof,itail; double delchisq,chisq; double x_tot,y_tot; /* * This routine evaluates chi-squared, where: * vtest->x is the trial vector * vtest->y is the exact vector * vtest->sigma is the vector of expected error for y * (for the exact/true distribution) * vtest->nvec is the vector length(s). * vtest->ndof is the number of degrees of freedom (default nvec-1) * vtest->cutoff is the minimum expected count for a cell to be * included in the chisq sum (it should be at least 5, in general, * probably higher in some cases). * * x, y, sigma, nvec all must be filled in my the calling routine. * Be sure to override the default value of ndof if it is known to * the caller. * * Note well that chisq is KNOWN to do poorly -- sometimes very * poorly -- if ndof=1 (two mutually exclusive and exhaustive parameters, * e.g. a normal approximation to the binomial) or if y (the expected * value) for any given cell is less than a cutoff usually set to around * 5. This test will therefore routinely bundle all cells with expected * returns less than the user-defined cutoff AUTOMATICALLY into a single * cell (itail) and use the total number of cells EXCLUSIVE of this * "garbage" cell as the number of degrees of freedom unless ndof is * overridden. */ /* verbose=1; */ MYDEBUG(D_VTEST){ printf("Evaluating chisq and pvalue for %d points\n",vtest->nvec); printf("Using a cutoff of %f\n",vtest->cutoff); } chisq = 0.0; x_tot = 0.0; y_tot = 0.0; ndof = 0; itail = -1; MYDEBUG(D_VTEST){ printf("# %7s %3s %3s %10s %10s %10s %9s\n", "bit/bin","DoF","X","Y","sigma","del-chisq","chisq"); printf("#==================================================================\n"); } /* * If vtest->ndof is nonzero, we use it to compute chisq. If not, we try * to estimate it based on a vtest->cutoff that can be set by the caller. * If vtest->ndof is set, the cutoff should probably not be. */ for (i=0;invec;i++) { if(vtest->y[i] >= vtest->cutoff) { x_tot += vtest->x[i]; y_tot += vtest->y[i]; delchisq = (vtest->x[i] - vtest->y[i])*(vtest->x[i] - vtest->y[i])/vtest->y[i]; /* Alternative way of evaluating chisq for binomial only. delchisq = (vtest->x[i] - vtest->y[i])/vtest->sigma[i]; delchisq *= delchisq; */ chisq += delchisq; MYDEBUG(D_VTEST){ printf("# %5u\t%3u\t%12.4f\t%12.4f\t%8.4f\t%10.4f\n", i,vtest->ndof,vtest->x[i],vtest->y[i],delchisq,chisq); } /* increment only if the data is substantial */ if(vtest->ndof == 0) ndof++; } else { if(itail == -1){ itail = i; /* Do nothing; just remember the index */ MYDEBUG(D_VTEST){ printf(" Saving itail = %u because vtest->x[i] = %f <= %f\n",itail,vtest->x[i],vtest->cutoff); } } else { /* * Accumulate all the tail expectation here. */ vtest->y[itail] += vtest->y[i]; vtest->x[itail] += vtest->x[i]; } } } /* * At the end, ALL the counts that are statistically weak should sum into * a statistically significant tail count, but the tail count still has * to make the cutoff! Sometimes it won't! Note that the toplevel * conditional guards against itail still being -1 because Vtest did nothing * in its last pass through the code above. */ if(itail != -1){ if(vtest->y[itail] >= vtest->cutoff){ delchisq = (vtest->x[itail] - vtest->y[itail])* (vtest->x[itail] - vtest->y[itail])/vtest->y[itail]; chisq += delchisq; /* increment only if the data is substantial */ if(vtest->ndof == 0) ndof++; MYDEBUG(D_VTEST){ printf("# %5u\t%3u\t%12.4f\t%12.4f\t%8.4f\t%10.4f\n", itail,vtest->ndof,vtest->x[itail],vtest->y[itail],delchisq,chisq); } } } /* * Interestingly, one simply cannot make the tail "work" as a * contribution to the ndof. The number of degrees of freedom is one * less than the number that make the cutoff, although it does seem * useful to add the last chunk from the tail before doing the * computation of the chisq p-value. */ if(vtest->ndof == 0){ vtest->ndof = ndof-1; /* * David Bauer: TODO BUG?? The returned ndof is correct, but the * wrong value is used. * * RGB comment: Really, if ndof = 0, the test fails, does it not? * How can you fit a curve with no degrees of freedom. Perhaps * an error and exit, or some other signal of failure? (This should * almost never happen...) */ } MYDEBUG(D_VTEST){ printf("Total: %10.4f %10.4f\n",x_tot,y_tot); printf("#==================================================================\n"); printf("Evaluated chisq = %f for %u degrees of freedom\n",chisq,vtest->ndof); } vtest->chisq = chisq; /* * Now evaluate the corresponding pvalue. The only real question * is what is the correct number of degrees of freedom. I'd argue we * did use a constraint when we set expected = binomial*nsamp, so we'll * go for ndof (count of nvec tallied) - 1. */ vtest->pvalue = gsl_sf_gamma_inc_Q((double)(vtest->ndof)/2.0,chisq/2.0); /* printf("Evaluted pvalue = %6.4f in Vtest_eval() with %u ndof.\n",vtest->pvalue,vtest->ndof); */ MYDEBUG(D_VTEST){ printf("Evaluted pvalue = %6.4f in Vtest_eval().\n",vtest->pvalue); } /* verbose=0; */ } ./libdieharder/rgb_timing.c0000664000175000017500000000246013707046103014175 0ustar eddedd/* * $id: rgb_timing.c 142 2005-03-11 02:56:31Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is not a standard test -- this just times the rng. It therefore * has a very nonstandard initialization and return. One can still create * the test, but the **test struct is used only to determine the number * of samples used in the timing test. *======================================================================== */ #include int rgb_timing(Test **test, Rgb_Timing *timing) { double total_time,avg_time; int i,j; unsigned int *rand_uint; MYDEBUG(D_RGB_TIMING){ printf("# Entering rgb_timing(): ps = %u ts = %u\n",test[0]->psamples,test[0]->tsamples); } seed = random_seed(); gsl_rng_set(rng,seed); rand_uint = (uint *)malloc((size_t)test[0]->tsamples*sizeof(uint)); total_time = 0.0; for(i=0;ipsamples;i++){ start_timing(); for(j=0;jtsamples;j++){ rand_uint[j] = gsl_rng_get(rng); } stop_timing(); total_time += delta_timing(); } avg_time = total_time/(test[0]->psamples*test[0]->tsamples); timing->avg_time_nsec = avg_time*1.0e+9; timing->rands_per_sec = 1.0/avg_time; free(rand_uint); return(0); } ./libdieharder/dieharder_rng_types.c0000664000175000017500000001154413707046103016100 0ustar eddedd/* * This is a hack of the GSL's rng/types.c: * * Copyright (C) 2001 Brian Gough * * 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. * ******************************************************************* * This is being directly adapted from and modified for use in dieharder * so it can maintain its own independent RNG space of types not limited * by its internal limit of 100. To avoid collisions, we'll start our number * space above 100, and extend it to 1000. * * While we're at it, let's define the ranges: * * 0-199 gsl generators (fixed order from now on with room for growth) * 200-399 libdieharder generators (fixed order from now on) * 400-499 R-based generators (fixed order from now on) * 500-599 hardware generators (e.g. /dev/random and friends) * 600-699 user-defined generators (starting with dieharder example) * 700-999 reserved for future integration with R-like environments * * Naturally, we can simply bump MAXRNGS and add more, but 1000 seems * likely to last for "a while" and maybe "forever". */ #include FILE *test_fp; void dieharder_rng_types() { int i; /* * Null the whole thing for starters */ for(i=0;i=48 :: * are used to provide a chi-square test for cell frequencies. :: * * Comment on SQUEEZE * This adaptation fixes a number of screwy fortranisms in the * original code. First of all, the actual bin probabilities were * presented scaled up by 10^6 (suitable for 10^6 trials). Then * they were multipled by 0.1. Finally the test was run for 10^5 * trials. Now we just input the vector of actual bin probabilities * as doubles (naturally) and scale the probabilities by tsamples. * This yields the expected bin frequencies much more simply and * in a way that permits tsamples to be varied. * * Honestly, from my limited experimentation, this test is uselessly * insensitive on at least the rng's in the GSL with a few notable * exceptions (the worst of the worst). It passes a number of * generators with known, serious flaws though. Not that a lot of * tests in diehard ARE terribly good at picking out particular * flaws in particular generators -- they're struggling to identify * bad generators at all. Sorry, but that's just the way I see it. *======================================================================== */ #include static double sdata[]={ 0.00002103, 0.00005779, 0.00017554, 0.00046732, 0.00110783, 0.00236784, 0.00460944, 0.00824116, 0.01362781, 0.02096849, 0.03017612, 0.04080197, 0.05204203, 0.06283828, 0.07205637, 0.07869451, 0.08206755, 0.08191935, 0.07844008, 0.07219412, 0.06398679, 0.05470931, 0.04519852, 0.03613661, 0.02800028, 0.02105567, 0.01538652, 0.01094020, 0.00757796, 0.00511956, 0.00337726, 0.00217787, 0.00137439, 0.00084970, 0.00051518, 0.00030666, 0.00017939, 0.00010324, 0.00005851, 0.00003269, 0.00001803, 0.00000982, 0.00001121 }; int diehard_squeeze(Test **test, int irun) { int i,j,k; Vtest vtest; /* * Squeeze counts the iterations required to reduce 2^31 to * to 1 with k = ceiling(k*U) where U is a uniform deviate. It * does this test[0]->tsamples times, binning the result in a vector from * <= 6 to >= 48 (where it has nontrivial support). A chisq test * on the vector (Vtest) then yields a pvalue for the test run. */ /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * Allocate memory for Vtest struct vector (length 51) and initialize * it with the expected values. */ Vtest_create(&vtest,43); /* * Initialize the expected value vector */ vtest.cutoff = 5.0; for(i=0;i<43;i++){ vtest.y[i] = test[0]->tsamples*sdata[i]; } memset(vtest.x,0,43*sizeof(double)); /* * Test this. */ MYDEBUG(D_DIEHARD_SQUEEZE) { for(i=0;i<43;i++){ printf("%d: %f %f\n",i+6,vtest.x[i],vtest.y[i]); } } /* * We now squeeze test[0]->tsamples times. */ for(i=0;itsamples;i++){ k = 2147483647; j = 0; /* printf("%d: %d\n",j,k); */ while((k != 1) && (j < 48)){ k = ceil(k*gsl_rng_uniform(rng)); j++; /* printf("%d: %d\n",j,k); */ } /* * keep j in range 6-48 inclusive and increment the test/counting vector. */ j = (j<6)?6:j; vtest.x[j-6]++; } MYDEBUG(D_DIEHARD_SQUEEZE) { for(i=0;i<43;i++){ printf("%d: %f %f\n",i+6,vtest.x[i],vtest.y[i]); } } Vtest_eval(&vtest); test[0]->pvalues[irun] = vtest.pvalue; MYDEBUG(D_DIEHARD_SQUEEZE) { printf("# diehard_squeeze(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } Vtest_destroy(&vtest); return(0); } ./libdieharder/COPYING0000664000175000017500000004547013707046103012753 0ustar eddedd$Id: COPYING 221 2006-08-16 22:43:03Z rgb $ License is granted to build or use the accompanying software: libdieharder according to the following standard Gnu General Public License or any later versions, with the one minor "Beverage" modification listed below. Note that this modification is probably not legally defensible and can be followed really pretty much according to the honor rule. As to my personal preferences in beverages, red wine is great, beer is delightful, and Coca Cola or coffee or tea or even milk acceptable to those who for religious or personal reasons wish to avoid stressing my liver. The "Beverage" Modification to the GPL Any user of this software shall, upon meeting the primary author(s) of this software for the first time under the appropriate circumstances, offer to buy him or her or them a beverage. This beverage may or may not be alcoholic, depending on the personal ethical and moral views of the offerer. The beverage cost need not exceed one U.S. dollar (although it certainly may at the whim of the offerer:-) and may be accepted or declined with no further obligation on the part of the offerer. It is not necessary to repeat the offer after the first meeting, but it can't hurt... GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, 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 Appendix: 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) 19yy 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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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. ./libdieharder/skein_block_ref.c0000664000175000017500000001202713707046103015173 0ustar eddedd/*********************************************************************** ** ** Implementation of the Skein block functions. ** ** Source code author: Doug Whiting, 2008. ** ** This algorithm and source code is released to the public domain. ** ** Compile-time switches: ** ** SKEIN_USE_ASM -- set bits (256/512/1024) to select which ** versions use ASM code for block processing ** [default: use C for all block sizes] ** ************************************************************************/ #include #include #include /* 64-bit rotate left -- defined in skein_port.h as macro u64b_t RotL_64(u64b_t x,uint_t N) { return (x << (N & 63)) | (x >> ((64-N) & 63)); } */ #define BLK_BITS (WCNT*64) /* macro to perform a key injection (same for all block sizes) */ #define InjectKey(r) \ for (i=0;i < WCNT;i++) \ X[i] += ks[((r)+i) % (WCNT+1)]; \ X[WCNT-3] += ts[((r)+0) % 3]; \ X[WCNT-2] += ts[((r)+1) % 3]; \ X[WCNT-1] += (r); /* avoid slide attacks */ \ void Threefish_512_Process_Blocks(Threefish_512_Ctxt_t *ctx, const u08b_t *input, void *output, size_t blkCnt) { enum { WCNT = SKEIN_512_STATE_WORDS }; size_t i,r; u64b_t ts[3]; /* key schedule: tweak */ u64b_t ks[WCNT+1]; /* key schedule: chaining vars */ u64b_t *X = (void *) output ; /* local copy of vars */ u64b_t w [WCNT]; /* local copy of input block */ Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */ /* precompute the key schedule for this block */ ks[WCNT] = SKEIN_KS_PARITY; for (i=0;i < WCNT; i++) { ks[i] = ctx->Key[i]; ks[WCNT] ^= ctx->Key[i]; /* compute overall parity */ } ts[0] = ctx->T[0]; /* Tweak words */ ts[1] = ctx->T[1]; ts[2] = ts[0] ^ ts[1]; do { Skein_Get64_LSB_First(w,input,WCNT); /* get input block in little-endian format */ for (i=0;i < WCNT; i++) { /* do the first full key injection */ X[i] = w[i] + ks[i]; } X[WCNT-3] += ts[0]; X[WCNT-2] += ts[1]; for (r=1;r <= SKEIN_512_ROUNDS_TOTAL/8; r++) { /* unroll 8 rounds */ X[0] += X[1]; X[1] = RotL_64(X[1],R_512_0_0); X[1] ^= X[0]; X[2] += X[3]; X[3] = RotL_64(X[3],R_512_0_1); X[3] ^= X[2]; X[4] += X[5]; X[5] = RotL_64(X[5],R_512_0_2); X[5] ^= X[4]; X[6] += X[7]; X[7] = RotL_64(X[7],R_512_0_3); X[7] ^= X[6]; X[2] += X[1]; X[1] = RotL_64(X[1],R_512_1_0); X[1] ^= X[2]; X[4] += X[7]; X[7] = RotL_64(X[7],R_512_1_1); X[7] ^= X[4]; X[6] += X[5]; X[5] = RotL_64(X[5],R_512_1_2); X[5] ^= X[6]; X[0] += X[3]; X[3] = RotL_64(X[3],R_512_1_3); X[3] ^= X[0]; X[4] += X[1]; X[1] = RotL_64(X[1],R_512_2_0); X[1] ^= X[4]; X[6] += X[3]; X[3] = RotL_64(X[3],R_512_2_1); X[3] ^= X[6]; X[0] += X[5]; X[5] = RotL_64(X[5],R_512_2_2); X[5] ^= X[0]; X[2] += X[7]; X[7] = RotL_64(X[7],R_512_2_3); X[7] ^= X[2]; X[6] += X[1]; X[1] = RotL_64(X[1],R_512_3_0); X[1] ^= X[6]; X[0] += X[7]; X[7] = RotL_64(X[7],R_512_3_1); X[7] ^= X[0]; X[2] += X[5]; X[5] = RotL_64(X[5],R_512_3_2); X[5] ^= X[2]; X[4] += X[3]; X[3] = RotL_64(X[3],R_512_3_3); X[3] ^= X[4]; InjectKey(2*r-1); X[0] += X[1]; X[1] = RotL_64(X[1],R_512_4_0); X[1] ^= X[0]; X[2] += X[3]; X[3] = RotL_64(X[3],R_512_4_1); X[3] ^= X[2]; X[4] += X[5]; X[5] = RotL_64(X[5],R_512_4_2); X[5] ^= X[4]; X[6] += X[7]; X[7] = RotL_64(X[7],R_512_4_3); X[7] ^= X[6]; X[2] += X[1]; X[1] = RotL_64(X[1],R_512_5_0); X[1] ^= X[2]; X[4] += X[7]; X[7] = RotL_64(X[7],R_512_5_1); X[7] ^= X[4]; X[6] += X[5]; X[5] = RotL_64(X[5],R_512_5_2); X[5] ^= X[6]; X[0] += X[3]; X[3] = RotL_64(X[3],R_512_5_3); X[3] ^= X[0]; X[4] += X[1]; X[1] = RotL_64(X[1],R_512_6_0); X[1] ^= X[4]; X[6] += X[3]; X[3] = RotL_64(X[3],R_512_6_1); X[3] ^= X[6]; X[0] += X[5]; X[5] = RotL_64(X[5],R_512_6_2); X[5] ^= X[0]; X[2] += X[7]; X[7] = RotL_64(X[7],R_512_6_3); X[7] ^= X[2]; X[6] += X[1]; X[1] = RotL_64(X[1],R_512_7_0); X[1] ^= X[6]; X[0] += X[7]; X[7] = RotL_64(X[7],R_512_7_1); X[7] ^= X[0]; X[2] += X[5]; X[5] = RotL_64(X[5],R_512_7_2); X[5] ^= X[2]; X[4] += X[3]; X[3] = RotL_64(X[3],R_512_7_3); X[3] ^= X[4]; InjectKey(2*r); } /* DON'T do the final "feedforward" xor, update context chaining vars */ // for (i=0;i < WCNT;i++) // ctx->X[i] = X[i] ^ w[i]; // Skein_Clear_First_Flag(ctx->h); /* clear the start bit */ input += SKEIN_512_BLOCK_BYTES; X += WCNT; } while (--blkCnt); } typedef unsigned long long uint64; #if 0 uint64 timingAdjust = 200; uint64 time() { volatile uint64 temp = 4; __asm__ __volatile__ ( "cpuid\n\t" "rdtsc\n\t" "leaq %0, %%rcx\n\t" "movl %%eax, (%%rcx)\n\t" "movl %%edx, 4(%%rcx)\n\t" : : "m" (temp) : "%eax", "%ebx", "%rcx", "%edx"); return temp - timingAdjust; } #endif ./libdieharder/rngs_gnu_r.c0000664000175000017500000006323313707046103014224 0ustar eddedd/* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (C) 1997--2007 The R Development Core Team * * Copyright (C) 2006 - 2011 Dirk Eddelbuettel (dieharder adaptation) * * * 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, a copy is available at * http://www.r-project.org/Licenses/ */ /* * A few defines to select 'dieharder' mode (which is what we use here and * 'GNU_R_MODE' (which is how we 'turn off' the features used by R but not * here. */ #ifndef DIEHARDER #define DIEHARDER #ifdef GNU_R_MODE #undef GNU_R_MODE #endif #endif #ifdef DIEHARDER #include /* we need M here for the MT, but dieharder also defines it */ #ifdef M #undef M #endif /* define our function prototypes */ /* two generic 'getters' used by all GNU R RNGs */ static unsigned long int r_rng_get (void *vstate); static double r_rng_get_double (void *vstate); /* RNG-specific 'setters' for each GNU R RNG */ static void r_wichmann_hill_set (void *vstate, unsigned long int s); static void r_marsaglia_mc_set (void *vstate, unsigned long int s); static void r_super_duper_set (void *vstate, unsigned long int s); static void r_mersenne_twister_set (void *vstate, unsigned long int s); static void r_knuth_taocp_set (void *vstate, unsigned long int s); static void r_knuth_taocp2_set (void *vstate, unsigned long int s); typedef unsigned int Int32; /* in Random.h */ typedef void * (*DL_FUNC)(); /* * The question is, will the patch below break the Debian * build process? Had better test it as best I can in my Debian VM. void error(const char *txt, ...); char *_(char *txt) { return(txt); }; */ void dieharder_error(const char *format, ...) { va_list ap; va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); } #define error dieharder_error #define _(x) x /* UINT_MAX from limits.h */ #define RANDNUM_MAX UINT_MAX /* from R_ext/Random.h */ typedef enum { WICHMANN_HILL, MARSAGLIA_MULTICARRY, SUPER_DUPER, MERSENNE_TWISTER, KNUTH_TAOCP, USER_UNIF, KNUTH_TAOCP2 } RNGtype; /* Different kinds of "N(0,1)" generators :*/ typedef enum { BUGGY_KINDERMAN_RAMAGE, AHRENS_DIETER, BOX_MULLER, USER_NORM, INVERSION, KINDERMAN_RAMAGE } N01type; #endif #ifdef GNU_R_MODE /* char here is handled as a whole string */ #ifdef HAVE_CONFIG_H #include #include "Defn.h" #include #endif #endif /* Normal generator is not actually set here but in nmath/snorm.c */ #define RNG_DEFAULT MERSENNE_TWISTER #define N01_DEFAULT INVERSION #ifdef GNU_R_MODE #include static DL_FUNC User_unif_fun, User_unif_init, User_unif_nseed, User_unif_seedloc; DL_FUNC User_norm_fun; /* also in ../nmath/snorm.c */ #endif static RNGtype RNG_kind = RNG_DEFAULT; extern N01type N01_kind; /* from ../nmath/snorm.c */ /* typedef unsigned int Int32; in Random.h */ /* .Random.seed == (RNGkind, i_seed[0],i_seed[1],..,i_seed[n_seed-1]) * or == (RNGkind) or missing [--> Randomize] */ typedef struct { RNGtype kind; N01type Nkind; char *name; /* print name */ int n_seed; /* length of seed vector */ Int32 *i_seed; } RNGTAB; #ifdef DIEHARDER typedef RNGTAB r_rng_tab_t; #define TAOCP_MAX 0x3fffffffUL /* cf GSL sources */ #define TAOCP2_MAX (1L<<30)-1L /* cf GSL sources */ #endif static Int32 dummyvec[625]; /* s/dummy/dummyvec/ */ static RNGTAB RNG_Table[] = { /* kind Nkind name n_seed i_seed */ { 0, 0, "Wichmann-Hill", 3, dummyvec}, { 1, 0, "Marsaglia-MultiCarry", 2, dummyvec}, { 2, 0, "Super-Duper", 2, dummyvec}, { 3, 0, "Mersenne-Twister", 1+624, dummyvec}, { 4, 0, "Knuth-TAOCP", 1+100, dummyvec}, { 5, 0, "User-supplied", 0, dummyvec}, { 6, 0, "Knuth-TAOCP-2002", 1+100, dummyvec}, }; #define d2_32 4294967296./* = (double) */ #define i2_32m1 2.328306437080797e-10/* = 1/(2^32 - 1) */ #define KT 9.31322574615479e-10 /* = 2^-30 */ #define I1 (RNG_Table[RNG_kind].i_seed[0]) #define I2 (RNG_Table[RNG_kind].i_seed[1]) #define I3 (RNG_Table[RNG_kind].i_seed[2]) static void Randomize(RNGtype kind); static double MT_genrand(void); static Int32 KT_next(void); static void RNG_Init_R_KT(Int32); static void RNG_Init_KT2(Int32); #define KT_pos (RNG_Table[KNUTH_TAOCP].i_seed[100]) static double fixup(double x) { /* ensure 0 and 1 are never returned */ if(x <= 0.0) return 0.5*i2_32m1; if((1.0 - x) <= 0.0) return 1.0 - 0.5*i2_32m1; return x; } double unif_rand(void) { double value; switch(RNG_kind) { case WICHMANN_HILL: I1 = I1 * 171 % 30269; I2 = I2 * 172 % 30307; I3 = I3 * 170 % 30323; value = I1 / 30269.0 + I2 / 30307.0 + I3 / 30323.0; return fixup(value - (int) value);/* in [0,1) */ case MARSAGLIA_MULTICARRY:/* 0177777(octal) == 65535(decimal)*/ I1= 36969*(I1 & 0177777) + (I1>>16); I2= 18000*(I2 & 0177777) + (I2>>16); return fixup(((I1 << 16)^(I2 & 0177777)) * i2_32m1); /* in [0,1) */ case SUPER_DUPER: /* This is Reeds et al (1984) implementation; * modified using __unsigned__ seeds instead of signed ones */ I1 ^= ((I1 >> 15) & 0377777); /* Tausworthe */ I1 ^= I1 << 17; I2 *= 69069; /* Congruential */ return fixup((I1^I2) * i2_32m1); /* in [0,1) */ case MERSENNE_TWISTER: return fixup(MT_genrand()); case KNUTH_TAOCP: case KNUTH_TAOCP2: return fixup(KT_next() * KT); #if GNU_R_MODE case USER_UNIF: return *((double *) User_unif_fun()); #endif default: error(_("unif_rand: unimplemented RNG kind %d"), RNG_kind); return -1.; } } /* we must mask global variable here, as I1-I3 hide RNG_kind and we want the argument */ static void FixupSeeds(RNGtype RNG_kind, int initial) { /* Depending on RNG, set 0 values to non-0, etc. */ int j, notallzero = 0; /* Set 0 to 1 : for(j = 0; j <= RNG_Table[RNG_kind].n_seed - 1; j++) if(!RNG_Table[RNG_kind].i_seed[j]) RNG_Table[RNG_kind].i_seed[j]++; */ switch(RNG_kind) { case WICHMANN_HILL: I1 = I1 % 30269; I2 = I2 % 30307; I3 = I3 % 30323; /* map values equal to 0 mod modulus to 1. */ if(I1 == 0) I1 = 1; if(I2 == 0) I2 = 1; if(I3 == 0) I3 = 1; return; case SUPER_DUPER: if(I1 == 0) I1 = 1; /* I2 = Congruential: must be ODD */ I2 |= 1; break; case MARSAGLIA_MULTICARRY: if(I1 == 0) I1 = 1; if(I2 == 0) I2 = 1; break; case MERSENNE_TWISTER: if(initial) I1 = 624; /* No action unless user has corrupted .Random.seed */ if(I1 <= 0) I1 = 624; /* check for all zeroes */ for (j = 1; j <= 624; j++) if(RNG_Table[RNG_kind].i_seed[j] != 0) { notallzero = 1; break; } if(!notallzero) Randomize(RNG_kind); break; case KNUTH_TAOCP: case KNUTH_TAOCP2: if(KT_pos <= 0) KT_pos = 100; /* check for all zeroes */ for (j = 0; j < 100; j++) if(RNG_Table[RNG_kind].i_seed[j] != 0) { notallzero = 1; break; } if(!notallzero) Randomize(RNG_kind); break; case USER_UNIF: break; default: error(_("FixupSeeds: unimplemented RNG kind %d"), RNG_kind); } } #ifdef GNU_R_MODE extern double BM_norm_keep; /* ../nmath/snorm.c */ #endif static void RNG_Init(RNGtype kind, Int32 seed) { int j; #ifdef GNU_R_MODE BM_norm_keep = 0.0; /* zap Box-Muller history */ #endif /* Initial scrambling */ for(j = 0; j < 50; j++) seed = (69069 * seed + 1); switch(kind) { case WICHMANN_HILL: case MARSAGLIA_MULTICARRY: case SUPER_DUPER: case MERSENNE_TWISTER: /* i_seed[0] is mti, *but* this is needed for historical consistency */ for(j = 0; j < RNG_Table[kind].n_seed; j++) { seed = (69069 * seed + 1); RNG_Table[kind].i_seed[j] = seed; } FixupSeeds(kind, 1); break; case KNUTH_TAOCP: RNG_Init_R_KT(seed); break; case KNUTH_TAOCP2: RNG_Init_KT2(seed); break; case USER_UNIF: #if GNU_R_MODE User_unif_fun = R_FindSymbol("user_unif_rand", "", NULL); if (!User_unif_fun) error(_("'user_unif_rand' not in load table")); User_unif_init = R_FindSymbol("user_unif_init", "", NULL); if (User_unif_init) (void) User_unif_init(seed); User_unif_nseed = R_FindSymbol("user_unif_nseed", "", NULL); User_unif_seedloc = R_FindSymbol("user_unif_seedloc", "", NULL); if (User_unif_seedloc) { int ns = 0; if (!User_unif_nseed) { warning(_("cannot read seeds unless 'user_unif_nseed' is supplied")); break; } ns = *((int *) User_unif_nseed()); if (ns < 0 || ns > 625) { warning(_("seed length must be in 0...625; ignored")); break; } RNG_Table[kind].n_seed = ns; RNG_Table[kind].i_seed = (Int32 *) User_unif_seedloc(); } break; #endif default: error(_("RNG_Init: unimplemented RNG kind %d"), kind); } } #include static void Randomize(RNGtype kind) { /* Only called by GetRNGstate() when there's no .Random.seed */ RNG_Init(kind, (Int32) time(NULL)); } /* function needed by dieharder follow below */ #ifdef DIEHARDER /* ------------------------------------------------ GNU R generic getters */ static unsigned long int r_rng_get (void *vstate) { unsigned long int j = r_rng_get_double(vstate) * RANDNUM_MAX; return(j); } static double r_rng_get_double (void *vstate) { r_rng_tab_t *state = (r_rng_tab_t *) vstate; RNG_kind = state->kind; double u = unif_rand(); return(u); } /* -------------------------------------- GNU R generator 1: wichmann_hill */ static void r_wichmann_hill_set (void *vstate, unsigned long int s) { r_rng_tab_t *state = (r_rng_tab_t *) vstate; *state = RNG_Table[WICHMANN_HILL]; RNGtype kind = state->kind; Int32 seed = s; /* FIXME: casting down from long seed to unsigned int */ RNG_Init(kind, seed); return; } static const gsl_rng_type r_wichmann_hill_type = {"R_wichmann_hill", /* name */ RANDNUM_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (r_rng_tab_t), &r_wichmann_hill_set, &r_rng_get, &r_rng_get_double}; const gsl_rng_type *gsl_rng_r_wichmann_hill = &r_wichmann_hill_type; /* -------------------------------------- GNU R generator 2: marsaglia_mc */ static void r_marsaglia_mc_set (void *vstate, unsigned long int s) { r_rng_tab_t *state = (r_rng_tab_t *) vstate; *state = RNG_Table[MARSAGLIA_MULTICARRY]; RNGtype kind = state->kind; Int32 seed = s; /* FIXME: casting down from long seed to unsigned int */ RNG_Init(kind, seed); return; } static const gsl_rng_type r_marsaglia_mc_type = {"R_marsaglia_multic.", /* name */ RANDNUM_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (r_rng_tab_t), &r_marsaglia_mc_set, &r_rng_get, &r_rng_get_double}; const gsl_rng_type *gsl_rng_r_marsaglia_mc = &r_marsaglia_mc_type; /* -------------------------------------- GNU R generator 3: super_duper */ static void r_super_duper_set (void *vstate, unsigned long int s) { r_rng_tab_t *state = (r_rng_tab_t *) vstate; *state = RNG_Table[SUPER_DUPER]; RNGtype kind = state->kind; Int32 seed = s; /* FIXME: casting down from long seed to unsigned int */ RNG_Init(kind, seed); return; } static const gsl_rng_type r_super_duper_type = {"R_super_duper", /* name */ RANDNUM_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (r_rng_tab_t), &r_super_duper_set, &r_rng_get, &r_rng_get_double}; const gsl_rng_type *gsl_rng_r_super_duper = &r_super_duper_type; /* ------------------------------------- GNU R generator 4: mersenne_twister */ static void r_mersenne_twister_set (void *vstate, unsigned long int s) { r_rng_tab_t *state = (r_rng_tab_t *) vstate; *state = RNG_Table[MERSENNE_TWISTER]; RNGtype kind = state->kind; Int32 seed = s; /* FIXME: casting down from long seed to unsigned int */ RNG_Init(kind, seed); return; } static const gsl_rng_type r_mersenne_twister_type = {"R_mersenne_twister", /* name */ RANDNUM_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (r_rng_tab_t), &r_mersenne_twister_set, &r_rng_get, &r_rng_get_double}; const gsl_rng_type *gsl_rng_r_mersenne_twister = &r_mersenne_twister_type; /* ------------------------------------- GNU R generator 5: knuth_taocp */ static void r_knuth_taocp_set (void *vstate, unsigned long int s) { r_rng_tab_t *state = (r_rng_tab_t *) vstate; *state = RNG_Table[KNUTH_TAOCP]; RNGtype kind = state->kind; Int32 seed = s; /* FIXME: casting down from long seed to unsigned int */ RNG_Init(kind, seed); return; } static unsigned long int r_rng_get_taocp (void *vstate) { unsigned long int j = r_rng_get_double(vstate) * TAOCP_MAX; return(j); } static const gsl_rng_type r_knuth_taocp_type = {"R_knuth_taocp", /* name */ TAOCP_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (r_rng_tab_t), &r_knuth_taocp_set, &r_rng_get_taocp, &r_rng_get_double}; const gsl_rng_type *gsl_rng_r_knuth_taocp = &r_knuth_taocp_type; /* ------------------------------------- GNU R generator 6: knuth_taocp2 */ static void r_knuth_taocp2_set (void *vstate, unsigned long int s) { r_rng_tab_t *state = (r_rng_tab_t *) vstate; *state = RNG_Table[KNUTH_TAOCP2]; RNGtype kind = state->kind; Int32 seed = s; /* FIXME: casting down from long seed to unsigned int */ RNG_Init(kind, seed); return; } static unsigned long int r_rng_get_taocp2 (void *vstate) { unsigned long int j = r_rng_get_double(vstate) * TAOCP2_MAX; return(j); } static const gsl_rng_type r_knuth_taocp2_type = {"R_knuth_taocp2", /* name */ TAOCP2_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (r_rng_tab_t), &r_knuth_taocp2_set, &r_rng_get_taocp2, &r_rng_get_double}; const gsl_rng_type *gsl_rng_r_knuth_taocp2 = &r_knuth_taocp2_type; #endif /* R internal functions below before original implementations follow */ #if GNU_R_MODE void GetRNGstate() { /* Get .Random.seed into proper variables */ int len_seed, j, tmp; SEXP seeds; RNGtype newRNG; N01type newN01; /* look only in the workspace */ seeds = findVarInFrame(R_GlobalEnv, R_SeedsSymbol); if (seeds == R_UnboundValue) { Randomize(RNG_kind); } else { seeds = coerceVector(seeds, INTSXP); if (seeds == R_MissingArg) error(_(".Random.seed is a missing argument with no default")); if (!isVector(seeds)) error(_(".Random.seed is not a vector")); tmp = INTEGER(seeds)[0]; if (tmp == NA_INTEGER) error(_(".Random.seed[1] is not a valid integer")); newRNG = tmp % 100; newN01 = tmp / 100; /*if (RNG_kind > USER_UNIF || RNG_kind < 0) { warning(".Random.seed was invalid: re-initializing"); RNG_kind = RNG_DEFAULT; }*/ if (newN01 < 0 || newN01 > KINDERMAN_RAMAGE) error(_(".Random.seed[0] is not a valid Normal type")); switch(newRNG) { case WICHMANN_HILL: case MARSAGLIA_MULTICARRY: case SUPER_DUPER: case MERSENNE_TWISTER: case KNUTH_TAOCP: case KNUTH_TAOCP2: break; case USER_UNIF: if(!User_unif_fun) error(_(".Random.seed[1] = 5 but no user-supplied generator")); break; default: error(_(".Random.seed[1] is not a valid RNG kind (code)")); } RNG_kind = newRNG; N01_kind = newN01; len_seed = RNG_Table[RNG_kind].n_seed; /* Not sure whether this test is needed: wrong for USER_UNIF */ if(LENGTH(seeds) > 1 && LENGTH(seeds) < len_seed + 1) error(_(".Random.seed has wrong length")); if(LENGTH(seeds) == 1 && RNG_kind != USER_UNIF) Randomize(RNG_kind); else { for(j = 1; j <= len_seed; j++) { tmp = INTEGER(seeds)[j]; /* Some generators can generate NA_INTEGER as a valid integer value */ /* if(tmp == NA_INTEGER) error(".Random.seed[%d] is not a valid integer", j+1);*/ RNG_Table[RNG_kind].i_seed[j - 1] = tmp; } FixupSeeds(RNG_kind, 0); } } } void PutRNGstate() { /* Copy out seeds to .Random.seed */ int len_seed, j; SEXP seeds; if (RNG_kind < 0 || RNG_kind > KNUTH_TAOCP2 || N01_kind < 0 || N01_kind > KINDERMAN_RAMAGE) { warning("Internal .Random.seed is corrupt: not saving"); return; } len_seed = RNG_Table[RNG_kind].n_seed; PROTECT(seeds = allocVector(INTSXP, len_seed + 1)); INTEGER(seeds)[0] = RNG_kind + 100 * N01_kind; for(j = 0; j < len_seed; j++) INTEGER(seeds)[j+1] = RNG_Table[RNG_kind].i_seed[j]; /* assign only in the workspace */ defineVar(R_SeedsSymbol, seeds, R_GlobalEnv); UNPROTECT(1); } static void RNGkind(RNGtype newkind) { /* Choose a new kind of RNG. * Initialize its seed by calling the old RNG's unif_rand() */ if (newkind == -1) newkind = RNG_DEFAULT; switch(newkind) { case WICHMANN_HILL: case MARSAGLIA_MULTICARRY: case SUPER_DUPER: case MERSENNE_TWISTER: case KNUTH_TAOCP: case KNUTH_TAOCP2: case USER_UNIF: break; default: error(_("RNGkind: unimplemented RNG kind %d"), newkind); } GetRNGstate(); RNG_Init(newkind, unif_rand() * UINT_MAX); RNG_kind = newkind; PutRNGstate(); } static void Norm_kind(N01type kind) { if (kind == -1) kind = N01_DEFAULT; if (kind < 0 || kind > KINDERMAN_RAMAGE) error(_("invalid Normal type in RNGkind")); if (kind == USER_NORM) { User_norm_fun = R_FindSymbol("user_norm_rand", "", NULL); if (!User_norm_fun) error(_("'user_norm_rand' not in load table")); } GetRNGstate(); /* might not be initialized */ if (kind == BOX_MULLER) BM_norm_keep = 0.0; /* zap Box-Muller history */ N01_kind = kind; PutRNGstate(); } /*------ .Internal interface ------------------------*/ SEXP attribute_hidden do_RNGkind (SEXP call, SEXP op, SEXP args, SEXP env) { SEXP ans, rng, norm; checkArity(op,args); PROTECT(ans = allocVector(INTSXP, 2)); INTEGER(ans)[0] = RNG_kind; INTEGER(ans)[1] = N01_kind; rng = CAR(args); norm = CADR(args); if(!isNull(rng)) { /* set a new RNG kind */ RNGkind(asInteger(rng)); } if(!isNull(norm)) { /* set a new normal kind */ Norm_kind(asInteger(norm)); } UNPROTECT(1); return ans; } SEXP attribute_hidden do_setseed (SEXP call, SEXP op, SEXP args, SEXP env) { SEXP skind; int seed; RNGtype kind; checkArity(op,args); seed = asInteger(CAR(args)); if (seed == NA_INTEGER) error(_("supplied seed is not a valid integer")); skind = CADR(args); if (!isNull(skind)) { kind = asInteger(skind); RNGkind(kind); } else kind = RNG_kind; RNG_Init(RNG_kind, (Int32) seed); PutRNGstate(); return R_NilValue; } /* S COMPATIBILITY */ /* The following entry points provide compatibility with S. */ /* These entry points should not be used by new R code. */ void seed_in(long *ignored) { GetRNGstate(); } void seed_out(long *ignored) { PutRNGstate(); } #endif /* =================== Mersenne Twister ========================== */ /* From http://www.math.keio.ac.jp/~matumoto/emt.html */ /* A C-program for MT19937: Real number version([0,1)-interval) (1999/10/28) genrand() generates one pseudorandom real number (double) which is uniformly distributed on [0,1)-interval, for each call. sgenrand(seed) sets initial values to the working area of 624 words. Before genrand(), sgenrand(seed) must be called once. (seed is any 32-bit integer.) Integer generator is obtained by modifying two lines. Coded by Takuji Nishimura, considering the suggestions by Topher Cooper and Marc Rieffel in July-Aug. 1997. Copyright (C) 1997, 1999 Makoto Matsumoto and Takuji Nishimura. When you use this, send an email to: matumoto@math.keio.ac.jp with an appropriate reference to your work. REFERENCE M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3--30. */ /* Period parameters */ #define N 624 #define M 397 #define MATRIX_A 0x9908b0df /* constant vector a */ #define UPPER_MASK 0x80000000 /* most significant w-r bits */ #define LOWER_MASK 0x7fffffff /* least significant r bits */ /* Tempering parameters */ #define TEMPERING_MASK_B 0x9d2c5680 #define TEMPERING_MASK_C 0xefc60000 #define TEMPERING_SHIFT_U(y) (y >> 11) #define TEMPERING_SHIFT_S(y) (y << 7) #define TEMPERING_SHIFT_T(y) (y << 15) #define TEMPERING_SHIFT_L(y) (y >> 18) static Int32 *mt = dummyvec+1; /* the array for the state vector */ static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */ /* Initializing the array with a seed */ static void MT_sgenrand(Int32 seed) { int i; for (i = 0; i < N; i++) { mt[i] = seed & 0xffff0000; seed = 69069 * seed + 1; mt[i] |= (seed & 0xffff0000) >> 16; seed = 69069 * seed + 1; } mti = N; } /* Initialization by "sgenrand()" is an example. Theoretically, there are 2^19937-1 possible states as an intial state. Essential bits in "seed_array[]" is following 19937 bits: (seed_array[0]&UPPER_MASK), seed_array[1], ..., seed_array[N-1]. (seed_array[0]&LOWER_MASK) is discarded. Theoretically, (seed_array[0]&UPPER_MASK), seed_array[1], ..., seed_array[N-1] can take any values except all zeros. */ static double MT_genrand(void) { Int32 y; static Int32 mag01[2]={0x0, MATRIX_A}; /* mag01[x] = x * MATRIX_A for x=0,1 */ mti = dummyvec[0]; if (mti >= N) { /* generate N words at one time */ int kk; if (mti == N+1) /* if sgenrand() has not been called, */ MT_sgenrand(4357); /* a default initial seed is used */ for (kk = 0; kk < N - M; kk++) { y = (mt[kk] & UPPER_MASK) | (mt[kk+1] & LOWER_MASK); mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1]; } for (; kk < N - 1; kk++) { y = (mt[kk] & UPPER_MASK) | (mt[kk+1] & LOWER_MASK); mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1]; } y = (mt[N-1] & UPPER_MASK) | (mt[0] & LOWER_MASK); mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1]; mti = 0; } y = mt[mti++]; y ^= TEMPERING_SHIFT_U(y); y ^= TEMPERING_SHIFT_S(y) & TEMPERING_MASK_B; y ^= TEMPERING_SHIFT_T(y) & TEMPERING_MASK_C; y ^= TEMPERING_SHIFT_L(y); dummyvec[0] = mti; return ( (double)y * 2.3283064365386963e-10 ); /* reals: [0,1)-interval */ } /* The following code was taken from earlier versions of http://www-cs-faculty.stanford.edu/~knuth/programs/rng.c-old http://www-cs-faculty.stanford.edu/~knuth/programs/rng.c */ #define long Int32 #define ran_arr_buf R_KT_ran_arr_buf #define ran_arr_cycle R_KT_ran_arr_cycle #define ran_arr_ptr R_KT_ran_arr_ptr #define ran_arr_sentinel R_KT_ran_arr_sentinel #define ran_x dummyvec #define KK 100 /* the long lag */ #define LL 37 /* the short lag */ #define MM (1L<<30) /* the modulus */ #define TT 70 /* guaranteed separation between streams */ #define mod_diff(x,y) (((x)-(y))&(MM-1)) /* subtraction mod MM */ #define is_odd(x) ((x)&1) /* units bit of x */ static void ran_array(long aa[],int n) /* put n new random numbers in aa */ { register int i,j; for (j=0;j=MM) ss-=MM-2; /* cyclic shift 29 bits */ } x[1]++; /* make x[1] (and only x[1]) odd */ for (ss=seed&(MM-1),t=TT-1; t; ) { for (j=KK-1;j>0;j--) x[j+j]=x[j], x[j+j-1]=0; /* "square" */ for (j=KK+KK-2;j>=KK;j--) x[j-(KK-LL)]=mod_diff(x[j-(KK-LL)],x[j]), x[j-KK]=mod_diff(x[j-KK],x[j]); if (is_odd(ss)) { /* "multiply by z" */ for (j=KK;j>0;j--) x[j]=x[j-1]; x[0]=x[KK]; /* shift the buffer cyclically */ x[LL]=mod_diff(x[LL],x[KK]); } if (ss) ss>>=1; else t--; } for (j=0;j= 100) { ran_arr_cycle(); KT_pos = 0; } return ran_x[(KT_pos)++]; } static void RNG_Init_R_KT(Int32 seed) { ran_start(seed % 1073741821); KT_pos = 100; } ./libdieharder/rgb_persist.c0000664000175000017500000000456113707046103014403 0ustar eddedd/* * $Id: rgb_persist.c 250 2006-10-10 05:02:26Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is a test that checks to see if all the bits returned by the * rng change. Surprisingly, several generators have bits that do NOT * change, hence the test. It also reveals tests that for whatever reason * return less than the expected uint number of bits (32) as unchanging * high bits * * This (and all further rgb_ tests) are "my own". Some of them may turn * out to be formally equivalent to diehard or sts or knuth tests in the * specific sense that failure in one always matches or precedes failure * in the other. *======================================================================== */ #include int rgb_persist(Test **test, Rgb_Persist *persist) { uint last_rand; int i,j; /* * Now go through the list and dump the numbers several ways. */ if(bits > 32) { persist->nbits = 32; } else { persist->nbits = bits; } persist->cumulative_mask = 0; for(j=0;jand_mask = ~(last_rand ^ rgb_persist_rand_uint[0]); for(i=0;i<256;i++){ if(verbose){ printf("rgb_persist_rand_uint[%d] = %u = ",i,rgb_persist_rand_uint[i]); dumpbits(&rgb_persist_rand_uint[i],persist->nbits); printf("\n"); } /* * Now we make a mask of bits that coincide. Logic 41, where are you? */ persist->and_mask = persist->and_mask & (~(last_rand ^ rgb_persist_rand_uint[i])); if(verbose){ printf("and_mask = %u = ",persist->and_mask); dumpbits(&persist->and_mask,persist->nbits); printf("\n"); } } persist->and_mask = persist->and_mask & rmax_mask; persist->cumulative_mask = persist->cumulative_mask | persist->and_mask; } return(0); } ./libdieharder/rng_file_input.c0000664000175000017500000002354713707046103015071 0ustar eddedd/* *======================================================================== * $Id: libdieharder.h 176 2006-07-11 21:18:27Z rgb $ * * file_input (GSL compatible). * * By Daniel Summerhays * Mar. 10, 2005 * * Heavily modifed by rgb, June-July 2006 (and beyond) * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include /* * This is a wrapper for getting random numbers from a file. Note * CAREFULLY how we must proceed to access the state variables inside of a * given rng. */ static unsigned long int file_input_get (void *vstate); static double file_input_get_double (void *vstate); static void file_input_set (void *vstate, unsigned long int s); /* * This typedef struct file_input_state_t struct contains the data * maintained on the operation of the file_input rng, and can be accessed * via rng->state->whatever * * fp is the file pointer * flen is the number of rands in the file (state->flen) * rptr is a count of rands returned since last rewind * rtot is a count of rands returned since the file was opened or it * was deliberately reset. * rewind_cnt is a count of how many times the file was rewound since * its last open. * * file_input_state_t is defined in libdieharder.h currently and shared with * file_input_raw.c * * In this way the routines below should work for BOTH file_input AND * file_input_raw (as would rng->state->rtot, e.g., from the calling * routine :-). */ uint file_input_get_rewind_cnt(gsl_rng *rng) { file_input_state_t *state = (file_input_state_t *) rng->state; return state->rewind_cnt; } off_t file_input_get_rtot(gsl_rng *rng) { file_input_state_t *state = (file_input_state_t *) rng->state; return state->rtot; } void file_input_set_rtot(gsl_rng *rng,uint value) { file_input_state_t *state = (file_input_state_t *) rng; state->rtot = 0; } static unsigned long int file_input_get (void *vstate) { file_input_state_t *state = (file_input_state_t *) vstate; unsigned int iret; double f; char inbuf[K]; /* input buffer */ /* * Check that the file is open (via file_input_set()). */ if(state->fp != NULL) { /* * Read in the next random number from the file */ if(fgets(inbuf,K,state->fp) == 0){ fprintf(stderr,"# file_input(): Error: EOF on %s\n",filename); exit(0); } /* * Got one (as we pretty much have to unless the file is badly * broken). Convert the STRING input above into a uint according to * the "type" (basically matching scanf type). */ switch(filetype){ /* * 32 bit unsigned int by assumption */ case 'd': case 'i': case 'u': if(0 == sscanf(inbuf,"%u",&iret)){ fprintf(stderr,"Error: converting %s failed. Exiting.\n", inbuf); exit(0); } break; /* * double precision floats get converted to 32 bit uint */ case 'e': case 'E': case 'f': case 'F': case 'g': if(0 == sscanf(inbuf,"%lg",&f)){ fprintf(stderr,"Error: converting %s failed. Exiting.\n", inbuf); exit(0); } iret = (uint) f*UINT_MAX; break; /* * OK, so octal is really pretty silly, but we got it. Still uint. */ case 'o': if(0 == sscanf(inbuf,"%o",&iret)){ fprintf(stderr,"Error: converting %s failed. Exiting.\n", inbuf); exit(0); } break; /* * hexadecimal is silly too, but we got it. uint, of course. */ case 'x': if(0 == sscanf(inbuf,"%x",&iret)){ fprintf(stderr,"Error: converting %s failed. Exiting.\n", inbuf); exit(0); } break; case 'X': if(0 == sscanf(inbuf,"%X",&iret)){ fprintf(stderr,"Error: converting %s failed. Exiting.\n", inbuf); exit(0); } break; /* * binary is NOT so silly. Let's do it. The hard way. A typical * entry should look like: * 01110101001010100100111101101110 */ case 'b': iret = bit2uint(inbuf,filenumbits); break; default: fprintf(stderr,"# file_input(): Error. File type %c is not recognized.\n",filetype); exit(0); break; } /* * Success. iret is presumably valid and ready to return. Increment the * counter of rands read so far. */ state->rptr++; state->rtot++; if(verbose){ fprintf(stdout,"# file_input() %lu: %lu/%lu -> %u\n", state->rtot, state->rptr,state->flen,(uint)iret); } /* * This (with seed s == 0) basically rewinds the file and resets * state->rptr to 0, but rtot keeps running, */ if(state->rptr == state->flen) { /* * Reset/rewind the file */ file_input_set(vstate, 0); } return iret; } else { fprintf(stderr,"Error: %s not open. Exiting.\n", filename); exit(0); } } static double file_input_get_double (void *vstate) { return file_input_get (vstate) / (double) UINT_MAX; } /* * file_input_set() is not yet terriby robust. For example, it * cannot cope with missing header info, duplicate header info, * impossible header info. It should work, though, for a well-formed * header */ static void file_input_set (void *vstate, unsigned long int s) { int cnt,numfields; char inbuf[K]; /* input buffer */ file_input_state_t *state = (file_input_state_t *) vstate; if(verbose == D_FILE_INPUT || verbose == D_ALL){ fprintf(stdout,"# file_input(): entering file_input_set\n"); fprintf(stdout,"# file_input(): state->fp = %p, seed = %lu\n",(void*) state->fp,s); } /* * We use the "seed" to determine whether or not to reopen or * rewind. A seed s == 0 for an open file means rewind; a seed * of anything else forces a close (resetting rewind_cnt) followed * by a reopen. */ if(state->fp && s ) { if(verbose == D_FILE_INPUT || verbose == D_ALL){ fprintf(stdout,"# file_input(): Closing/reopening/resetting %s\n",filename); } /* fclose(state->fp); */ state->fp = NULL; } if (state->fp == NULL){ if(verbose == D_FILE_INPUT || verbose == D_ALL){ fprintf(stdout,"# file_input(): Opening %s\n", filename); } /* * If we get here, the file exists, is a regular file, and we know its * length. We can now open it. The test catches all other conditions * that might keep the file from reading, e.g. permissions. */ if ((state->fp = fopen(filename,"r")) == NULL) { fprintf(stderr,"# file_input(): Error: Cannot open %s, exiting.\n", filename); exit(0); } /* * OK, so if we get here, the file is open. */ if(verbose == D_FILE_INPUT || verbose == D_ALL){ fprintf(stdout,"# file_input(): Opened %s for the first time at %p\n", filename,(void*) state->fp); fprintf(stdout,"# file_input(): state->fp is %8p\n",(void*) state->fp); fprintf(stdout,"# file_input(): Parsing header:\n"); } state->rptr = 0; /* No rands read yet */ /* * We only reset the entire file if there is a nonzero seed passed in. * This clears both rtot and rewind_cnt in addition to rptr. */ if(s) { state->rtot = 0; state->rewind_cnt = 0; } } else { /* * Rewinding seriously reduces the size of the space being explored. * On the other hand, bombing a test also sucks, especially in a long * -a(ll) run. Therefore we rewind every time our file pointer reaches * the end of the file or call gsl_rng_set(rng,0). */ if(state->rptr >= state->flen){ rewind(state->fp); state->rptr = 0; state->rewind_cnt++; if(verbose == D_FILE_INPUT || verbose == D_ALL){ fprintf(stderr,"# file_input(): Rewinding %s at rtot = %u\n", filename,(uint) state->rtot); fprintf(stderr,"# file_input(): Rewind count = %u, resetting rptr = %lu\n",state->rewind_cnt,state->rptr); } } else { return; } } /* * We MUST have precisely three data lines at the beginning after * any comments. */ cnt = 0; while(cnt < 3){ if(state->fp != NULL) { if(fgets(inbuf,K,state->fp) == 0){ fprintf(stderr,"# file_input(): Error: EOF on %s\n",filename); exit(0); } } if(verbose){ fprintf(stdout,"%d: %s",cnt,inbuf); } /* * Skip comments altogether, whereever they might be. Also adopt code * to use new, improved, more portable "split()" command. */ if(inbuf[0] != '#'){ /* * Just like perl, sorta. In fact, I'm really liking using * perl-derived utility functions for parsing where I can. */ chop(inbuf); numfields = split(inbuf); if(numfields != 2){ fprintf(stderr,"# file_input(): Error: Wrong number of fields: format is 'fieldname: value'\n"); exit(0); } if(strncmp(splitbuf[0],"type",4) == 0){ filetype = splitbuf[1][0]; cnt++; if(verbose){ fprintf(stdout,"# file_input(): cnt = %d\n",cnt); fprintf(stdout,"# file_input(): filenumtype set to %c\n",filetype); } } if(strncmp(splitbuf[0],"count",5) == 0){ state->flen = atoi(splitbuf[1]); filecount = state->flen; cnt++; if(verbose){ fprintf(stdout,"# file_input(): cnt = %d\n",cnt); fprintf(stdout,"# file_input(): state->flen set to %lu\n",state->flen); } } if(strncmp(splitbuf[0],"numbit",6) == 0){ filenumbits = atoi(splitbuf[1]); cnt++; if(verbose){ fprintf(stdout,"# file_input(): cnt = %d\n",cnt); fprintf(stdout,"# file_input(): filenumbits set to %i\n",filenumbits); } } } } return; } static const gsl_rng_type file_input_type = {"file_input", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (file_input_state_t), &file_input_set, &file_input_get, &file_input_get_double }; const gsl_rng_type *gsl_rng_file_input = &file_input_type; ./libdieharder/diehard_operm5.cruft0000664000175000017500000001512013707046103015641 0ustar eddedd/* * $Id: diehard_operm5.c 230 2006-08-22 05:31:54Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * */ /* *======================================================================== * This is the Diehard OPERM5 test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * THE OVERLAPPING 5-PERMUTATION TEST :: * This is the OPERM5 test. It looks at a sequence of one mill- :: * ion 32-bit random integers. Each set of five consecutive :: * integers can be in one of 120 states, for the 5! possible or- :: * derings of five numbers. Thus the 5th, 6th, 7th,...numbers :: * each provide a state. As many thousands of state transitions :: * are observed, cumulative counts are made of the number of :: * occurences of each state. Then the quadratic form in the :: * weak inverse of the 120x120 covariance matrix yields a test :: * equivalent to the likelihood ratio test that the 120 cell :: * counts came from the specified (asymptotically) normal dis- :: * tribution with the specified 120x120 covariance matrix (with :: * rank 99). This version uses 1,000,000 integers, twice. :: * * Note -- this test almost certainly has errors. It has been * suggested that the actual rank is 5!-4!=96, not 99. However, * "good" generators still fail this test with the lower rank. * I really think that the covariance matrix is going to have to * recomputed... * * Comment * Good test. Just about everything fails it. It is validated * to the extent humanly possible against the last c port of * diehard that I could find (die.c) on the remaining diehard * mirror but it is complicated enough (and poorly documented * enough) that I worry. One lousy error in the r[][], s[][] * or map[] vector data and we'd get slightly wrong answers * and never know it, but we get the SAME answers right now * either way from the same data. *======================================================================== */ #include static int tflag=0; static double tcount[120]; /* * kperm computes the permutation number of a vector of five integers * passed to it. */ uint kperm(uint v[],uint voffset) { uint i,j,k,max; uint w[5]; uint pindex,uret,tmp; /* * work on a copy of v, not v itself in case we are using overlapping * 5-patterns. */ for(i=0;i<5;i++){ j = (i+voffset)%5; w[i] = v[j]; } if(verbose == -1){ printf("==================================================================\n"); printf("%10u %10u %10u %10u %10u\n",w[0],w[1],w[2],w[3],w[4]); printf(" Permutations = \n"); } pindex = 0; for(i=4;i>0;i--){ max = w[0]; k = 0; for(j=1;j<=i;j++){ if(max <= w[j]){ max = w[j]; k = j; } } pindex = (i+1)*pindex + k; tmp = w[i]; w[i] = w[k]; w[k] = tmp; if(verbose == -1){ printf("%10u %10u %10u %10u %10u\n",w[0],w[1],w[2],w[3],w[4]); } } if(pindex < 60 ){ uret = map[pindex]; } else { uret = pindex; } if(verbose == -1){ printf(" => %u\n",pindex); printf("map[%u] = %u\n",pindex,uret); } return uret; } int diehard_operm5(Test **test, int irun) { uint i,j,k,kp,t,vind,v[5]; double count[120]; double av,norm,x[60],y[60],chisq,ndof,pvalue; if(verbose == D_DIEHARD_OPERM5 || verbose == D_ALL){ printf("int r[][] = {\n"); for(i=0;i<60;i++){ printf("{"); for(j=0;j<59;j++){ printf("%10d, ",r[i][j]); } printf("%10d},\n",r[i][59]); } printf("};\n"); printf("int s[][] = {\n"); for(i=0;i<60;i++){ printf("{"); for(j=0;j<59;j++){ printf("%10d, ",s[i][j]); } printf("%10d},\n",s[i][59]); } printf("};\n"); } /* * for display only. 5 flags the size of the permutation set. */ test[0]->ntuple = 5; /* * Zero count vector, was t(120) in diehard.f90. */ for(i=0;i<120;i++) { count[i] = 0.0; if(tflag == 0){ tcount[i] = 0.0; tflag = 1; } } for(i=0;i<5;i++){ v[i] = gsl_rng_get(rng); } vind = 0; for(t=0;ttsamples;t++){ /* * OK, now we are ready to generate a list of permutation indices. * Basically, we take a vector of 5 integers and transform it into a * number with the kperm function. We will use the overlap flag to * determine whether or not to refill the entire v vector or just * rotate bytes. */ kp = kperm(v,vind); /* printf("kp = %u\n",kp); */ count[kp]++; v[vind] = gsl_rng_get(rng); vind = (vind+1)%5; } MYDEBUG(D_DIEHARD_OPERM5){ for(i=0;i<120;i++){ printf("%u: %f\n",i,count[i]); } } for(i=0;i<120;i++){ tcount[i] += count[i]; /* printf("%u: %f\n",i,tcount[i]); */ } /* * Now (at last) we compute the statistic and get a p-value. The * computation is straightforward, but involves the r and s matrices * so it doesn't fit the existing X or B models. */ chisq = 0.0; /* * Not at all sure about this, yet. */ av = 2.0*test[0]->tsamples/120.0; norm = 2.e5*test[0]->tsamples; for(i=0;i<60;i++){ x[i] = count[i] + count[i+60] - av; y[i] = count[i] - count[i+60]; /* printf("count[%u] = %f count[%u] = %f x[%u] = %f y[%u] = %f\n",i,count[i],i+60,count[i+60],i,x[i],i,y[i]);*/ } for(i=0;i<60;i++){ for(j=0;j<60;j++){ chisq = chisq + x[i]*r[i][j]*x[j] + y[i]*s[i][j]*y[j]; } } /* * The absolute value "shouldn't" be necessary but it is -- every * few hundred runs we get a negative chisq, which seems very * plausible (actually) given the numbers and wierd chisq in the * first place. The other possibility (alas a very reasonable one) * is that some of the numbers in r[][], s[][] or map[] are incorrect. * Noting well that they AGREE with an INDEPENDENT PORT of diehard * to C to 12 significant figures when run on identical binary files * and flagged to use the same algorithm... * * It would be nice, so nice, to have SOME clue how to actually generate * the matrices and other numbers since even a simple sign error on * a single number could make the test useless and (incidentally) cause * it to sometimes return a negative chisq. * * In the meantime, negative chisq causes the incomplete gamma function * routine to crash, so we protect it with the fabs() call. */ chisq = fabs(chisq / norm); ndof = 96; MYDEBUG(D_DIEHARD_OPERM5){ printf("# diehard_operm5(): chisq[%u] = %10.5f\n",kspi,chisq); } test[0]->pvalues[irun] = gsl_sf_gamma_inc_Q((double)(ndof)/2.0,chisq/2.0); MYDEBUG(D_DIEHARD_OPERM5){ printf("# diehard_operm5(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } kspi++; return(0); } ./libdieharder/diehard_rank_6x8.c0000664000175000017500000000616013707046103015175 0ustar eddedd/* * ======================================================================== * $Id: diehard_birthdays.c 250 2006-10-10 05:02:26Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This is the Diehard BINARY RANK 6x8 test, rewritten from the * description in tests.txt on George Marsaglia's diehard site. * * This is the BINARY RANK TEST for 6x8 matrices. From each of :: * six random 32-bit integers from the generator under test, a :: * specified byte is chosen, and the resulting six bytes form a :: * 6x8 binary matrix whose rank is determined. That rank can be :: * from 0 to 6, but ranks 0,1,2,3 are rare; their counts are :: * pooled with those for rank 4. Ranks are found for 100,000 :: * random matrices, and a chi-square test is performed on :: * counts for ranks 6,5 and <=4. :: * * =================================================================== */ #include /* * Include inline uint generator */ #include "static_get_bits.c" int diehard_rank_6x8(Test **test, int irun) { int i,t,rank; uint bitstring; uint **mtx; Vtest vtest; MYDEBUG(D_DIEHARD_RANK_6x8){ fprintf(stdout,"# diehard_rank_6x8(): Starting test.\n"); } /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; mtx = (uint **)malloc(6*sizeof(uint *)); for(i=0;i<6;i++){ mtx[i] = (uint *)malloc(8*sizeof(uint)); } Vtest_create(&vtest,7); vtest.cutoff = 5.0; for(i=0;i<2;i++){ vtest.x[0] = 0.0; vtest.y[0] = 0.0; } vtest.x[2] = 0.0; vtest.y[2] = test[0]->tsamples*0.149858E-06; vtest.x[3] = 0.0; vtest.y[3] = test[0]->tsamples*0.808926E-04; vtest.x[4] = 0.0; vtest.y[4] = test[0]->tsamples*0.936197E-02; vtest.x[5] = 0.0; vtest.y[5] = test[0]->tsamples*0.217439E+00; vtest.x[6] = 0.0; vtest.y[6] = test[0]->tsamples*0.773118E+00; for(t=0;ttsamples;t++){ /* * We generate 6 random rmax_bits-bit integers and put a * randomly chosen byte into the LEFTMOST byte position * of the row/slot of mtx. */ MYDEBUG(D_DIEHARD_RANK_6x8){ fprintf(stdout,"# diehard_rank_6x8(): Input random matrix = \n"); } for(i=0;i<6;i++){ MYDEBUG(D_DIEHARD_RANK_6x8){ fprintf(stdout,"# "); } bitstring = get_rand_bits_uint(32,0xffffffff,rng); mtx[i][0] = bitstring; MYDEBUG(D_DIEHARD_RANK_6x8){ dumpbits(mtx[i],32); fprintf(stdout,"\n"); } } rank = binary_rank(mtx,6,8); MYDEBUG(D_DIEHARD_RANK_6x8){ printf("binary rank = %d\n",rank); } if(rank <= 2){ vtest.x[2]++; } else { vtest.x[rank]++; } } /* for(i=0;i<33;i++) printf("vtest.x[%d] = %f\n",i,vtest.x[i]); */ Vtest_eval(&vtest); test[0]->pvalues[irun] = vtest.pvalue; MYDEBUG(D_DIEHARD_RANK_6x8) { printf("# diehard_rank_6x8(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } Vtest_destroy(&vtest); for(i=0;i<6;i++){ free(mtx[i]); } free(mtx); return(0); } ./libdieharder/bits.cruft0000664000175000017500000005063613707046103013726 0ustar eddedd/* *======================================================================== * $Id: bits.c 245 2006-10-05 16:34:42Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * This should be a nice, big case switch where we add EACH test * we might want to do and either just configure and do it or * prompt for input (if absolutely necessary) and then do it. *======================================================================== */ #include /* * This should be the only tool we use to access bit substrings * from now on. Note that we write our own bitstring access tools * instead of using ldap's LBER (Basic Encoding Rules) library call * to both retain control and because it would introduce a slightly * exotic dependency in the resulting application. * * bstring is a pointer to the uint string to be parsed. It is a uint * pointer to make it easy to pass arbitrary strings which will generally * be e.g. unsigned ints in dieharder but might be other data types * in other applications (might as well make this semi-portable while I'm * writing it at all). bslen is the length of bitstring in uints. blen is * the length of the bitstring to be returned (as an unsigned int) and has * to be less than the length, in bits, of bitstring. Finally, boffset * is the bit index of the point in the bitstring from which the result * will be returned. * * The only other thing that has to be defined is the direction from which * the bit offset and bit length are counted. We will make the * LEAST significant bit offset 0, and take the string from the direction * of increasing signicance. Examples: * * bitstring: 10010110, length 1 (byte, char). * for offset 0, length 4 this should return: 0110 * offset 1, length 4: 1011 * offset 5, length 4: 0100 (note periodic wraparound) * offset 6, length 4: 1010 (ditto) * * where of course the strings are actually returned as e.g. * 00000000000000000000000000000110 (unsigned int). */ uint get_bit_ntuple(uint *bitstring,uint bslen,uint blen,uint boffset) { unsigned int b,rlen; int ioffset; unsigned int result,carry,nmask; /* * Some tests for failure or out of bounds. 8*blen has to be less than * sizeof(uint). */ if(blen > 8*sizeof(uint)) blen = 8*sizeof(uint); /* * Now that blen is sane, we can make a mask for the eventual return * value of length blen. */ nmask = 1; /* dumpbits(&nmask,32); */ for(b=0;b> 1; if(verbose == D_BITS || verbose == D_ALL){ printf("Shifted result = "); dumpbits(&result,32); } /* * rlen is the cumulated length of result. Initially, it is set to * rmax_bits - boffset, the number of bits result can now contribute from * boffset. We now have to loop, adding bits from uints up the list * (cyclic) until we get enough to return blen. Note that we have to * loop because (for example) blen = 32, rmax_bits = 16, boffset = 30 * would start in bitstring[2] and get 2 bits (30 and 31), get all 16 bits * from bitstring[1], and still need 12 bits of bitstring[0] to return. */ rlen = rmax_bits - boffset; if(verbose == D_BITS || verbose == D_ALL){ printf("Cumulated %u signifcant bits\n",rlen); } while(blen > rlen){ /* * If we get here, we have to use either bitstring[ioffset-1] or * bitstring[bslen-1], shifted and filled into result starting * at the correct slot. Put this into carry to work on. */ ioffset--; if(ioffset < 0) ioffset = bslen-1; carry = bitstring[ioffset]; if(verbose == D_BITS || verbose == D_ALL){ printf("bitstring[%d] = %u\n",ioffset,carry); printf("Next carry = "); dumpbits(&carry,32); } /* * This is tricky! Shift carry left until the first bit lines * up with the first empty bit in result, which we'll hope is * the current rlen bit. */ for(b=0;b 8*sizeof(unsigned int)) { nbits = 8*sizeof(unsigned int); } mask = (uint)pow(2,nbits-1); for(i=0;i> 1; } printf("\n"); } void cycle(unsigned int *data, unsigned int nbits) { unsigned int i; unsigned int result,rbit,lmask,rmask; /* * We need two masks. One is a mask of all the significant bits * in the rng, which may be as few as 24 and can easily be only * 31. * * The other is lmask, with a single bit in the position of the * leftmost significant bit. We can make them both at once. */ rmask = 1; lmask = 1; for(i=0;i> 1; result += rbit*lmask; *data = result; if(verbose){ printf(" Rotated int: "); dumpbits(data,32); } } /* * This is still a good idea, but we have to modify it so that it ONLY * gets VALID bits by their absolute index. */ int get_bit(uint *rand_uint, unsigned int n) { int i; unsigned int index,offset,mask; static unsigned last_rand; /* * This routine is designed to get the nth VALID bit of an input uint * *rand_int. The indexing is a bit tricky. index tells us which vector * element contains the bit being sought: */ index = (int) (n/rmax_bits); /* * Then we have to compute the offset of the bit desired, starting from * the first significant/valid bit in the unsigned int. */ offset = (8*sizeof(unsigned int) - rmax_bits) + n%rmax_bits; mask = (int)pow(2,8*sizeof(unsigned int) - 1); mask = mask>>offset; if(mask & rand_uint[index]){ return(1); } else { return(0); } } int get_int_bit(uint i, uint n) { unsigned int mask; /* * This routine gets the nth bit of the unsigned int i. It does very * limited checking to ensure that n is in the range 0-sizeof(uint) * Note */ if(n < 0 || n > 8*sizeof(uint)){ fprintf(stderr,"Error: bit offset %d exceeds length %d of uint.\n",n,8*sizeof(uint)); exit(0); } /* * Then we have make a mask and shift it over from the first (least * significant) bit in the unsigned int. AND the result with i and * we're done. */ mask = 1; mask = mask< 8*sizeof(unsigned int)) { nbits = 8*sizeof(unsigned int); } mask = 1; for(i=0;i 31 || bstop < bstart){ printf("b_umask() error: bstart <= bstop must be in range 0-31.\n"); exit(0); } blen = bstop-bstart+1; /* * Create blen 1's on right */ mask = 1; for(b=1;b 31 || bstop < bstart){ printf("b_umask() error: bstart <= bstop must be in range 0-31.\n"); exit(0); } if(boffset < 0 || boffset > 31){ printf("b_window() error: boffset must be in range 0-31.\n"); exit(0); } shift = bstart - boffset; /* dumpbits(&input,sizeof(uint)*CHAR_BIT); */ mask = b_umask(bstart,bstop); /* dumpbits(&mask,sizeof(uint)*CHAR_BIT); */ output = input & mask; /* dumpbits(&output,sizeof(uint)*CHAR_BIT); */ if(shift>0){ output = output << shift; } else { output = output >> (-shift); } /* dumpbits(&output,sizeof(uint)*CHAR_BIT); */ return output; } /* * Rotate the uint left (with periodic BCs) */ uint b_rotate_left(uint input,uint shift) { uint tmp; dumpbits(&input,sizeof(uint)*CHAR_BIT); tmp = b_window(input,0,shift-1,32-shift); dumpbits(&tmp,sizeof(uint)*CHAR_BIT); input = input << shift; dumpbits(&input,sizeof(uint)*CHAR_BIT); input += tmp; dumpbits(&input,sizeof(uint)*CHAR_BIT); return input; } /* * Rotate the uint right (with periodic BCs) */ uint b_rotate_right(uint input, uint shift) { uint tmp; dumpbits(&input,sizeof(uint)*CHAR_BIT); tmp = b_window(input,32-shift,31,0); dumpbits(&tmp,sizeof(uint)*CHAR_BIT); input = input >> shift; dumpbits(&input,sizeof(uint)*CHAR_BIT); input += tmp; dumpbits(&input,sizeof(uint)*CHAR_BIT); return input; } /* * OK, with this all in hand, we can NOW write routines to return * pretty much any sort of string of bits from the prevailing rng * without too much effort. Let's get an ntuple from a uint vector * of arbitrary length and offset, with cyclic boundary conditions. * * We have to pack the answer into the LEAST significant bits in the * output vector, BTW, not the MOST. That is, we have to fill the * output window all the way to the rightmost bit. Tricky. */ void get_ntuple_cyclic(uint *input,uint ilen, uint *output,uint olen,uint ntuple,uint offset) { int istart,iend,istartbit,iendbit,ostart,oend,ostartbit,oendbit; int i,j,bcnt,bdelta,uintlen; uintlen = sizeof(uint)*CHAR_BIT; /* * We start somewhere in input[istart] and end in input[iend]. * Ditto output[ostart], output[oend]. We also need the BIT offsets * in these uints. * * SO, suppose offset = 40, ntuple = 40. Then istart = 40/32 = 1, * iend = 80/32 = 2, istartbit = 40 - 32 = 8, iendbit = 96 - 80 = 16 * (where this is one bit PAST the end of the window!) * The slice thus runs from: * index[1], bits 8-31 (total of 24 bits) * to: * index[2], bits 0-15 (total of 16 bits) * * for a total of 40 bits starting at offset 1*32+8 = 40. We can deal * with periodic wraparound as we work though index by using i = i%ilen * and trying to reach iend = iend%ilen; */ istart = offset/uintlen; iend = (offset+ntuple)/uintlen; istartbit = offset - istart*uintlen; iendbit = (istartbit + ntuple)%uintlen; /* We want to point at the bit PAST the end */ if(iendbit == 0){ iend--; iendbit = uintlen; } /* * To accomplish periodic wraparound, we mod the * istart and iend markers (and later, i itself). */ istart = istart%ilen; iend = iend%ilen; printf("istart = %u, iend = %u, istartbit = %u, iendbit = %u\n", istart,iend,istartbit,iendbit); /* * Now we have to do the same thing for the output vector. Here life * is a BIT better, as we can just copy the windows above straight over * and shift things at the end. So what we really have to do is figure * out ostart. Assuming that olen = 4, ostart in our example should be: * ostart = 4 - 40/32 - 1 = 2, * so the answer will go in output[2] and output[3]. * * */ if((ntuple%uintlen) == 0){ ostart = olen - ntuple/uintlen; } else { ostart = olen - ntuple/uintlen - 1; } oend = olen - 1; printf("ostart = %u, oend = %u,\n",ostart,oend); /* * Now we do a double loop, iterating BACKWARDS. */ i = iend; j = oend; /* * The only sane way to do this with periodic wraparound is to just * count the bits returned and the chunk sizes. There are only four * (possible) chunks we might grab: */ left = iendbit; right = uintlen - iendbit; /* May be zero */ /* * This is a possible chunk, depending on whether or not it is * less than right chunk. */ if(istartbit > iendbit) { topright = uintlen - istartbit; topleft = 0; } else { topright = right; topleft = iendbit - istartbit; } bcnt = 0; while(bcnt < ntuple){ /* * Second (least significant) part of output[j]. */ printf("Starting Fill Right: i = %d j = %d bcnt = %d\n",i,j,bcnt); /* Fill right to terminate */ if((uintlen-istartbit) == (ntuple-bcnt)){ bdelta = uintlen-istartbit; printf("3 Fill right from %d: output[%d] = ",i,j); output[j] = b_window(input[i],istartbit,uintlen-1,bdelta); bcnt += bdelta; dumpbits(&output[j],sizeof(uint)*CHAR_BIT); break; } /* Fill right to terminate */ if((ntuple-bcnt) == (iendbit-istartbit)){ printf("2 Fill right from %d: output[%d] = ",i,j); output[j] = b_window(input[i],istartbit,iendbit-1,uintlen-iendbit+istartbit); bcnt += iendbit-istartbit; dumpbits(&output[j],sizeof(uint)*CHAR_BIT); break; } /* Plain old fill right (all other cases) */ printf("1 Fill right from %d: output[%d] = ",i,j); output[j] = b_window(input[i],0,iendbit-1,uintlen-iendbit); bcnt += iendbit; dumpbits(&output[j],sizeof(uint)*CHAR_BIT); printf("Finished Fill Right: i = %d j = %d bcnt = %d\n",i,j,bcnt); if(bcnt == ntuple) break; /* * Now we check for the First (most significant) part of output[j]. * It MUST come from the previous input line if any, so we decrement * i. */ i--; if(i == -1) i = ilen-1; printf("Starting Fill Left: i = %d j = %d bcnt = %d\n",i,j,bcnt); if((ntuple-bcnt) > iendbit){ printf("1 Fill left from %d: output[%d] = ",i,j); output[j] += b_window(input[i],iendbit,uintlen-1,0); bcnt += uintlen-iendbit; dumpbits(&output[j],sizeof(uint)*CHAR_BIT); } /* Fill left to terminate */ if((ntuple-bcnt) == (uintlen-iendbit)){ printf("2 Fill left from %d: output[%d] = ",i,j); output[j] += b_window(input[i],iendbit,uintlen-1,0); bcnt += uintlen-iendbit; dumpbits(&output[j],sizeof(uint)*CHAR_BIT); break; } /* Fill left to terminate */ if((ntuple-bcnt) == (uintlen-istartbit)){ printf("3 Fill left from %d: output[%d] = ",i,j); output[j] += b_window(input[i],istartbit,uintlen-1,istartbit-iendbit); bcnt += uintlen-istartbit; dumpbits(&output[j],sizeof(uint)*CHAR_BIT); break; } printf("Finished Fill Left: i = %d j = %d bcnt = %d\n",i,j,bcnt); j--; } } ./libdieharder/diehard_dna.c0000664000175000017500000001635613707046103014307 0ustar eddedd/* * ======================================================================== * $Id: diehard_dna.c 230 2006-08-22 05:31:54Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This is the Diehard DNA test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * The DNA test considers an alphabet of 4 letters: C,G,A,T, * determined by two designated bits in the sequence of random * integers being tested. It considers 10-letter words, so that * as in OPSO and OQSO, there are 2^20 possible words, and the * mean number of missing words from a string of 2^21 (over- * lapping!) 10-letter words (2^21+9 "keystrokes") is 141909. * The standard deviation sigma=339 was determined as for OQSO * by simulation. (Sigma for OPSO, 290, is the true value (to * three places), not determined by simulation. * * Note: 2^21 = 2097152 * Note: Overlapping samples must be used for this test to get the * right value of sigma. * The tests BITSTREAM, OPSO, OQSO and DNA are all closely related. * * This test is now CORRECTED on the basis of a private communication * from Paul Leopardi (MCQMC-2008 presentation) and Noonan and Zeilberger * (1999), Rivals and Rahmann (2003), and Rahmann and Rivals (2003). * The "exact" target statistic (to many places) is: * \mu = 141910.4026047629, \sigma = 337.2901506904 * ======================================================================== */ #include #include "static_get_bits.c" static uint mask; int diehard_dna(Test **test, int irun) { uint i,j,k,l,m,n,o,p,q,r,t,boffset; uint i0,j0,k0,l0,m0,n0,o0,p0,q0,r0; Xtest ptest; char **********w; MYDEBUG(D_DIEHARD_DNA){ fprintf(stdout,"# diehard_dna(): Starting test.\n"); } /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * This is pointless, I think, but it shuts -Wall up and is harmless. */ i0 = gsl_rng_get(rng); j0 = gsl_rng_get(rng); k0 = gsl_rng_get(rng); l0 = gsl_rng_get(rng); m0 = gsl_rng_get(rng); n0 = gsl_rng_get(rng); o0 = gsl_rng_get(rng); p0 = gsl_rng_get(rng); q0 = gsl_rng_get(rng); r0 = gsl_rng_get(rng); boffset = 0; /* * p = 141909, with sigma 339, FOR tsamples 2^21+1 2 letter words. * These cannot be varied unless one figures out the actual * expected "missing works" count as a function of sample size. SO: * * ptest.x = number of "missing words" given 2^21+1 trials * ptest.y = 141910.4026047629 * ptest.sigma = 337.2901506904 */ ptest.x = 0.0; /* Initial value */ ptest.y = 141910.4026047629; ptest.sigma = 337.2901506904; /* * We now make tsamples measurements, as usual, to generate the missing * statistic. Wow! 10 dimensions! I don't think even my tensor() * package will do that...;-) */ w = (char **********)malloc(4*sizeof(char *********)); for(i=0;i<4;i++){ w[i] = (char *********)malloc(4*sizeof(char ********)); for(j=0;j<4;j++){ w[i][j] = (char ********)malloc(4*sizeof(char *******)); for(k=0;k<4;k++){ w[i][j][k] = (char *******)malloc(4*sizeof(char******)); for(l=0;l<4;l++){ w[i][j][k][l] = (char ******)malloc(4*sizeof(char*****)); for(m=0;m<4;m++){ w[i][j][k][l][m] = (char *****)malloc(4*sizeof(char****)); for(n=0;n<4;n++){ w[i][j][k][l][m][n] = (char ****)malloc(4*sizeof(char***)); for(o=0;o<4;o++){ w[i][j][k][l][m][n][o] = (char ***)malloc(4*sizeof(char**)); for(p=0;p<4;p++){ w[i][j][k][l][m][n][o][p] = (char **)malloc(4*sizeof(char*)); for(q=0;q<4;q++){ w[i][j][k][l][m][n][o][p][q] = (char *)malloc(4*sizeof(char)); /* Zero the column */ memset(w[i][j][k][l][m][n][o][p][q],0,4*sizeof(char)); } } } } } } } } } /* * To minimize the number of rng calls, we use each j and k mod 32 * to determine the offset of the 10-bit long string (with * periodic wraparound) to be used for the next iteration. We * therefore have to "seed" the process with a random l */ q = gsl_rng_get(rng); /* mask = ((2 << 1)-1); */ mask = 0x3; for(t=0;ttsamples;t++){ /* * Let's do this the cheap/easy way first, sliding a 20 bit * window along each int for the 32 possible starting * positions a la birthdays, before trying to slide it all * the way down the whole random bitstring implicit in a * long sequence of random ints. That way we can exit * the tsamples loop at tsamples = 2^15... */ if(t%32 == 0) { i0 = gsl_rng_get(rng); j0 = gsl_rng_get(rng); k0 = gsl_rng_get(rng); l0 = gsl_rng_get(rng); m0 = gsl_rng_get(rng); n0 = gsl_rng_get(rng); o0 = gsl_rng_get(rng); p0 = gsl_rng_get(rng); q0 = gsl_rng_get(rng); r0 = gsl_rng_get(rng); boffset = 0; } /* * Get four "letters" (indices into w) */ i = get_bit_ntuple_from_uint(i0,2,mask,boffset); j = get_bit_ntuple_from_uint(j0,2,mask,boffset); k = get_bit_ntuple_from_uint(k0,2,mask,boffset); l = get_bit_ntuple_from_uint(l0,2,mask,boffset); m = get_bit_ntuple_from_uint(m0,2,mask,boffset); n = get_bit_ntuple_from_uint(n0,2,mask,boffset); o = get_bit_ntuple_from_uint(o0,2,mask,boffset); p = get_bit_ntuple_from_uint(p0,2,mask,boffset); q = get_bit_ntuple_from_uint(q0,2,mask,boffset); r = get_bit_ntuple_from_uint(r0,2,mask,boffset); /* printf("%u: %u %u %u %u %u\n",t,i,j,k,l,boffset); */ w[i][j][k][l][m][n][o][p][q][r]++; boffset++; } /* * Now we count the holes, so to speak */ ptest.x = 0; for(i=0;i<4;i++){ for(j=0;j<4;j++){ for(k=0;k<4;k++){ for(l=0;l<4;l++){ for(m=0;m<4;m++){ for(n=0;n<4;n++){ for(o=0;o<4;o++){ for(p=0;p<4;p++){ for(q=0;q<4;q++){ for(r=0;r<4;r++){ if(w[i][j][k][l][m][n][o][p][q][r] == 0){ ptest.x += 1.0; /* printf("ptest.x = %f Hole: w[%u][%u][%u][%u] = %u\n",ptest.x,i,j,k,l,w[i][j][k][l]); */ } } } } } } } } } } } MYDEBUG(D_DIEHARD_DNA) { printf("%f %f %f\n",ptest.y,ptest.x,ptest.x-ptest.y); } Xtest_eval(&ptest); test[0]->pvalues[irun] = ptest.pvalue; MYDEBUG(D_DIEHARD_DNA) { printf("# diehard_dna(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } /* * Don't forget to free w when done, in reverse order */ for(i=0;i<4;i++){ for(j=0;j<4;j++){ for(k=0;k<4;k++){ for(l=0;l<4;l++){ for(m=0;m<4;m++){ for(n=0;n<4;n++){ for(o=0;o<4;o++){ for(p=0;p<4;p++){ for(q=0;q<4;q++){ free(w[i][j][k][l][m][n][o][p][q]); } free(w[i][j][k][l][m][n][o][p]); } free(w[i][j][k][l][m][n][o]); } free(w[i][j][k][l][m][n]); } free(w[i][j][k][l][m]); } free(w[i][j][k][l]); } free(w[i][j][k]); } free(w[i][j]); } free(w[i]); } free(w); return(0); } ./libdieharder/Makefile.am0000664000175000017500000000660314273750662013762 0ustar eddedd#======================================================================== # This is a Makefile.am for the libdieharder library, part of the # overall dieharder package. It pretty much sets up standard library # # These two targets execute in the toplevel project directory only. # make svn does a svn commit and creates the timestamp $(SVNTIME) # make sync does a svn commit and rsyncs the project repo to a # list of hosts and also creates $(SVNTIME) #======================================================================== # This is automagically set in the toplevel build. Do not edit by # hand. VERSION=@VERSION@ LITTLE_ENDIAN=@LITTLE_ENDIAN@ # VERSION_MAJOR = $(shell expr $(VERSION) : '\(.*\)\..*\..*' \| $(VERSION)) # RELEASE=0 # Man page man3_MANS = libdieharder.3 # Library definitions lib_LTLIBRARIES = libdieharder.la libdieharder_la_LIBADD = -lgsl -lgslcblas -lm libdieharder_la_LDFLAGS = -version-number @DIEHARDER_LT_VERSION@ libdieharder_la_CFLAGS = -std=c99 -Wall -pedantic # Sources # The shell script is the easy way to do this, by far. But it may not # be sufficiently portable. # libdieharder_la_SOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d") libdieharder_la_SOURCES = \ bits.c \ chisq.c \ countx.c \ dab_bytedistrib.c \ dab_dct.c \ dab_filltree.c \ dab_filltree2.c \ dab_monobit2.c \ diehard_2dsphere.c \ diehard_3dsphere.c \ diehard_birthdays.c \ diehard_bitstream.c \ diehard_count_1s_byte.c \ diehard_count_1s_stream.c \ diehard_craps.c \ diehard_dna.c \ diehard_operm5.c \ diehard_opso.c \ diehard_oqso.c \ diehard_parking_lot.c \ diehard_rank_32x32.c \ diehard_rank_6x8.c \ diehard_runs.c \ diehard_squeeze.c \ diehard_sums.c \ dieharder_rng_types.c \ dieharder_test_types.c \ histogram.c \ kstest.c \ marsaglia_tsang_gcd.c \ marsaglia_tsang_gorilla.c \ parse.c \ prob.c \ random_seed.c \ rank.c \ rgb_bitdist.c \ rgb_kstest_test.c \ rgb_lagged_sums.c \ rgb_minimum_distance.c \ rgb_permutations.c \ rgb_persist.c \ rgb_timing.c \ rngav.c \ rng_aes.c \ rijndael-alg-fst.c \ rng_ca.c \ rng_dev_random.c \ rng_dev_arandom.c \ rng_dev_urandom.c \ rng_file_input.c \ rng_file_input_raw.c \ rngs_gnu_r.c \ rng_kiss.c \ rng_jenkins.c \ rng_superkiss.c \ rng_stdin_input_raw.c \ rng_threefish.c \ rng_uvag.c \ rng_XOR.c \ sample.c \ skein_block64.c \ skein_block_ref.c \ std_test.c \ sts_monobit.c \ sts_runs.c \ sts_serial.c \ timing.c \ Vtest.c \ version.c \ Xtest.c # rgb_operm.c # rgb_lmn.c # The program/library may need to know what version it is, define # the VERSION macro. DEFINES = -DVERSION=$(VERSION) -DLITTLE_ENDIAN=$(LITTLE_ENDIAN) #======================================================================== # Define parameters and directives needed in compile/link steps. #======================================================================== # C Compiler. Change only if you must. # CC = gcc # Compile flags (use fairly standard -O3 as default) AM_CPPFLAGS = $(DEFINES) -I ${top_srcdir}/include AM_CFLAGS = -O3 -Wall -pedantic -Wno-unused-variable #======================================================================== # The only safe place to do commits is in the toplevel directory #======================================================================== SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/dieharder SVNTIME = dieharder.svn.time svn: (cd ..;make svn) sync: (cd ..;make sync) ./libdieharder/rng_aes.c0000664000175000017500000000475213707046103013500 0ustar eddedd/* rng_es * * Copyright (C) 1996, 1997, 1998, 1999, 2000 James Theiler, Brian Gough * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include // State blocks = 1 for weakest form #define STATE_BLOCKS (1) /* MUST be 1 for AES */ #define BLOCKS_SIZE (16 * STATE_BLOCKS) #define NR 10 /* * This is a wrapping of the AES algorithm as a generator */ typedef struct { u32 rk[4*(NR + 1)]; unsigned char block[BLOCKS_SIZE]; short int pos; } AES_state_t; unsigned long int aes_get (void *vstate); double aes_get_double (void *vstate); void aes_set (void *vstate, unsigned long int s); unsigned long int aes_get (void *vstate) { AES_state_t *state = vstate; unsigned int ret; if (state->pos + sizeof(ret) > BLOCKS_SIZE) { rijndaelEncrypt(state->rk, NR, state->block, state->block); state->pos = 0; } ret = *((unsigned int *) (state->block + state->pos)); state->pos += sizeof(ret); // ret &= 0x7fffffff; return(ret); } double aes_get_double (void *vstate) { // return aes_get_long(vstate) / (double) ULONG_MAX; return (double) aes_get(vstate) / (double) (UINT_MAX >> 0); } void aes_set (void *vstate, unsigned long int s) { AES_state_t *state = vstate; int i; u8 key[16]; memset(state, 0, sizeof(*state)); // Zero pos and block /* Make sure to use all bits of s in the key: * (5 * i) % 26 => {0,5,10,15,20,25,4,9,14,19,24,3,8,13,18,23} * */ for (i = 0; i < 16; i++) { key[i] = (u8) (112 + i + (s >> ((5 * i) % 26))); } rijndaelKeySetupEnc(state->rk, key, 128); rijndaelEncrypt(state->rk, NR, state->block, state->block); return; } static const gsl_rng_type aes_type = { "AES_OFB", /* name */ UINT_MAX>>0, // UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (AES_state_t), &aes_set, &aes_get, &aes_get_double}; const gsl_rng_type *gsl_rng_aes = &aes_type; ./libdieharder/rng_superkiss.c0000664000175000017500000000646113707046103014757 0ustar eddedd/* * rng_superkiss.c * * Super KISS based on Usenet posting by G. Marsaglia: * Period 54767 * 2^1337279 * Adopted in C from David Jones' * * Good Practice in (Pseudo) Random Number Generation for * Bioinformatics Applications * * http://www.cs.ucl.ac.uk/staff/d.jones/GoodPracticeRNG.pdf * * David Jones, UCL Bioinformatics Group * E-mail: d.jones@cs.ucl.ac.uk * Last revised May 7th 2010 * * * GSL/GPL packaged for dieharder by Robert G. Brown 01/07/11 * * David has kindly agreed to make the GPRNG code vailable under the * GPL so it can be integrated with the dieharder package and/or the * Gnu Scentific Libraary (GSL). * */ #include #define SUPERKISS_QMAX 41790 #define GSL_MT19937_1999 14 static unsigned long int superkiss_get (void *vstate); static double superkiss_get_double (void *vstate); static void superkiss_set (void *vstate, unsigned long int s); typedef struct { /* * Seed/state variables. Note that superkiss has to be carefully * seeded, that its first and subsequent refill() calls are expensive, * so not a good choice if all you're doing is generating five or ten * random numbers. Should be GREAT for simulations, with effectively * infinite period and HOPEFULLY good randomness. */ unsigned int Q[SUPERKISS_QMAX]; unsigned int indx; unsigned int carry; unsigned int xcng; unsigned int xs; } superkiss_state_t; static unsigned long int superkiss_refill(void *vstate){ superkiss_state_t *state = vstate; int i; unsigned long long t; for(i = 0;i < SUPERKISS_QMAX; i++) { t = 7010176ULL * state->Q[i] + state->carry; state->carry = (t>>32); state->Q[i] = ~t; } state->indx=1; return (state->Q[0]); } static unsigned long int superkiss_get (void *vstate) { superkiss_state_t *state = vstate; state->xcng = 69069 * state->xcng + 123; state->xs ^= state->xs<<13; state->xs ^= state->xs>>17; state->xs ^= state->xs>>5; return ( state->indx < SUPERKISS_QMAX ? state->Q[state->indx++] : superkiss_refill(vstate)) + state->xcng + state->xs; } static double superkiss_get_double (void *vstate) { return (unsigned int) superkiss_get (vstate) / (double) UINT_MAX; } static void superkiss_set (void *vstate, unsigned long int s) { /* Initialize automaton using specified seed. */ superkiss_state_t *state = (superkiss_state_t *) vstate; uint seed_seed; gsl_rng *seed_rng; /* random number generator used to seed uvag */ int i; /* * superkiss needs MANY initial seeds. They have to be reproducible * from a single seed in order to be consistent with the GSL. We * therefore have to do a two step process where we use seed to * seed an existing GSL generator (say mt19937_1999) and take the * first 41790 returns as the rest of our seed for this generator. */ seed_rng = gsl_rng_alloc(dh_rng_types[GSL_MT19937_1999]); seed_seed = s; gsl_rng_set(seed_rng,seed_seed); for(i = 0;i < SUPERKISS_QMAX;i++){ state->Q[i] = gsl_rng_get(seed_rng); } state->indx=SUPERKISS_QMAX; state->carry=362436; state->xcng=1236789; state->xs=521288629; } static const gsl_rng_type superkiss_type = {"superkiss", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (superkiss_state_t), &superkiss_set, &superkiss_get, &superkiss_get_double}; const gsl_rng_type *gsl_rng_superkiss = &superkiss_type; ./libdieharder/rng_jenkins.c0000664000175000017500000000241713707046103014365 0ustar eddedd/** * This program uses the Jenkins One-at-a-Time hash function as a PRNG * by simulating the process of feeding it successively longer blocks * of all zeros. Each 32-bit hash value doubles as the pseudo-random * number which is written as binary on stdout in the byte order of * the machine. * * @file * @brief Jenkins One-at-a-Time hash function as PRNG */ #include #include #include #include int main(int argc, char* argv[]) { int rv = 0; uint32_t a = 0xbb48e941; uint32_t b = 0; for (;;) { /* Inner loop of Jenkins One-at-a-Time hash function where the * next character is '\0'. */ a += '\0'; a += (a << 10); a ^= (a >> 6); /* Post-processing. */ b = a + (a << 3); b ^= (b >> 11); b += (b << 15); /* Write the hash value to stdout as binary in the byte order * of the machine. */ if (fwrite(&b, sizeof(b), 1, stdout) != 1) { if (feof(stdout)) { fprintf(stderr, "*** Error: fwrite: Unexpected EOF.\n"); } else { fprintf(stderr, "*** Error: fwrite: %s\n", strerror(errno)); } rv = 1; break; } } return rv; } ./libdieharder/diehard_runs.c0000664000175000017500000001273213707046103014526 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is the Diehard Runs test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * Here is the test description from diehard_tests.txt: * * This is the RUNS test. It counts runs up, and runs down,in a sequence * of uniform [0,1) variables, obtained by floating the 32-bit integers * in the specified file. This example shows how runs are counted: * .123, .357, .789, .425,. 224, .416, .95 * contains an up-run of length 3, a down-run of length 2 and an up-run * of (at least) 2, depending on the next values. The covariance matrices * for the runs-up and runs-down are well-known, leading to chisquare tests * for quadratic forms in the weak inverses of the covariance matrices. * Runs are counted for sequences of length 10,000. This is done ten times, * then repeated. * * Comment * * I modify this the following ways. First, I let the sequence length be * the variable -t (vector length) instead of fixing it at 10,000. This * lets one test sequences that are much longer (entirely possible with * a modern CPU even for a fairly slow RNG). Second, I repeat this for * the variable -s (samples) times, default 100 and not just 10. Third, * because RNG's often have "bad seeds" for which they misbehave, the * individual sequences can be optionally -i reseeded for each sample. * Because this CAN let bad behavior be averaged out to where * it isn't apparent for many samples with few bad seeds, we may need to * plot the actual distribution of p-values for this and other tests where * this option is used. Fourth, it is silly to convert integers into floats * in order to do this test. Up sequences in integers are down sequences in * floats once one divides by the largest integer available to the generator, * period. Integer arithmetic is much faster than float AND one skips the * very costly division associated with conversion. * *======================================================================== */ #include /* * The following are the definitions and parameters for runs, based on * Journal of Applied Statistics v30, Algorithm AS 157, 1981: * The Runs-Up and Runs-Down Tests, by R. G. T. Grafton. * (and before that Knuth's The Art of Programming v. 2). */ #define RUN_MAX 6 /* * a_ij */ static double a[6][6] = { { 4529.4, 9044.9, 13568.0, 18091.0, 22615.0, 27892.0}, { 9044.9, 18097.0, 27139.0, 36187.0, 45234.0, 55789.0}, {13568.0, 27139.0, 40721.0, 54281.0, 67852.0, 83685.0}, {18091.0, 36187.0, 54281.0, 72414.0, 90470.0, 111580.0}, {22615.0, 45234.0, 67852.0, 90470.0, 113262.0, 139476.0}, {27892.0, 55789.0, 83685.0, 111580.0, 139476.0, 172860.0} }; /* * b_i */ static double b[6] = { 1.0/6.0, 5.0/24.0, 11.0/120.0, 19.0/720.0, 29.0/5040.0, 1.0/840.0,}; int diehard_runs(Test **test, int irun) { int i,j,k,t; unsigned int ucount,dcount; int upruns[RUN_MAX],downruns[RUN_MAX]; double uv,dv,up_pks,dn_pks; uint first, last, next = 0; /* * This is just for display. */ test[0]->ntuple = 0; test[1]->ntuple = 0; /* * Clear up and down run bins */ for(k=0;ktsamples;t++) { next = gsl_rng_get(rng); if(verbose){ printf("%d: %10u %u %u\n",t,next,ucount,dcount); } /* * Did we increase? */ if(next > last){ ucount++; if(ucount > RUN_MAX) ucount = RUN_MAX; downruns[dcount-1]++; dcount = 1; } else { dcount++; if(dcount > RUN_MAX) dcount = RUN_MAX; upruns[ucount-1]++; ucount = 1; } last = next; } if(next > first){ ucount++; if(ucount > RUN_MAX) ucount = RUN_MAX; downruns[dcount-1]++; dcount = 1; } else { dcount++; if(dcount > RUN_MAX) dcount = RUN_MAX; upruns[ucount-1]++; ucount = 1; } /* * This ends a single sample. * Compute the test statistic for up and down runs. */ uv=0.0; dv=0.0; if(verbose){ printf(" i upruns downruns\n"); } for(i=0;itsamples*b[i])*(upruns[j] - test[0]->tsamples*b[j])*a[i][j]; dv += ((double)downruns[i] - test[0]->tsamples*b[i])*(downruns[j] - test[0]->tsamples*b[j])*a[i][j]; } } uv /= (double)test[0]->tsamples; dv /= (double)test[0]->tsamples; /* * This NEEDS WORK! It isn't right, somehow... */ up_pks = 1.0 - exp ( -0.5 * uv ) * ( 1.0 + 0.5 * uv + 0.125 * uv*uv ); dn_pks = 1.0 - exp ( -0.5 * dv ) * ( 1.0 + 0.5 * dv + 0.125 * dv*dv ); MYDEBUG(D_DIEHARD_RUNS) { printf("uv = %f dv = %f\n",uv,dv); } test[0]->pvalues[irun] = gsl_sf_gamma_inc_Q(3.0,uv/2.0); test[1]->pvalues[irun] = gsl_sf_gamma_inc_Q(3.0,dv/2.0); MYDEBUG(D_DIEHARD_RUNS) { printf("# diehard_runs(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); printf("# diehard_runs(): test[1]->pvalues[%u] = %10.5f\n",irun,test[1]->pvalues[irun]); } return(0); } ./libdieharder/histogram.c0000664000175000017500000000544413707046103014056 0ustar eddedd/* * $Id: histogram.c 529 2011-04-01 17:49:31Z rgbatduke $ * * See copyright in copyright.h and the accompanying file COPYING * */ /* *======================================================================== * This code displays an ascii "*" histogram of the input e.g. p-value * vector. *======================================================================== */ #include void histogram(double *input,char *pvlabel,int inum,double min,double max,int nbins,char *label) { int i,j,hindex; uint *bin,binmax; double binscale; uint vscale; /* * This is where we put the binned count(s). Make and zero it */ bin = (uint *)malloc(nbins*sizeof(uint)); for(i=0;i= 20*vscale) { vscale++; /* printf("binmax = %u vscale = %u\n",binmax,vscale); */ } /* * Now we just display the histogram, which should be in range to * be displayed. */ for(i=20;i>0;i--){ if(i%2 == 0){ printf("# %5d|",i*vscale); } else { printf("# |"); } for(j=0;j= i*vscale ){ printf("****|"); } else { printf(" |"); } } printf("\n"); } printf("# |--------------------------------------------------\n"); printf("# |"); for(i=0;i double binomial(unsigned int n, unsigned int k, double p) { double pnk; if(verbose > 10){ printf("binomial(): Making binomial p(%d,%d,%f)\n",n,k,p); } pnk = gsl_sf_fact(n)*pow(p,(double)k)*pow((1.0-p),(double)(n-k))/ (gsl_sf_fact(k)*gsl_sf_fact(n-k)); if(verbose > 10){ printf("binomial(): Made binomial p(%d,%d,%f) = %f\n",n,k,p,pnk); } return(pnk); } ./libdieharder/dieharder_test_types.c0000664000175000017500000001046013707046103016265 0ustar eddedd/* * ======================================================================== * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This program initializes a permanent internal vector of pointers to all * the tests known to dieharder that generate a pvalue or vector of * pvalues. With it we abandon our former addressing of tests by source * (the -d, -r, -s testnumber invocation) in favor of a segmented single * number. There is initial room for up to 1000 tests, but this can easily * be increased. * * We define the ranges: * * 0-99 diehard (or Marsaglia & Tsang) based tests. * 100-199 the NIST STS * 200-499 everything else. * 500-999 reserved for future sets of "named" tests if it seems * reasonable to use it that way, or straight expansion * space otherwise. 500 tests will hold us for a while... * * ======================================================================== */ #include void dieharder_test_types() { int i; /* * Null the whole thing for starters */ for(i=0;i int rgb_kstest_test(Test **test, int irun) { uint t,tsamples; double *testvec; tsamples = test[0]->tsamples; testvec = (double *)malloc(tsamples*sizeof(double)); if(verbose == D_RGB_KSTEST_TEST || verbose == D_ALL){ printf("Generating a vector of %u uniform deviates.\n",test[0]->tsamples); } for(t=0;t= 3){ /* * This (Kuiper) can be selected with -k 3 from the command line. * All other values test variants of the regular kstest(). */ test[0]->pvalues[irun] = kstest_kuiper(testvec,tsamples); } else { /* * This (Symmetrized KS) is -k 0,1,2. Default is 0. */ test[0]->pvalues[irun] = kstest(testvec,tsamples); } free(testvec); if(verbose == D_RGB_KSTEST_TEST || verbose == D_ALL){ printf("# rgb_kstest_test(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } /* * I guess we return 0 on normal healthy return */ return(0); } ./libdieharder/rgb_bitdist.c0000664000175000017500000003101313707046103014344 0ustar eddedd/* * ======================================================================== * $Id: diehard_birthdays.c 250 2006-10-10 05:02:26Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This is a test that checks to see if the rng generates bit patterns * (n-tuples) that are distributed correctly (binomially). For example, * for 2-tuples (bit pairs) there are four possibilities: 00, 01, 10, 11. * Each should occur with a probability of 1/4, hence the count of (say) K * 00 bitpairs out of N trials should be distributed (over M samples) * according to the binomial probability p = binomial(N,K,0.25) -- that * is, the expected count for k 00's is M*p(N,K,0.25). * * This test should be more sensitive than just doing a large number of * trials and aggregating all the 00's over all the samples and comparing * the result to the expected mean, as there can be distributions that * have the expected mean of 0.25 that are >>not<< binomially distributed. * * By making a single program capable of doing any n-tuple, we gain * immediate benefit. Both STS and Diehard, for example, contain * tests that validate bit distribution frequencies; however, they typically * do so for specific n-tuples, e.g. 5 in several diehard tests. There * is nothing terribly special about 5, and no point in looking too * hard at e.g. intervals between patterns at 5, since testing pure * frequency at 6 bits simultaneously ensures that all 6 bit patterns have * the correct frequency (since they are sub-patterns of 6 bit patterns * that have the correct frequency, and if they had the INcorrect frequency * the six-bit patterns would as well by inheritance) and (less obviously, * but I'm pretty sure I can prove it) that intervals between the five * bit patterns must also be correct IF the test is satisfied robustly * for various arbitrary test string lengths and sampling counts. * * Anyway, I'm giving this one a shot as it may end up being a one-size * fits all tool for validating bitlevel randomness for any generator, * up to some n-tuple. I expect that 2004/2005 computers will easily * be able to validate through n=8 without really warming up or taking * terribly long (validating the frequency and distribution for e.g. * the entire ascii alphabet at the byte level) and MAY be able to do * actual frequency validation on 16-bit integers. Note that it only takes * a few seconds to generate millions of 32 bit integers with most of * the GSL routines. To get statistically valid results, one needs to * accumulate order of 100 trials per outcome, or test order of millions * of integers and accumulate the results in an outcome vector 64K long. * both of these are well within reach using at most hours of CPU time, * and partitioned on a beowulf might take only minutes or even seconds. * * The latest version of the actual test (below) tests only ONE ntuple, * the value set in the global variable rgb_bitdist_ntuple which must * be a positive integer. The calling program is responsible for e.g. * testing a range of ntuples. * ======================================================================== */ #include #include "static_get_bits.c" int rgb_bitdist(Test **test,int irun) { uint nb; /* number of bits in a tested ntuple */ uint value_max; /* 2^{nb}, basically (max size of nb bit word + 1) */ uint bsamples; /* The number of non-overlapping samples in buffer */ uint value; /* value of sampled ntuple (as a uint) */ uint mask; /* Look for cruft below */ uint b,t,i; /* loop indices? */ uint ri; uint *count,ctotal; /* count of any ntuple per bitstring */ double ntuple_prob,pbin; /* probabilities */ Vtest *vtest; /* A reusable vector of binomial test bins */ /* * Sample a bitstring ntuple in length (exactly). */ if(ntuple>0){ /* * Set test[0]->ntuple to pass back to output() */ test[0]->ntuple = ntuple; nb = ntuple; MYDEBUG(D_RGB_BITDIST){ printf("# rgb_bitdist: Testing ntuple = %u\n",nb); } } else { fprintf(stderr,"Error: Can only test distribution of positive ntuples.\n"); fprintf(stderr," Use -n ntuple for 0 < ntuple.\n"); fprintf(stderr," Read test description with dieharder -d 200 -h.\n"); exit(0); } /* * The largest integer for this ntuple is 2^nb-1 (they range from 0 to * 2^nb - 1). However, this is used to size count and limit loops, so * we use 2^nb and start indices from 0 as usual. */ value_max = (uint) pow(2,nb); MYDEBUG(D_RGB_BITDIST){ printf("# rgb_bitdist(): value_max = %u\n",value_max); } /* * This is the number of bit samples we wish to accumulate per tsample. * It basically determines the length of the bit string we chop up into * ntuples. There is no compelling reason for it to be a power of two, * but why not? Note that in the Old Days (where bsamples came from a * fixed string size) its value was typically e.g. 128/8 = 16 or even less. * We will assume the usual rule of thumb -- there need to be at least * 30 objects in a sample for it to "behave". We'll double this to 64 * as this still leaves us with "reasonable" run times. With nb = 8 (one * byte) this samples 64 byte chunks of the bitstream. */ bsamples = 64; /* * Allocate memory for value_max vector of Vtest structs and counts, * PER TEST. Note that we must free both of these when we are done * or leak. */ vtest = (Vtest *)malloc(value_max*sizeof(Vtest)); count = (uint *)malloc(value_max*sizeof(uint)); /* * This is the probability of getting any given ntuple. For example, * for bit triples, value_max = 2^3 = 8 and each value should occur * with probability 1/8. */ ntuple_prob = 1.0/(double)value_max; MYDEBUG(D_RGB_BITDIST){ printf("# rgb_bitdist(): ntuple_prob = %f\n",ntuple_prob); printf("# rgb_bitdist(): Testing %u samples of %u bit strings\n",test[0]->tsamples,bits); printf("# rgb_bitdist():=====================================================\n"); printf("# rgb_bitdist(): vtest table\n"); printf("# rgb_bitdist(): Outcome bit x y sigma\n"); } tsamples = test[0]->tsamples; /* * Set the mask for bits to be returned. I think that I want to * change routines here over to the sliding window routine. * * The following mask will work OK, but John says that it won't * work unless nb != CHAR_BIT*sizeof(uint), so the loop is a bit * more robust. * * mask = ((1u << nb) - 1); */ mask = 0; for(i = 0; i < nb; i++){ mask |= (1u << nb); } mask = ((1u << nb) - 1); /* * OK, I'm getting to where I think I can manage to fix this test once * and for all. I want to make this test evaluate a counter: * freq[ntup][irun] * that counts how many times ntup occurs in the irunth sample. The * test is then performed on the DISTRIBUTION of this count over all * irun samples. For each irun, we expect to get a binomial * distribution around the expected value of tsamples*ntuple_probl. * * We cannot quite do a straight chisq on this, however. For one * thing, we do not know a priori what the number of degrees of * freedom is for any given ntuple or number of samples. For another, * the asymptotic tails of the distribution have too few member for * Pearson's chisq to be very accurate, although we have just learned * of the "G-test" that is supposedly valid here if we can compute * or estimate the number of degrees of freedom. Or we can do what * Marsaglia frequently does and bundle all counts outside of a * suitable cutoff to be a single bin with the sum probability of the * tail -- which we should be able to compute with the binomial CDF, * I think -- and then either compute chisq using it as a single bin * or (in the case of many of the monkey tests) make this tail the * FOCUS of the test and check to see if the tail is correctly occupied * as a simple normal with the binomial probability. * * In any of the chisq cases, though, I have to have some way of estimating * or computing the number of degrees of freedom. That's the one thing * that is missing, so far. If I get that, the rest should be pretty * easy to do several ways. */ for(i=0;itsamples,bits); printf("# rgb_bitdist():=====================================================\n"); printf("# rgb_bitdist(): vtest table\n"); printf("# rgb_bitdist(): Outcome bit x y sigma\n"); } ri = gsl_rng_uniform_int(rng,value_max); for(i=0;ipvalues[irun] = vtest[i].pvalue; MYDEBUG(D_RGB_BITDIST) { printf("# rgb_bitdist(): test[%u]->pvalues[%u] = %10.5f\n", 0,irun,test[0]->pvalues[irun]); } } Vtest_destroy(&vtest[i]); } free(count); free(vtest); return(0); } ./libdieharder/kstest.cruft0000664000175000017500000001153213707046103014272 0ustar eddedd/* * $Id: kstest.c 223 2006-08-17 06:19:38Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is the Kolmogorov-Smirnov test for uniformity on the interval * [0,1). p-values from a (large) number of independent trials should * be uniformly distributed on the interval [0,1) if the underlying * result is consistent with the hypothesis that the rng in use is * not correlated. Deviation from uniformity is a sign of the failure * of the hypothesis that the generator is "good". Here we simply * input a vector of p-values and a count, and output an overall * p-value for the set of tests. *======================================================================== */ #include double kstest(double *pvalue,int count) { int i,j,k; double y,d,dmax,csqrt; double p,x; /* * We start by sorting the list of pvalues. */ gsl_sort(pvalue,1,count); /* * Here's the test. For each (sorted) pvalue, its index is the * number of values cumulated to the left of it. d is the distance * between that number and the straight line representing a uniform * accumulation. We save the maximum d across all cumulated samples * and transform it into a p-value at the end. */ dmax = 0.0; if(verbose == D_KSTEST || verbose == D_ALL){ printf(" p y d dmax\n"); } for(i=0;i dmax) dmax = d; } csqrt = sqrt(count); x = (csqrt + 0.12 + 0.11/csqrt)*dmax; if(verbose == D_KSTEST || verbose == D_ALL){ printf("Kolmogorov-Smirnov D = %8.3f, evaluating q_ks(%6.2f)\n",dmax,x); } p = q_ks(x); return(p); } double q_ks(double x) { int i,sign; double qsum; double kappa; kappa = -2.0*x*x; sign = -1; qsum = 0.0; for(i=1;i<100;i++){ sign *= -1; qsum += (double)sign*exp(kappa*(double)i*(double)i); if(verbose == D_KSTEST || verbose == D_ALL){ printf("Q_ks %d: %f\n",i,2.0*qsum); } } if(verbose == D_KSTEST || verbose == D_ALL){ printf("Q_ks returning %f\n",2.0*qsum); } return(2.0*qsum); } /* * This is the Kuiper variant of KS, that is a bit more symmetric. */ double kstest_kuiper(double *pvalue,int count) { int i,j,k; double y,v,vmax,vmin,csqrt; double p,x; /* * We start by sorting the list of pvalues. */ if(verbose == D_KSTEST || verbose == D_ALL){ printf("# kstest_kuiper(): Computing Kuiper KS pvalue for:\n"); for(i=0;i vmax) { vmax = v; } else if(v < vmin) { vmin = v; } if(verbose == D_KSTEST || verbose == D_ALL){ printf("%8.3f %8.3f %16.6e %16.6e %16.6e\n",pvalue[i],y,v,vmin,vmax); } } v = fabs(vmax) + fabs(vmin); csqrt = sqrt(count); x = (csqrt + 0.155 + 0.24/csqrt)*v; if(verbose == D_KSTEST || verbose == D_ALL){ printf("Kuiper's V = %8.3f, evaluating q_ks_kuiper(%6.2f)\n",v,x); } p = q_ks_kuiper(x); if(verbose == D_KSTEST || verbose == D_ALL){ if(p < 0.0001){ printf("# kstest_kuiper(): Test Fails! Visually inspect p-values:\n"); for(i=0;i=2, then the lowest and highest bytes will be used, along * with n-2 bytes from the middle. * If the generator's word size is too small, overlapped bytes will * be used. * Current, k=3 and is fixed at compile time. * Use a basic chisq fitting test (chisq_pearson) for the p-value. * Previous version also used a chisq independence test (chisq2d); it * was found to be slightly less sensitive. * I envisioned this test as using a small number of samples and large * number of separate tests. Experiments so far show that keeping -p 1 * and increasing -t performs best. *======================================================================== */ #include #define SAMP_PER_WORD 3 #define SAMP_TOTAL (3*SAMP_PER_WORD) #define TABLE_SIZE (256 * SAMP_TOTAL) int dab_bytedistrib(Test **test,int irun) { Vtest vtest; unsigned int t,i,j; unsigned int counts[TABLE_SIZE]; /* Zero the counters */ memset(counts, 0, sizeof(unsigned int) * TABLE_SIZE); test[0]->ntuple = 0; // Not used currently for(t=0;ttsamples;t++){ for(i=0;i<(SAMP_TOTAL / SAMP_PER_WORD);i++){ /* * Generate a word; this word will be used for SAMP_PER_WORD bytes. */ unsigned int word = gsl_rng_get(rng); unsigned char currentShift = 0; for (j = 0; j < SAMP_PER_WORD; j++) { /* * Shifts: * The "shiftAmount" is how much the word needs to be shifted for the * *next* byte, since the current byte is read before shifting. * The calculation is such that the final byte read is always the most * significant byte. The middle bytes fall as they will. * The calculation is uglier than I wanted, but it handles fractional * shift amounts correctly (at least I think it does; confirmed for * SAMP_PER_WORD==3 and a variety of rmax_bits values). */ unsigned char shiftAmount = ((j+1) * (rmax_bits - 8)) / (SAMP_PER_WORD - 1); unsigned int v = word & 0x0ff; /* v is the byte sampled from the word */ word >>= shiftAmount - currentShift; currentShift += shiftAmount; /* * Increment the appropriate count, faking a 3d array using a 1d array. * This should probably be changed, so that v is the final index and * not j, for clarity. */ counts[v * SAMP_TOTAL + i * SAMP_PER_WORD + j]++; } } } Vtest_create(&vtest, TABLE_SIZE); vtest.ndof = 255 * SAMP_TOTAL; /* * Setup the chisq test, setting the actual and expected values for * each entry. */ for(i=0;itsamples / 256; } Vtest_eval(&vtest); test[0]->pvalues[irun] = vtest.pvalue; Vtest_destroy(&vtest); return(0); } ./libdieharder/rngav.c0000664000175000017500000000715513707046103013177 0ustar eddedd/* * By Bob Jenkins, public domain * * With a 4-term state, results are w, x+stuff, y+stuff, z+stuff, w+stuff. * Make sure we've mixed the state well enough that 1-bit differences at * w are pretty different by the time we report w+stuff. */ #include #include #include #include #include #include typedef unsigned char u1; typedef unsigned long u4; #define BUCKETS 128 #define LOGLEN 16 #define CUTOFF 13.0 typedef struct ranctx { u4 a; u4 b; u4 c; u4 d;} ranctx; #define rot(x,k) ((x<<(k))|(x>>(32-(k)))) static u4 iii, jjj, kkk; static u4 ranval( ranctx *x ) { /* xxx: the generator being tested */ u4 e = x->a - rot(x->b, iii); x->a = x->b ^ rot(x->c, jjj); x->b = x->c + rot(x->d, kkk); x->c = x->d + e; x->d = e + x->a; return x->d; #ifdef NEVER /* yyy: the same generator in reverse */ u4 e = x->d - x->a; x->d = x->c - e; x->c = x->b - rot(x->d, 32-kkk); x->b = x->a ^ rot(x->c, 32-jjj); x->a = e + rot(x->b, 32-iii); return x->d; #endif } static u4 raninit( ranctx *x, u4 seed ) { u4 i, e; x->a = x->b = x->c = 0xf1ea5eed; x->d = seed - x->a; for (i=0; i<20; ++i) { e = ranval(x); } return e; } /* count how many bits are set in a 32-bit integer, returns 0..32 */ static u4 count(u4 x) { u4 c = x; c = (c & 0x55555555) + ((c>>1 ) & 0x55555555); c = (c & 0x33333333) + ((c>>2 ) & 0x33333333); c = (c & 0x0f0f0f0f) + ((c>>4 ) & 0x0f0f0f0f); c = (c & 0x00ff00ff) + ((c>>8 ) & 0x00ff00ff); c = (c & 0x0000ffff) + ((c>>16) & 0x0000ffff); return c; } /* initialize the data collection array */ static void datainit( u4 *data, u4 *data2) { u4 i; for (i=0; i data[i]) { worst = data[i]; } if (worst > 32-data[i]) { worst = 32-data[i]; } if (worst > data2[i]) { worst = data2[i]; } if (worst > 32-data2[i]) { worst = 32-data2[i]; } } worst /= length; if (worst > CUTOFF) { if (print) { printf("iii=%2lu jjj=%2lu kkk=%2lu worst=%14.4f\n", iii, jjj, kkk, (float)worst); } return 1; } else { return 0; } } void driver() { u4 i; u4 data[BUCKETS]; u4 data2[BUCKETS]; ranctx r; (void)raninit(&r, 0); datainit(data, data2); gather(&r, data, data2, (1<<6)); for (i=6; i5, but one would need * to compute the expected overlap integrals (q) for the overlapping * d-spheres in the higher dimensions. Note that in this test there is no * real need to stick to the parameters of Marsaglia. The test by its * nature has three controls: n (the number of points used to sample the * minimum distance) which determines the granularity of the test -- the * approximate length scale probed for an excess of density; p, the usual * number of trials; and d the dimension. As Fischler points out, to * actually resolve problems with a generator that had areas 20% off the * expected density (consistently) in d = 2, n = 8000 (Marsaglia's * parameters) would require around 2500 trials, where p = 100 (the old * test default) would resolve only consistent deviations of around 1.5 * times the expected density. By making both of these user selectable * parameters, dieharder should be able to test a generator pretty much * as thoroughly as one likes subject to the generous constraints * associated with the eventual need for still higher order corrections * as n and p are made large enough. * ======================================================================== */ #include double rgb_mindist_avg; static double rgb_md_Q[] = {0.0,0.0,0.4135,0.5312,0.6202,1.3789}; int compare_points(const dTuple *a,const dTuple *b) { double diff = a->c[0] - b->c[0]; if (diff > 0) return 1; if (diff < 0) return -1; return 0; } double distance(const dTuple a,const dTuple b,uint dim) { int i; double delta,distance = 0.0; for(i = 0;i < dim; i++){ delta = a.c[i] - b.c[i]; distance += delta*delta; } distance = sqrt(distance); return(distance); } int rgb_minimum_distance(Test **test, int irun) { int i,j,d,t; uint rgb_md_dim; /* * These are the vector of points and the current point being * considered. We may or may not need to restructure the vectors * to be able to do the sort. I'm going to TRY to implement * Fischler's suggested algorithm here that is NlogN instead of doing * the straightforward N^2 algorithm, but we'll see. */ dTuple *points; double earg,qarg,dist,mindist,dvolume; rgb_mindist_avg = 0.0; /* * Generate d-tuples of tsamples random coordinates in the range * 0-10000 (which we may have to scale with dimension). Determine * the shortest separation of two points by any means available: * a double loop is simplest and slowest, or we can sort the list * of coordinates on the value of the first coordinate and evaluate * distances for each point only until the distance to the next * coordinate exceeds the minimum found so far, which scales like * the sort (n log n) instead of the double loop (n^2). From this * we generate p from the Fischler form including corrections, * actually computed in place so that e.g. n can be a variable, and * apply the usual KS test over psamples of independent tests, per * dimension. * * Actually, I don't see any particular reason that the d-cube should * be of "length 10000". In fact, it seems pretty obvious that it * should have cube side = 1.0 since we're going to use double precision * floating point variables. Is there some aspect of this test that cares * what the "scale" is? I don't think so. */ points = (dTuple *)malloc(test[0]->tsamples*sizeof(dTuple)); /* * Set this for output. ntuple should be set from the CLI or from * -a(ll) (run_all_tests()). */ test[0]->ntuple = ntuple; rgb_md_dim = test[0]->ntuple; if(verbose == D_RGB_MINIMUM_DISTANCE || verbose == D_ALL){ printf("Generating a list of %u points in %d dimensions\n",test[0]->tsamples,rgb_md_dim); } for(t=0;ttsamples;t++){ /* * Generate a new d-dimensional point in the unit d-cube (with * periodic boundary conditions). */ if(verbose == D_RGB_MINIMUM_DISTANCE || verbose == D_ALL){ printf("points[%u]: (",t); } for(d=0;dtsamples,sizeof(dTuple), (gsl_comparison_fn_t) compare_points); if(verbose == D_RGB_MINIMUM_DISTANCE || verbose == D_ALL){ printf("List of points sorted by first coordinate:\n"); for(t=0;ttsamples;t++){ printf("points[%u]: (",t); for(d=0;dtsamples;i++){ /* * One thing to experiment with here (very much) is * whether or not we need periodic wraparound. For * the moment we omit it, although distributing * the points on a euclidean d-torus seems more symmetric * than not and checks to be sure that points are correct * on or very near a boundary. */ for(j=i+1;jtsamples;j++){ if(points[j].c[0] - points[i].c[0] > mindist) break; dist = distance(points[j],points[i],rgb_md_dim); MYDEBUG(D_RGB_MINIMUM_DISTANCE) { printf("d(%d,%d) = %16.10e\n",i,j,dist); } if( dist < mindist) mindist = dist; } } MYDEBUG(D_RGB_MINIMUM_DISTANCE) { printf("Found rmin = %16.10e\n",mindist); } rgb_mindist_avg += mindist; /* * OK, now we are cooking. We have to DYNAMICALLY CALCULATE * the pvalue using Fischler's formula, not Marsaglia's, with * variables from the calculation. We may put some warnings in * to encourage people to use a minimum number of tsamples. Then * again, we may not -- seems like a research issue, right? * People might well want to experiment without being pestered. */ if((rgb_md_dim % 2) == 0){ dvolume = pow(PI,rgb_md_dim/2)*pow(mindist,rgb_md_dim)/gsl_sf_fact(rgb_md_dim/2); } else { dvolume = 2.0*pow(2.0*PI,(rgb_md_dim-1)/2)*pow(mindist,rgb_md_dim)/gsl_sf_doublefact(rgb_md_dim); } earg = -1.0*test[0]->tsamples*(test[0]->tsamples-1)*dvolume/2.0; qarg = 1.0 + ((2.0+rgb_md_Q[rgb_md_dim])/6.0)*pow(1.0*test[0]->tsamples,3)*dvolume*dvolume; MYDEBUG(D_RGB_MINIMUM_DISTANCE) { printf("V_min = %16.10e, earg = %16.10e, qarg = %16.10e\n",dvolume,earg,qarg); } /* qarg = 1.0; */ test[0]->pvalues[irun] = 1.0 - exp(earg)*qarg; free(points); MYDEBUG(D_RGB_MINIMUM_DISTANCE) { printf("# diehard_2dsphere(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } /* * I guess we return 0 on normal healthy return */ return(0); } ./libdieharder/diehard_birthdays.c0000664000175000017500000002035313707046103015526 0ustar eddedd/* * ======================================================================== * $Id: diehard_birthdays.c 250 2006-10-10 05:02:26Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This is the Diehard Birthdays test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * This is the BIRTHDAY SPACINGS TEST * Choose m birthdays in a year of n days. List the spacings * between the birthdays. If j is the number of values that * occur more than once in that list, then j is asymptotically * Poisson distributed with mean m^3/(4n). Experience shows n * must be quite large, say n>=2^18, for comparing the results * to the Poisson distribution with that mean. This test uses * n=2^24 and m=2^9, so that the underlying distribution for j * is taken to be Poisson with lambda=2^27/(2^26)=2. A sample * of 500 j's is taken, and a chi-square goodness of fit test * provides a p value. The first test uses bits 1-24 (counting * from the left) from integers in the specified file. * Then the file is closed and reopened. Next, bits 2-25 are * used to provide birthdays, then 3-26 and so on to bits 9-32. * Each set of bits provides a p-value, and the nine p-values * provide a sample for a KSTEST. * * Comment * * I'm modifying this test several ways. First, I'm running it on all 32 * 24 bit strings implicit in the variables. We'll do this by rotating * each variable by one bit position in between a simple run of the test. * A full run will therefore be 32 simple (rotated) runs on bits 1-24, and * we can do -p psamples runs to get a final set of p-values to evaluate. *======================================================================== */ #include #define NMS 512 #define NBITS 24 static double lambda; static unsigned int *intervals; static unsigned int nms,nbits,kmax; int diehard_birthdays(Test **test, int irun) { uint i,k,t,m,mnext; uint *js; uint rand_uint[NMS]; double binfreq; /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * We are taking a small step backwards and fixing these * so that they are the old diehard values until we figure * out how to deal with variable argument lists, which may be * never in the CLI version. */ /* Cruft nms = diehard_birthdays_nms; */ nms = NMS; /* Cruft nbits = diehard_birthdays_nbits; */ nbits = NBITS; if(nbits>rmax_bits) nbits = rmax_bits; /* * This is the one thing that matters. We're going to make the * exact poisson distribution we expect below, and lambda has to * be right. lambda = nms^3/4n where n = 2^nbits, which is: * lambda = (2^9)^3/(2^2 * 2^24) = 2^27/2^26 = 2.0 * for Marsaglia's defaults. Small changes in nms make big changes * in lambda, but we can easily pick e.g. nbits = 30, nms = 2048 * lambda = (2^11)^3/2^32 = 2.0 * and get the same test, but with a lot more samples and perhaps a * slightly smoother result. */ lambda = (double)nms*nms*nms/pow(2.0,(double)nbits+2.0); /* * Allocate memory for intervals */ intervals = (unsigned int *)malloc(nms*sizeof(unsigned int)); /* * This should be more than twice as many slots as we really * need for the Poissonian tail. We're going to sample tsamples * times, and we only want to keep the histogram out to where * it has a reasonable number of hits/degrees of freedom, just * like we do with all the chisq's built on histograms. */ kmax = 1; while((binfreq = test[0]->tsamples*gsl_ran_poisson_pdf(kmax,lambda)) > 5) { kmax++; } /* Cruft: printf("binfreq[%u] = %f\n",kmax,binfreq); */ kmax++; /* and one to grow on...*/ /* * js[kmax] is the histogram we increment using the * count of repeated intervals as an index. Clear it. */ js = (unsigned int *)malloc(kmax*sizeof(unsigned int)); for(i=0;itsamples;t++) { /* * Create a list of 24-bit masked rands. This is easy now that * we have get_bit_ntuple(). We use a more or less random offset * of the bitstring, and use one and only one random number * per bitstring, so that our samples are >>independent<<, and average * over any particular bit position used as a starting point with * cyclic/periodic bit wrap. */ memset(rand_uint,0,nms*sizeof(uint)); for(m = 0;m= %u: skipping increment of js[%u]\n",k,kmax,k); } } } /* * Let's sort the result (for fun) and print it out for each bit * position. */ MYDEBUG(D_DIEHARD_BDAY){ printf("#==================================================================\n"); printf("# This is the repeated interval histogram:\n"); for(k=0;kpvalues[irun] = chisq_poisson(js,lambda,kmax,test[0]->tsamples); MYDEBUG(D_DIEHARD_BDAY){ printf("# diehard_birthdays(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } nullfree(intervals); nullfree(js); return(0); } ./libdieharder/rng_XOR.c0000664000175000017500000000465313707046103013400 0ustar eddedd/* *======================================================================== * rng_XOR.c * * This generator takes a list of generators on the dieharder * command line and XOR's their output together. *======================================================================== */ #include /* * This is a special XOR generator that takes a list of GSL * wrapped rngs and XOR's their uint output together to produce * each new random number. Note that it SKIPS THE FIRST ONE which * MUST be the XOR rng itself. So there have to be at least two -g X * stanzas on the command line to use XOR, and if there aren't three * or more it doesn't "do" anything but use the second one. */ static unsigned long int XOR_get (void *vstate); static double XOR_get_double (void *vstate); static void XOR_set (void *vstate, unsigned long int s); typedef struct { /* * internal gsl random number generator vector */ gsl_rng *grngs[GVECMAX]; unsigned int XOR_rnd; } XOR_state_t; static inline unsigned long int XOR_get (void *vstate) { XOR_state_t *state = (XOR_state_t *) vstate; int i; /* * There is always this one, or we are in deep trouble. I am going * to have to decorate this code with error checks... */ state->XOR_rnd = gsl_rng_get(state->grngs[1]); for(i=1;iXOR_rnd ^= gsl_rng_get(state->grngs[i]); } return state->XOR_rnd; } static double XOR_get_double (void *vstate) { return XOR_get (vstate) / (double) UINT_MAX; } static void XOR_set (void *vstate, unsigned long int s) { XOR_state_t *state = (XOR_state_t *) vstate; int i; uint seed_seed; /* * OK, here's how it works. grngs[0] is set to mt19937_1999, seeded * as per usual, and used (ONLY) to see the remaining generators. * The remaining generators. */ state->grngs[0] = gsl_rng_alloc(dh_rng_types[14]); seed_seed = s; gsl_rng_set(state->grngs[0],seed_seed); for(i=1;igrngs[i] = gsl_rng_alloc(dh_rng_types[gnumbs[i]]); gsl_rng_set(state->grngs[i],gsl_rng_get(state->grngs[0])); } } static const gsl_rng_type XOR_type = {"XOR (supergenerator)", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (XOR_state_t), &XOR_set, &XOR_get, &XOR_get_double}; const gsl_rng_type *gsl_rng_XOR = &XOR_type; ./libdieharder/skein_block64.c0000664000175000017500000002111113707046103014503 0ustar eddedd/*********************************************************************** ** ** Implementation of the Skein block functions. ** ** Source code author: Doug Whiting, 2008. ** ** This algorithm and source code is released to the public domain. ** ** Compile-time switches: ** ** SKEIN_USE_ASM -- set bits (256/512/1024) to select which ** versions use ASM code for block processing ** [default: use C for all block sizes] ** ************************************************************************/ #include #include #ifndef SKEIN_USE_ASM #define SKEIN_USE_ASM (0) /* default is all C code (no ASM) */ #endif #ifndef SKEIN_LOOP #define SKEIN_LOOP 001 /* default: unroll 256 and 512, but not 1024 */ #endif #define BLK_BITS (WCNT*64) /* some useful definitions for code here */ #define KW_TWK_BASE (0) #define KW_KEY_BASE (3) #define ks (kw + KW_KEY_BASE) #define ts (kw + KW_TWK_BASE) #ifdef SKEIN_DEBUG #define DebugSaveTweak(ctx) { ctx->h.T[0] = ts[0]; ctx->h.T[1] = ts[1]; } #else #define DebugSaveTweak(ctx) #endif /***************************** Skein_512 ******************************/ #if !(SKEIN_USE_ASM & 512) void Threefish_512_Process_Blocks64(Threefish_512_Ctxt_t *ctx, const u08b_t *input, void *output, size_t blkCnt) { enum { WCNT = SKEIN_512_STATE_WORDS }; #undef RCNT #define RCNT (SKEIN_512_ROUNDS_TOTAL/8) #ifdef SKEIN_LOOP /* configure how much to unroll the loop */ #define SKEIN_UNROLL_512 (((SKEIN_LOOP)/10)%10) #else #define SKEIN_UNROLL_512 (0) #endif #if SKEIN_UNROLL_512 #if (RCNT % SKEIN_UNROLL_512) #error "Invalid SKEIN_UNROLL_512" /* sanity check on unroll count */ #endif size_t r; u64b_t kw[WCNT+4+RCNT*2]; /* key schedule words : chaining vars + tweak + "rotation"*/ #else u64b_t kw[WCNT+4]; /* key schedule words : chaining vars + tweak */ #endif u64b_t X0,X1,X2,X3,X4,X5,X6,X7; /* local copy of vars, for speed */ u64b_t w [WCNT]; /* local copy of input block */ #ifdef SKEIN_DEBUG const u64b_t *Xptr[8]; /* use for debugging (help compiler put Xn in registers) */ Xptr[0] = &X0; Xptr[1] = &X1; Xptr[2] = &X2; Xptr[3] = &X3; Xptr[4] = &X4; Xptr[5] = &X5; Xptr[6] = &X6; Xptr[7] = &X7; #endif Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */ ts[0] = ctx->T[0]; ts[1] = ctx->T[1]; /* precompute the key schedule for this block */ ks[0] = ctx->Key[0]; ks[1] = ctx->Key[1]; ks[2] = ctx->Key[2]; ks[3] = ctx->Key[3]; ks[4] = ctx->Key[4]; ks[5] = ctx->Key[5]; ks[6] = ctx->Key[6]; ks[7] = ctx->Key[7]; ks[8] = ks[0] ^ ks[1] ^ ks[2] ^ ks[3] ^ ks[4] ^ ks[5] ^ ks[6] ^ ks[7] ^ SKEIN_KS_PARITY; ts[2] = ts[0] ^ ts[1]; do { Skein_Get64_LSB_First(w,input,WCNT); /* get input block in little-endian format */ X0 = w[0] + ks[0]; /* do the first full key injection */ X1 = w[1] + ks[1]; X2 = w[2] + ks[2]; X3 = w[3] + ks[3]; X4 = w[4] + ks[4]; X5 = w[5] + ks[5] + ts[0]; X6 = w[6] + ks[6] + ts[1]; X7 = w[7] + ks[7]; input += SKEIN_512_BLOCK_BYTES; Skein_Show_R_Ptr(BLK_BITS,&ctx->h,SKEIN_RND_KEY_INITIAL,Xptr); /* run the rounds */ #define Round512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) \ X##p0 += X##p1; X##p1 = RotL_64(X##p1,ROT##_0); X##p1 ^= X##p0; \ X##p2 += X##p3; X##p3 = RotL_64(X##p3,ROT##_1); X##p3 ^= X##p2; \ X##p4 += X##p5; X##p5 = RotL_64(X##p5,ROT##_2); X##p5 ^= X##p4; \ X##p6 += X##p7; X##p7 = RotL_64(X##p7,ROT##_3); X##p7 ^= X##p6; \ #if SKEIN_UNROLL_512 == 0 #define R512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) /* unrolled */ \ Round512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) \ Skein_Show_R_Ptr(BLK_BITS,&ctx->h,rNum,Xptr); #define I512(R) \ X0 += ks[((R)+1) % 9]; /* inject the key schedule value */ \ X1 += ks[((R)+2) % 9]; \ X2 += ks[((R)+3) % 9]; \ X3 += ks[((R)+4) % 9]; \ X4 += ks[((R)+5) % 9]; \ X5 += ks[((R)+6) % 9] + ts[((R)+1) % 3]; \ X6 += ks[((R)+7) % 9] + ts[((R)+2) % 3]; \ X7 += ks[((R)+8) % 9] + (R)+1; \ Skein_Show_R_Ptr(BLK_BITS,&ctx->h,SKEIN_RND_KEY_INJECT,Xptr); #else /* looping version */ #define R512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) \ Round512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) \ Skein_Show_R_Ptr(BLK_BITS,&ctx->h,4*(r-1)+rNum,Xptr); #define I512(R) \ X0 += ks[r+(R)+0]; /* inject the key schedule value */ \ X1 += ks[r+(R)+1]; \ X2 += ks[r+(R)+2]; \ X3 += ks[r+(R)+3]; \ X4 += ks[r+(R)+4]; \ X5 += ks[r+(R)+5] + ts[r+(R)+0]; \ X6 += ks[r+(R)+6] + ts[r+(R)+1]; \ X7 += ks[r+(R)+7] + r+(R) ; \ ks[r + (R)+8] = ks[r+(R)-1]; /* rotate key schedule */ \ ts[r + (R)+2] = ts[r+(R)-1]; \ Skein_Show_R_Ptr(BLK_BITS,&ctx->h,SKEIN_RND_KEY_INJECT,Xptr); for (r=1;r < 2*RCNT;r+=2*SKEIN_UNROLL_512) /* loop thru it */ #endif /* end of looped code definitions */ { #define R512_8_rounds(R) /* do 8 full rounds */ \ R512(0,1,2,3,4,5,6,7,R_512_0,8*(R)+ 1); \ R512(2,1,4,7,6,5,0,3,R_512_1,8*(R)+ 2); \ R512(4,1,6,3,0,5,2,7,R_512_2,8*(R)+ 3); \ R512(6,1,0,7,2,5,4,3,R_512_3,8*(R)+ 4); \ I512(2*(R)); \ R512(0,1,2,3,4,5,6,7,R_512_4,8*(R)+ 5); \ R512(2,1,4,7,6,5,0,3,R_512_5,8*(R)+ 6); \ R512(4,1,6,3,0,5,2,7,R_512_6,8*(R)+ 7); \ R512(6,1,0,7,2,5,4,3,R_512_7,8*(R)+ 8); \ I512(2*(R)+1); /* and key injection */ R512_8_rounds( 0); #define R512_Unroll_R(NN) ((SKEIN_UNROLL_512 == 0 && SKEIN_512_ROUNDS_TOTAL/8 > (NN)) || (SKEIN_UNROLL_512 > (NN))) #if R512_Unroll_R( 1) R512_8_rounds( 1); #endif #if R512_Unroll_R( 2) R512_8_rounds( 2); #endif #if R512_Unroll_R( 3) R512_8_rounds( 3); #endif #if R512_Unroll_R( 4) R512_8_rounds( 4); #endif #if R512_Unroll_R( 5) R512_8_rounds( 5); #endif #if R512_Unroll_R( 6) R512_8_rounds( 6); #endif #if R512_Unroll_R( 7) R512_8_rounds( 7); #endif #if R512_Unroll_R( 8) R512_8_rounds( 8); #endif #if R512_Unroll_R( 9) R512_8_rounds( 9); #endif #if R512_Unroll_R(10) R512_8_rounds(10); #endif #if R512_Unroll_R(11) R512_8_rounds(11); #endif #if R512_Unroll_R(12) R512_8_rounds(12); #endif #if R512_Unroll_R(13) R512_8_rounds(13); #endif #if R512_Unroll_R(14) R512_8_rounds(14); #endif #if (SKEIN_UNROLL_512 > 14) #error "need more unrolling in Skein_512_Process_Block" #endif } ((u64b_t *) output)[0] = X0; ((u64b_t *) output)[1] = X1; ((u64b_t *) output)[2] = X2; ((u64b_t *) output)[3] = X3; ((u64b_t *) output)[4] = X4; ((u64b_t *) output)[5] = X5; ((u64b_t *) output)[6] = X6; ((u64b_t *) output)[7] = X7; /* * This is a silly fix, perhaps, BUT it shuts up the * compiler warning about doing arithmetic with a void * pointer. I think it will do the same thing the commented * line did, without the warning. */ /* output += SKEIN_512_BLOCK_BYTES; */ unsigned long long int output_tmp = (unsigned long long int) output; output_tmp += SKEIN_512_BLOCK_BYTES; output = (void *) output_tmp; } while (--blkCnt); } #if defined(SKEIN_CODE_SIZE) || defined(SKEIN_PERF) size_t Skein_512_Process_Block_CodeSize(void) { return ((u08b_t *) Skein_512_Process_Block_CodeSize) - ((u08b_t *) Skein_512_Process_Block); } uint_t Skein_512_Unroll_Cnt(void) { return SKEIN_UNROLL_512; } #endif #endif ./libdieharder/sts_monobit.c0000664000175000017500000000737413707046103014425 0ustar eddedd/* * ======================================================================== * $Id: sts_monobit.c 237 2006-08-23 01:33:46Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * See also accompanying file STS.COPYING * ======================================================================== */ /* * ======================================================================== * This is a the monobit test, rewritten from the description in the * STS suite. * * Rewriting means that I can standardize the interface to gsl-encapsulated * routines more easily. It also makes this my own code. * * The #if'd code below is from David Bauer, and is a bit difficult to * read (which ordinarily would be sufficient grounds for not using it, * according to my usual standards for non-obfuscating code). It is, * however, 12% faster as it does the summing up of 1's vs 0's using * bitshifts and masks (faster operations than looped C sums). You can * turn on the old code if you like, but we'll leave the default "fast". * * NOBITS = 0 means "use the fast bitmask code", where * NOBITS = 1 should turn the linear/obvious C code back on. * ======================================================================== */ #include #define NOBITS 0 int sts_monobit(Test **test, int irun) { int i; uint blens,nbits; Xtest ptest; /* * for display only. 1 means monobit tests 1-tuples. */ test[0]->ntuple = 1; /* * ptest.x contains n_1's - n_0's = n_1's - (nbits - n_1's) * or ptest.x = 2*n_1's - nbits; * ptest.y is the number we expect (2*n_1's = nbits, so ptest.y = 0) * ptest.sigma is the expected error, 1/sqrt(nbits). * * Note that the expected distribution is the "half normal" centered * on 0.0. I need to figure out if this is responsible for the 1/sqrt(2) * in the pvalue = erfc(|y - x|/(sqrt(2)*sigma)). * * Another very useful thing to note is that we don't really need to * do "samples" here. Or rather, we could -- for enough bits, the * distribution of means should be normal -- but we don't. * */ /* * The number of bits per random integer tested. */ blens = rmax_bits; nbits = blens*test[0]->tsamples; ptest.y = 0.0; ptest.sigma = sqrt((double)nbits); /* * NOTE WELL: This can also be done by reading in a file! Note * that if -b bits is specified, size will be "more than enough". */ MYDEBUG(D_STS_MONOBIT) { printf("# rgb_bitdist(): Generating %lu bits in bitstring",test[0]->tsamples*sizeof(uint)*8); } ptest.x = 0; for(i=0;itsamples;i++) { #if NOBITS bitstring = gsl_rng_get(rng); #else uint n = gsl_rng_get(rng); #endif MYDEBUG(D_STS_MONOBIT) { #if NOBITS printf("# rgb_bitdist() (nobits): rand_int[%d] = %u = ",i,bitstring); dumpbits(&bitstring,8*sizeof(uint)); #else printf("# rgb_bitdist() (bits): rand_int[%d] = %u = ",i,n); dumpbits(&n,8*sizeof(uint)); #endif } #if NOBITS for(b=0;b>= 1; ptest.x += bit; } #else n -= (n >> 1) & 0x55555555; n = (n & 0x33333333) + ((n >> 2) & 0x33333333); n = (n + (n >> 4)) & 0x0f0f0f0f; if(0) { n = (n * 0x01010101) >> 24; } else { n = n + (n >> 8); n = (n + (n >> 16)) & 0x3f; } ptest.x += n; #endif } ptest.x = 2*ptest.x - nbits; MYDEBUG(D_STS_MONOBIT) { printf("mtext.x = %10.5f ptest.sigma = %10.5f\n",ptest.x,ptest.sigma); } Xtest_eval(&ptest); test[0]->pvalues[irun] = ptest.pvalue; MYDEBUG(D_STS_MONOBIT) { printf("# sts_monobit(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } return(0); } ./libdieharder/marsaglia_tsang_gcd.c0000664000175000017500000003142513707046103016030 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * Marsaglia and Tsang GCD Test * * 10^7 tsamples (default) of uint rands u, v are generated and two * statistics are generated: their greatest common divisor (GCD) (w) * and the number of steps of Euclid's Method required to find it * (k). Two tables of frequencies are thus generated -- one for the * number of times each value for k in the range 0 to 41 (with counts * greater than this range lumped in with the endpoints). * The other table is the frequency of occurrence of each GCD w. * k is be distributed approximately binomially, but this is useless for * the purposes of performing a stringent test. Instead four "good" * RNGs (gfsr4,mt19937_1999,rndlxs2,taus2) were used to construct a * simulated table of high precision probabilities for k (a process that * obviously begs the question as to whether or not THESE generators * are "good" wrt the test. At any rate, they produce very similar tables * and pass the test with each other's tables (and are otherwise very * different RNGs). The table of probabilities for the gcd distribution is * generated dynamically per test (it is easy to compute). Chisq tests * on both of these binned distributions yield two p-values per test, * and 100 (default) p-values of each are accumulated and subjected to * final KS tests and displayed in a histogram. *======================================================================== */ #include /* * Include inline uint generator */ #include "static_get_bits.c" /* * This determines the number of samples that go into building the kprob[] * table. */ #define KCNT 1000000000000L #define KTBLSIZE 41 /* * This table is the result of "extensive simulation" with RNGs believed * to be "the best of show" -- good ones according to the GSL and the * other dieharder tests. Eventually it will be based on roughly * 10^12 samples each from mt19937_1999, ranlxd2, gfsr4, and taus2 * (presuming that all of them produce mean probabilities that * are both normally distributed and overlapping for each number). * * This SHOULD result in all four of these generators passing * easily for the more common 10^7 steps per run and 100 runs * (10^9 total samples) which begs the question, maybe, dunno. */ /* * 1000000000 passes through mt19937_1999 produce this table double kprob[41] = { 0.00000000e+00, 9.00000000e-09, 6.10000000e-08, 4.64000000e-07, 2.97000000e-06, 1.44620000e-05, 5.89260000e-05, 2.06560000e-04, 6.29030000e-04, 1.67947700e-03, 3.99509000e-03, 8.51673000e-03, 1.63520170e-02, 2.84309990e-02, 4.49361310e-02, 6.47695460e-02, 8.53523910e-02, 1.03000804e-01, 1.14058597e-01, 1.16057281e-01, 1.08529716e-01, 9.33552020e-02, 7.38878410e-02, 5.38052490e-02, 3.60252240e-02, 2.21585000e-02, 1.25080210e-02, 6.47410800e-03, 3.07120300e-03, 1.32867000e-03, 5.22293000e-04, 1.88175000e-04, 6.06610000e-05, 1.75190000e-05, 4.72500000e-06, 1.09300000e-06, 2.21000000e-07, 2.90000000e-08, 3.00000000e-09, 2.00000000e-09, 0.00000000e+00 }; */ /* * 1000000000 passes through gfsr4 produce this table double kprob[41] = { 0.00000000e+00, 2.00000000e-09, 5.60000000e-08, 4.88000000e-07, 2.93600000e-06, 1.41980000e-05, 5.87710000e-05, 2.06463000e-04, 6.28227000e-04, 1.67945800e-03, 3.99414700e-03, 8.51530300e-03, 1.63522620e-02, 2.84365590e-02, 4.49312500e-02, 6.47630060e-02, 8.53330790e-02, 1.02999632e-01, 1.14062682e-01, 1.16051639e-01, 1.08537040e-01, 9.33631650e-02, 7.38971760e-02, 5.37974130e-02, 3.60227920e-02, 2.21610450e-02, 1.25156100e-02, 6.47749100e-03, 3.07318400e-03, 1.32887900e-03, 5.23531000e-04, 1.87855000e-04, 6.08240000e-05, 1.77430000e-05, 4.71300000e-06, 1.10000000e-06, 2.40000000e-07, 3.60000000e-08, 5.00000000e-09, 0.00000000e+00, 0.00000000e+00 }; */ /* * 1000000000 passes through ranlxd2 produce this table double kprob[41] = { 0.00000000e+00, 1.00000000e-09, 5.70000000e-08, 4.87000000e-07, 2.96000000e-06, 1.44010000e-05, 5.93860000e-05, 2.06081000e-04, 6.27411000e-04, 1.68188600e-03, 3.99561800e-03, 8.51950500e-03, 1.63582570e-02, 2.84329560e-02, 4.49402540e-02, 6.47584160e-02, 8.53356540e-02, 1.02996361e-01, 1.14069062e-01, 1.16032478e-01, 1.08535610e-01, 9.33725140e-02, 7.38923460e-02, 5.37952690e-02, 3.60179830e-02, 2.21606850e-02, 1.25166100e-02, 6.47897800e-03, 3.07285400e-03, 1.32957500e-03, 5.24012000e-04, 1.88015000e-04, 6.05240000e-05, 1.78120000e-05, 4.61000000e-06, 1.09400000e-06, 2.26000000e-07, 4.60000000e-08, 6.00000000e-09, 0.00000000e+00, 0.00000000e+00 }; */ /* * 1000000000 passes through taus2 produce this table double kprob[41] = { 0.00000000e+00, 1.00000000e-08, 5.90000000e-08, 4.69000000e-07, 2.89800000e-06, 1.43030000e-05, 5.90690000e-05, 2.06573000e-04, 6.27223000e-04, 1.67981400e-03, 3.99532600e-03, 8.51784800e-03, 1.63539980e-02, 2.84268470e-02, 4.49374280e-02, 6.47643620e-02, 8.53356470e-02, 1.03006610e-01, 1.14052510e-01, 1.16046884e-01, 1.08547672e-01, 9.33837210e-02, 7.38873400e-02, 5.37986890e-02, 3.60130290e-02, 2.21577570e-02, 1.25135350e-02, 6.47871400e-03, 3.06750200e-03, 1.32797700e-03, 5.24629000e-04, 1.86837000e-04, 6.07010000e-05, 1.79740000e-05, 4.64900000e-06, 1.14000000e-06, 2.17000000e-07, 2.90000000e-08, 9.00000000e-09, 0.00000000e+00, 1.00000000e-09 }; */ /* * This is the full scale table -- something like 10^11 samples went into * building it, using all four "good" rng's above. */ double kprob_orig[41] = { 0.00000000e+00, 5.04750000e-09, 6.02750000e-08, 4.85600000e-07, 2.95277750e-06, 1.44486175e-05, 5.90652150e-05, 2.06498620e-04, 6.27678690e-04, 1.67988137e-03, 3.99620540e-03, 8.51586863e-03, 1.63523276e-02, 2.84322640e-02, 4.49370192e-02, 6.47662520e-02, 8.53358330e-02, 1.03002036e-01, 1.14069579e-01, 1.16043292e-01, 1.08530910e-01, 9.33655294e-02, 7.38958017e-02, 5.38017783e-02, 3.60191431e-02, 2.21585513e-02, 1.25137621e-02, 6.47848384e-03, 3.06968758e-03, 1.32847777e-03, 5.23845965e-04, 1.87623133e-04, 6.08442950e-05, 1.77866925e-05, 4.65595750e-06, 1.09139000e-06, 2.26025000e-07, 4.06075000e-08, 6.64500000e-09, 9.07500000e-10, 9.00000000e-11 }; double kprob1[KTBLSIZE] = { 0.0, 6.05359673641e-09, 5.89061528581e-08, 4.8032961797e-07, 2.95718200574e-06, 1.44296791438e-05, 5.90975396473e-05, 0.000206532422501, 0.000627402914834, 0.00167920626739, 0.00399624579679, 0.00851591071312, 0.0163514101916, 0.0284297291721, 0.0449405030918, 0.0647657727973, 0.0853352192988, 0.103003382707, 0.114073939881, 0.116038943668, 0.108533219692, 0.0933620445648, 0.0739014379387, 0.053795814061, 0.0360227392605, 0.022158237645, 0.0125126319501, 0.00647749635542, 0.00306979287487, 0.00132933422023, 0.000524417963001, 0.000187318073629, 6.04786910257e-05, 1.77870970261e-05, 4.671746866e-06, 1.06613151754e-06, 2.33296304995e-07, 4.00468707178e-08, 9.08039510462e-09, 6.98491931124e-10, 0}; double kprob[KTBLSIZE] = { 0.0, 5.39e-09, 6.077e-08, 4.8421e-07, 2.94869e-06, 1.443266e-05, 5.908569e-05, 0.00020658047, 0.00062764766, 0.00167993762, 0.00399620143, 0.00851629626, 0.01635214339, 0.02843154488, 0.04493723812, 0.06476525706, 0.08533638862, 0.1030000214, 0.11407058851, 0.11604146948, 0.10853040184, 0.09336837411, 0.07389607162, 0.05380182248, 0.03601960159, 0.02215902902, 0.01251328472, 0.00647884418, 0.00306981507, 0.00132828179, 0.00052381841, 0.00018764452, 6.084138e-05, 1.779885e-05, 4.66795e-06, 1.09504e-06, 2.2668e-07, 4.104e-08, 6.42e-09, 8.4e-10, 1.4e-10 }; double kprob2[KTBLSIZE] = { 0.0, 5.213e-09, 6.0704e-08, 4.8521e-07, 2.95083e-06, 1.4447958e-05, 5.9070059e-05, 0.000206521906, 0.000627679842, 0.001679797186, 0.003996414492, 0.008515785524, 0.016352439788, 0.028432147703, 0.044937745833, 0.064765999943, 0.085335932168, 0.103001938773, 0.114069284452, 0.116042509045, 0.108530663851, 0.093367044789, 0.073896153625, 0.053801064832, 0.036018738358, 0.022158331272, 0.012513639927, 0.006478573777, 0.003069820497, 0.001328600857, 0.000523884717, 0.000187620922, 6.0831732e-05, 1.7787961e-05, 4.66037e-06, 1.090656e-06, 2.26719e-07, 4.1078e-08, 6.431e-09, 8.8e-10, 1.2e-10,}; int marsaglia_tsang_gcd(Test **test, int irun) { unsigned long long int t,ktbl[KTBLSIZE]; uint i,j,k,u,v,w; static uint *gcd = 0; static double gnorm = 6.0/(PI*PI); static uint gtblsize = 0; Vtest vtest_k,vtest_u; /* * For output only */ test[0]->ntuple = 0; test[1]->ntuple = 0; /* Make data tables for one-time entry -- do not delete. uint nbin = 50; double pbin = 0.376; printf("double kprob[%u] = {\n",KTBLSIZE); printf(" %10.8f",gsl_ran_binomial_pdf(0,pbin,nbin)); for(i=1;i 10 * (arbitrary cutoff). We don't free this on exit, but then, we only * allocate it once so it should be OK. */ if(gtblsize == 0) { gtblsize = sqrt((double)test[0]->tsamples*gnorm/100.0); /* printf("gtblsize = %u\n",gtblsize); */ } if(gcd == 0) gcd = (uint *)malloc(gtblsize*sizeof(uint)); memset(gcd,0,gtblsize*sizeof(uint)); memset(ktbl,0,KTBLSIZE*sizeof(unsigned long long int)); Vtest_create(&vtest_k,KTBLSIZE); Vtest_create(&vtest_u,gtblsize); /* exit(0); */ MYDEBUG(D_MARSAGLIA_TSANG_GCD) { printf("# user_marsaglia_tsang_gcd(): Beginning gcd test\n"); } /* for(t=0;ttsamples;t++){ /* Initialize counter for this sample */ k = 0; /* Get nonzero u,v */ do{ u = get_rand_bits_uint(32,0xffffffff,rng); } while(u == 0); do{ v = get_rand_bits_uint(32,0xffffffff,rng); } while(v == 0); do{ w = u%v; u = v; v = w; k++; } while(v>0); /* * We just need test[0]->tsamples*c/u^2 to be greater than about 10, the * cutoff built into Vtest_eval() For test[0]->tsamples = 10^7, turns out that * gtblsize < sqrt((double)test[0]->tsamples*gnorm/10.0) (about 780) should be just * about right. We lump all counts larger than that into "the tail", * which MUST be included in the chisq targets down below. */ if(u>=gtblsize) u = gtblsize-1; if(u KTBLSIZE only because that's what we did generating * the table... */ k = (k>KTBLSIZE-1)?KTBLSIZE-1:k; ktbl[k]++; } /* * This is where I formulate my own probability table, using * a mix of the best RNGs I have available. Of course this ultimately * begs many questions... * printf("double kprob[KTBLSIZE] = {\n"); for(i=0;itsamples*kprob[i]; MYDEBUG(D_MARSAGLIA_TSANG_GCD) { printf(" %2u\t%f\t%f\t%f\n",i,vtest_k.x[i],vtest_k.y[i],vtest_k.x[i]-vtest_k.y[i]); } } /* * We will probably turn this into a table, but it isn't that expensive in the * short run as is. */ for(i=0;i1){ vtest_u.x[i] = (double)gcd[i]; if(i == gtblsize-1){ /* This should be close enough to convergence */ for(j=i;j<100000;j++){ vtest_u.y[i] += test[0]->tsamples*gnorm/(1.0*j*j); } /* printf(" %2u\t%f\t%f\t%f\n",i,vtest_u.x[i],vtest_u.y[i],vtest_u.x[i]-vtest_u.y[i]); */ } else { vtest_u.y[i] = test[0]->tsamples*gnorm/(i*i); } } else { vtest_u.x[i] = 0.0; vtest_u.y[i] = 0.0; } MYDEBUG(D_MARSAGLIA_TSANG_GCD) { printf(" %2u\t%f\t%f\t%f\n",i,vtest_u.x[i],vtest_u.y[i],vtest_u.x[i]-vtest_u.y[i]); } } /* * Evaluate test statistics for this run */ Vtest_eval(&vtest_k); Vtest_eval(&vtest_u); test[0]->pvalues[irun] = vtest_k.pvalue; test[1]->pvalues[irun] = vtest_u.pvalue; MYDEBUG(D_MARSAGLIA_TSANG_GCD) { printf("# diehard_runs(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); printf("# diehard_runs(): test[1]->pvalues[%u] = %10.5f\n",irun,test[1]->pvalues[irun]); } Vtest_destroy(&vtest_k); Vtest_destroy(&vtest_u); MYDEBUG(D_MARSAGLIA_TSANG_GCD){ printf("# marsaglia_tsang_gcd(): ks_pvalue_k[%u] = %10.5f ks_pvalue_w[%u] = %10.5f\n",kspi,ks_pvalue[kspi],kspi,ks_pvalue2[kspi]); } kspi++; return(0); } ./libdieharder/rng_dev_arandom.c0000664000175000017500000000263513707046103015205 0ustar eddedd/* * dev_arandom * * See copyright in copyright.h and the accompanying file COPYING * */ #include static unsigned long int dev_arandom_get (void *vstate); static double dev_arandom_get_double (void *vstate); static void dev_arandom_set (void *vstate, unsigned long int s); typedef struct { FILE *fp; } dev_arandom_state_t; static unsigned long int dev_arandom_get (void *vstate) { dev_arandom_state_t *state = (dev_arandom_state_t *) vstate; unsigned long int j; if(state->fp != NULL) { fread(&j,sizeof(j),1,state->fp); return j; } else { fprintf(stderr,"Error: /dev/arandom not open. Exiting.\n"); exit(0); } } static double dev_arandom_get_double (void *vstate) { return dev_arandom_get (vstate) / (double) UINT_MAX; } static void dev_arandom_set (void *vstate, unsigned long int s) { dev_arandom_state_t *state = (dev_arandom_state_t *) vstate; if ((state->fp = fopen("/dev/arandom","r")) == NULL) { fprintf(stderr,"Error: Cannot open /dev/arandom, exiting.\n"); fprintf(stderr,"/dev/arandom may only be available on BSD systems.\n"); exit(0); } return; } static const gsl_rng_type dev_arandom_type = {"/dev/arandom", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (dev_arandom_state_t), &dev_arandom_set, &dev_arandom_get, &dev_arandom_get_double}; const gsl_rng_type *gsl_rng_dev_arandom = &dev_arandom_type; ./libdieharder/bits.c0000664000175000017500000012006113707046103013013 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include /* * This should be the only tool we use to access bit substrings * from now on. Note that we write our own bitstring access tools * instead of using ldap's LBER (Basic Encoding Rules) library call * to both retain control and because it would introduce a slightly * exotic dependency in the resulting application. * * bstring is a pointer to the uint string to be parsed. It is a uint * pointer to make it easy to pass arbitrary strings which will generally * be e.g. unsigned ints in dieharder but might be other data types * in other applications (might as well make this semi-portable while I'm * writing it at all). bslen is the length of bitstring in uints. blen is * the length of the bitstring to be returned (as an unsigned int) and has * to be less than the length, in bits, of bitstring. Finally, boffset * is the bit index of the point in the bitstring from which the result * will be returned. * * The only other thing that has to be defined is the direction from which * the bit offset and bit length are counted. We will make the * LEAST significant bit offset 0, and take the string from the direction * of increasing signicance. Examples: * * bitstring: 10010110, length 1 (byte, char). * for offset 0, length 4 this should return: 0110 * offset 1, length 4: 1011 * offset 5, length 4: 0100 (note periodic wraparound) * offset 6, length 4: 1010 (ditto) * * where of course the strings are actually returned as e.g. * 00000000000000000000000000000110 (unsigned int). */ unsigned int get_bit_ntuple(unsigned int *bitstring,unsigned int bslen,unsigned int blen,unsigned int boffset) { unsigned int b,rlen; int ioffset; unsigned int result,carry,nmask; /* * Some tests for failure or out of bounds. 8*blen has to be less than * sizeof(uint). */ if(blen > 8*sizeof(unsigned int)) blen = 8*sizeof(unsigned int); /* * Now that blen is sane, we can make a mask for the eventual return * value of length blen. */ nmask = 1; /* dumpbits(&nmask,32); */ for(b=0;b> 1; if(verbose == D_BITS || verbose == D_ALL){ printf("Shifted result = "); dumpbits(&result,32); } /* * rlen is the cumulated length of result. Initially, it is set to * rmax_bits - boffset, the number of bits result can now contribute from * boffset. We now have to loop, adding bits from uints up the list * (cyclic) until we get enough to return blen. Note that we have to * loop because (for example) blen = 32, rmax_bits = 16, boffset = 30 * would start in bitstring[2] and get 2 bits (30 and 31), get all 16 bits * from bitstring[1], and still need 12 bits of bitstring[0] to return. */ rlen = rmax_bits - boffset; if(verbose == D_BITS || verbose == D_ALL){ printf("Cumulated %u signifcant bits\n",rlen); } while(blen > rlen){ /* * If we get here, we have to use either bitstring[ioffset-1] or * bitstring[bslen-1], shifted and filled into result starting * at the correct slot. Put this into carry to work on. */ ioffset--; if(ioffset < 0) ioffset = bslen-1; carry = bitstring[ioffset]; if(verbose == D_BITS || verbose == D_ALL){ printf("bitstring[%d] = %u\n",ioffset,carry); printf("Next carry = "); dumpbits(&carry,32); } /* * This is tricky! Shift carry left until the first bit lines * up with the first empty bit in result, which we'll hope is * the current rlen bit. */ for(b=0;b 8*sizeof(unsigned int)) { nbits = 8*sizeof(unsigned int); } mask = (unsigned int)pow(2,nbits-1); for(i=0;i> 1; } } /* * dumpbitwin is being rewritten to dump the rightmost nbits * from a uint, only. */ void dumpbitwin(unsigned int data, unsigned int nbits) { while (nbits > 0){ printf("%d",(data >> (nbits-1)) & 1); nbits--; } } void dumpuintbits(unsigned int *data, unsigned int nuints) { unsigned int i; printf("|"); for(i=0;i> 1; result += rbit*lmask; *data = result; if(verbose){ printf(" Rotated int: "); dumpbits(data,32); } } /* * This is still a good idea, but we have to modify it so that it ONLY * gets VALID bits by their absolute index. */ int get_bit(unsigned int *rand_uint, unsigned int n) { unsigned int index,offset,mask; /* * This routine is designed to get the nth VALID bit of an input uint * *rand_int. The indexing is a bit tricky. index tells us which vector * element contains the bit being sought: */ index = (int) (n/rmax_bits); /* * Then we have to compute the offset of the bit desired, starting from * the first significant/valid bit in the unsigned int. */ offset = (8*sizeof(unsigned int) - rmax_bits) + n%rmax_bits; mask = (int)pow(2,8*sizeof(unsigned int) - 1); mask = mask>>offset; if(mask & rand_uint[index]){ return(1); } else { return(0); } } int get_int_bit(unsigned int i, unsigned int n) { unsigned int mask; /* * This routine gets the nth bit of the unsigned int i. It does very * limited checking to ensure that n is in the range 0-sizeof(uint) * Note */ if(n < 0 || n > 8*sizeof(unsigned int)){ fprintf(stderr,"Error: bit offset %u exceeds length %lu of uint.\n",n,8*sizeof(unsigned int)); exit(0); } /* * Then we have make a mask and shift it over from the first (least * significant) bit in the unsigned int. AND the result with i and * we're done. */ mask = 1; mask = mask< 8*sizeof(unsigned int)) { nbits = 8*sizeof(unsigned int); } mask = 1; for(i=0;i 31 || bstop < bstart){ printf("b_umask() error: bstart <= bstop must be in range 0-31.\n"); exit(0); } blen = bstop-bstart+1; /* * Create blen 1's on right */ mask = 1; for(b=1;b 31 || bstop < bstart){ printf("b_umask() error: bstart <= bstop must be in range 0-31.\n"); exit(0); } if(boffset < 0 || boffset > 31){ printf("b_window() error: boffset must be in range 0-31.\n"); exit(0); } shift = bstart - boffset; /* dumpbits(&input,sizeof(uint)*CHAR_BIT); */ mask = b_umask(bstart,bstop); /* dumpbits(&mask,sizeof(uint)*CHAR_BIT); */ output = input & mask; /* dumpbits(&output,sizeof(uint)*CHAR_BIT); */ if(shift>0){ output = output << shift; } else { output = output >> (-shift); } /* dumpbits(&output,sizeof(uint)*CHAR_BIT); */ return output; } /* * Rotate the uint left (with periodic BCs) */ unsigned int b_rotate_left(unsigned int input,unsigned int shift) { unsigned int tmp; dumpbits(&input,sizeof(unsigned int)*CHAR_BIT); tmp = b_window(input,0,shift-1,32-shift); dumpbits(&tmp,sizeof(unsigned int)*CHAR_BIT); input = input << shift; dumpbits(&input,sizeof(unsigned int)*CHAR_BIT); input += tmp; dumpbits(&input,sizeof(unsigned int)*CHAR_BIT); return input; } /* * Rotate the uint right (with periodic BCs) */ unsigned int b_rotate_right(unsigned int input, unsigned int shift) { unsigned int tmp; if(shift == 0) return(input); MYDEBUG(D_BITS) { printf("Rotate right %d\n",shift); dumpbits(&input,sizeof(unsigned int)*CHAR_BIT);printf("|"); } tmp = b_window(input,32-shift,31,0); MYDEBUG(D_BITS) { dumpbits(&tmp,sizeof(unsigned int)*CHAR_BIT);printf("\n"); } input = input >> shift; MYDEBUG(D_BITS) { dumpbits(&input,sizeof(unsigned int)*CHAR_BIT);printf("|"); } input += tmp; MYDEBUG(D_BITS) { dumpbits(&input,sizeof(unsigned int)*CHAR_BIT);printf("\n\n"); } return(input); } /* * OK, with this all in hand, we can NOW write routines to return * pretty much any sort of string of bits from the prevailing rng * without too much effort. Let's get an ntuple from a uint vector * of arbitrary length and offset, with cyclic boundary conditions. * * We have to pack the answer into the LEAST significant bits in the * output vector, BTW, not the MOST. That is, we have to fill the * output window all the way to the rightmost bit. Tricky. * * I think that I can make this 2-3 times faster than it is by using * John E. Davis's double buffering trick. In context, it would be: * 1) Limit return size to e.g. 32 bits. I think that this is fair; * for the moment I can't see needing more than a uint return, but it * would be easy enough to generate an unsigned long long (64 bit) * uint return if we ever get to where it would help. For example, * by calling this routine twice if nothing else. * 2) Pad the input buffer by cloning the first uint onto the end * to easily manage the wraparound. * 3) Use a dynamic buffer to rightshift directly into alignment * with rightmost part of output. * 4) IF NECESSARY Use a dynamic buffer to leftshift from the previous * word into alignment with the rightmost in the output. * 5) Mask the two parts and add (or logical and) them. * 6) Return. Note that the contents of the starting buffer do not * change, and the two dynamic buffers are transient. * * BUT, we're not going to mess with that NOW unless we must. The routine * below is AFAIK tested and reliable, if not optimal. */ void get_ntuple_cyclic(unsigned int *input,unsigned int ilen, unsigned int *output,unsigned int jlen,unsigned int ntuple,unsigned int offset) { /* important bitlevel indices */ int i,j,bs,be,bu,br1,br2; /* counter of number of bits remaining to be parsed */ int bleft; /* * Now we set all the bit indices. */ bu = sizeof(unsigned int)*CHAR_BIT; /* index/size of uint in bits */ bs = offset%bu; /* starting bit */ be = (offset + ntuple)%bu; /* ending bit */ if(be == 0) be = bu; /* point PAST end of last bit */ br1 = be - bs; /* For Rule 1 */ br2 = bu - bs; /* For Rule 2 */ MYDEBUG(D_BITS) { printf("bu = %d, bs = %d, be = %d, br1 = %d, br2 = %d\n", bu,bs,be,br1,br2); } /* * Set starting i (index of uint containing last bit) and j (the last * index in output). We will impose periodic wraparound on i inside the * main loop. */ i = (offset+ntuple)/bu; j = jlen - 1; if(be == bu) i--; /* Oops. be is whole line exactly */ i = i%ilen; /* Periodic wraparound on start */ MYDEBUG(D_BITS) { printf("i = %d, j = %d\n",i,j); } /* * Always zero output */ memset(output,0,jlen*sizeof(unsigned int)); /* * Number of bits left to parse out */ bleft = ntuple; /* * First we handle the trivial short cases -- one line of input * mapping to one line of output. These are cases that are very * difficult for the rules below to catch correctly, as they presume * at least one cycle of the Right-Left rules. */ /* * Start with all cases where the input lives on a single line and runs * precisely to the end (be = bu). Apply Rule 2 to terminate. That way * Rule 2 below can be CERTAIN that it is being invoked after a right * fill (only). */ if(bleft == br2) { MYDEBUG(D_BITS) { printf("Rule 2a: From input[%d] to output[%d] = ",i,j); } output[j] += b_window(input[i],bs,bu-1,bu-br2); bleft -= br2; MYDEBUG(D_BITS) { dumpuintbits(&output[j],1);printf("\n"); printf("bleft = %d\n",bleft); printf("Rule 2a: terminate.\n"); } } /* * Similarly, resolve all cases where the input lives on a single line * and runs from start to finish within the line (so e.g. be <= bu-1, * bs >= 0). */ if(bleft == br1) { MYDEBUG(D_BITS) { printf("Rule 1a: From input[%d] to output[%d] = ",i,j); } output[j] = b_window(input[i],bs,be-1,bu-bleft); bleft -= br1; MYDEBUG(D_BITS) { dumpuintbits(&output[j],1);printf("\n"); printf("bleft = %d\n",bleft); printf("Rule 1a: terminate.\n"); } } while(bleft > 0){ /* * Rule 1 */ if(bleft == br1) { MYDEBUG(D_BITS) { printf("Rule 1: From input[%d] to output[%d] = ",i,j); } output[j] = b_window(input[i],bs,be-1,bu-bleft); bleft -= br1; MYDEBUG(D_BITS) { dumpuintbits(&output[j],1);printf("\n"); printf("bleft = %d\n",bleft); printf("Rule 1: terminate.\n"); } break; /* Terminate while loop */ } /* * Rule Right -- with termination check */ if(bleft != 0) { MYDEBUG(D_BITS) { printf("Rule R: From input[%d] to output[%d] = ",i,j); } output[j] += b_window(input[i],0,be-1,bu-be); bleft -= be; MYDEBUG(D_BITS) { dumpuintbits(&output[j],1);printf("\n"); printf("bleft = %d\n",bleft); } i--; if(i<0) i = ilen-1; /* wrap i around */ } else { MYDEBUG(D_BITS) { printf("Rule R: terminate.\n"); } break; /* Terminate while loop */ } /* * This rule terminates if Rule Right is getting whole lines and * we're down to the last whole or partial line. In this case we * have to decrement j on our own, as we haven't yet reached * Rule Left. * Rule 2b */ if(bleft == br2 && be == bu ) { j--; MYDEBUG(D_BITS) { printf("Rule 2b: From input[%d] to output[%d] = ",i,j); } output[j] += b_window(input[i],bs,bu-1,bu - br2); bleft -= br2; MYDEBUG(D_BITS) { dumpuintbits(&output[j],1);printf("\n"); printf("bleft = %d\n",bleft); printf("Rule 2b: terminate.\n"); } break; /* Terminate while loop */ } /* * This rule terminates when Rule Right is getting partial lines. * In this case we KNOW that we must terminate with a Rule 2 * partial line. * Rule 2c */ if(bleft == br2 && br2 < bu) { MYDEBUG(D_BITS) { printf("Rule 2c: From input[%d] to output[%d] = ",i,j); } output[j] += b_window(input[i],bs,bu-1,bs - be); bleft -= br2; MYDEBUG(D_BITS) { dumpuintbits(&output[j],1);printf("\n"); printf("bleft = %d\n",bleft); printf("Rule 2c: terminate.\n"); } break; /* Terminate while loop */ } /* * Rule Left -- with termination check */ if(bleft != 0) { if(be != bu) { /* * We skip Rule Left if Rule Right is getting full lines */ MYDEBUG(D_BITS) { printf("Rule L: From input[%d] to output[%d] = ",i,j); } output[j] += b_window(input[i],be,bu-1,0); bleft -= bu-be; MYDEBUG(D_BITS) { dumpuintbits(&output[j],1);printf("\n"); printf("bleft = %d\n",bleft); } } } else { MYDEBUG(D_BITS) { printf("Rule L: terminate.\n"); } break; /* Terminate while loop */ } /* * With this arrangment we can always decrement the second loop counter * here. */ j--; } } /* * The last thing I need to make (well, it may not be the last thing, * we'll see) is a routine that * * a) fills an internal static circulating buffer with random bits pulled * from the current rng. * * b) returns a rand of any requested size (a void * routine with a * size parameter in bits or bytes) using the previous routine, keep * track of the current position in the periodic buffer with a static * pointer. * * c) refills the circulating buffer from the current rng. * * Note well that this should be the ONLY point of access to even the * gsl rngs, as they do not all return the same number of bits. We need * to be able to deal with e.g. 24 bit rands, 31 bit rands (quite a few * of them) and 32 bit uint rands. This routine will completely hide this * level of detail from the caller and permit any number of bitlevel tests * to be conducted on the One True Bitstream produced by the generator * without artificial gaps or compression. * * Note that this routine is NOT portable (although it could be made to * be portable) and requires that global rng exist and be set up ready to go * by the calling routine. */ static unsigned int bits_rand[2]; /* A buffer that can handle partial returns */ static int bleft = -1; /* Number of bits we still need in rand[1] */ unsigned int get_uint_rand(gsl_rng *gsl_rng) { static unsigned int bl,bu,tmp; /* * First call -- initialize/fill bits_rand from current rng. bl and bu * should be static so they are preserved for later calls. */ if(bleft == -1){ /* e.g. 32 */ bu = sizeof(unsigned int)*CHAR_BIT; /* e.g. 32 - 31 = 1 for a generator that returns 31 bits */ bl = bu - rmax_bits; /* For the first call, we start with bits_rand[1] all or partially filled */ bits_rand[0] = 0; bits_rand[1] = gsl_rng_get(gsl_rng); /* This is how many bits we still need. */ bleft = bu - rmax_bits; /* * The state of the generator is now what it would be on a * typical running call. bits_rand[1] contains the leftover bits from the * last call (if any). We now have to interatively fill bits_rand[0], * grab (from the RIGHT) just the number of bits we need to fill the * rest of bits_rand[1] (which might be zero bits). Then we save bits_rand[1] * for return and move the LEFTOVER (unused) bits from bits_rand[0] into * bits_rand[1], adjust bleft accordingly, and return the uint bits_rand. */ MYDEBUG(D_BITS) { printf("bu = %d bl = %d\n",bu,bl); printf(" init: |"); dumpbits(&bits_rand[0],bu); printf("|"); dumpbits(&bits_rand[1],bu); printf("|\n"); } } /* * We have to iterate into range because it is quite possible that * rmax_bits won't be enough to fill bits_rand[1]. */ while(bleft > rmax_bits){ /* Get a bits_rand's worth (rmax_bits) into bits_rand[0] */ bits_rand[0] = gsl_rng_get(gsl_rng); MYDEBUG(D_BITS) { printf("before %2d: |",bleft); dumpbits(&bits_rand[0],bu); printf("|"); dumpbits(&bits_rand[1],bu); printf("|\n"); } /* get the good bits only and fill in bits_rand[1] */ bits_rand[1] += b_window(bits_rand[0],bu-rmax_bits,bu-1,bleft-rmax_bits); MYDEBUG(D_BITS) { printf(" after %2d: |",bleft); dumpbits(&bits_rand[0],bu); printf("|"); dumpbits(&bits_rand[1],bu); printf("|\n"); } bleft -= rmax_bits; /* Number of bits we still need to fill bits_rand[1] */ } /* * We are now in range. We get just the number of bits we need, from * the right of course, and add them to bits_rand[1]. */ bits_rand[0] = gsl_rng_get(gsl_rng); MYDEBUG(D_BITS) { printf("before %2d: |",bleft); dumpbits(&bits_rand[0],bu); printf("|"); dumpbits(&bits_rand[1],bu); printf("|\n"); } if(bleft != 0) { bits_rand[1] += b_window(bits_rand[0],bu-bleft,bu-1,0); } MYDEBUG(D_BITS) { printf(" after %2d: |",bleft); dumpbits(&bits_rand[0],bu); printf("|"); dumpbits(&bits_rand[1],bu); printf("|\n"); } /* Save for return */ tmp = bits_rand[1]; /* * Move the leftover bits from bits_rand[0] into bits_rand[1] (right * justified), adjust bleft accordingly, and return. Note that if we * exactly filled the return with ALL the bits in rand[0] then we * need to start over on the next one. */ if(bleft == rmax_bits){ bleft = bu; } else { bits_rand[1] = b_window(bits_rand[0],bu-rmax_bits,bu-bleft-1,bu-rmax_bits+bleft); bleft = bu - rmax_bits + bleft; MYDEBUG(D_BITS) { printf(" done %2d: |",bleft); dumpbits(&bits_rand[0],bu); printf("|"); dumpbits(&bits_rand[1],bu); printf("|\n"); } } return(tmp); } /* * With get_uint(rand() in hand, we can FINALLY create a routine that * can give us neither more nor less than the "next N bits" from the * random number stream, without dropping any. The return can even be * of arbitrary size -- we make the return a void pointer whose size is * specified by the caller (and guaranteed to be big enough to hold * the result). */ /* * We'll use a BIG static circulating buffer so we can handle BIG * lags without worrying too much about it. Space is cheap in the * one-page range. */ #define BRBUF 6 static unsigned int bits_randbuf[BRBUF]; static unsigned int bits_output[BRBUF]; /* pointer to line containing LAST return */ static int brindex = -1; /* pointer to region being backfilled */ static int iclear = -1; /* pointer to the last (most significant) returned bit */ static int bitindex = -1; void get_rand_bits(void *result,unsigned int rsize,unsigned int nbits,gsl_rng *gsl_rng) { int i,offset; unsigned int bu; char *output,*resultp; /* * Zero the return. Note rsize is in characters/bytes. */ memset(result,0,rsize); MYDEBUG(D_BITS) { printf("Entering get_rand_bits. rsize = %d, nbits = %d\n",rsize,nbits); } /* * We have to do a bit of testing on call parameters. We cannot return * more bits than the result buffer will hold. We return 0 if nbits = 0. * We cannot return more bits than bits_randbuf[] will hold. */ bu = sizeof(unsigned int)*CHAR_BIT; if(nbits == 0) return; /* Handle a "dumb call" */ if(nbits > (BRBUF-2)*bu){ fprintf(stderr,"Warning: get_rand_bits capacity exceeded!\n"); fprintf(stderr," nbits = %d > %d (nbits max)\n",nbits,(BRBUF-2)*bu); return; } if(nbits > rsize*CHAR_BIT){ fprintf(stderr,"Warning: Cannot get more bits than result vector will hold!\n"); fprintf(stderr," nbits = %d > %d (rsize max bits)\n",nbits,rsize*CHAR_BIT); return; /* Unlikely, but possible */ } if(brindex == -1){ /* * First call, fill the buffer BACKWARDS. I know this looks odd, * but we have to think of bits coming off the generator from least * significant on the right to most significant on the left as * filled by get_uint_rand(), so we have to do it this way to avoid * a de-facto shuffle for generators with rmax_bits < 32. */ for(i=BRBUF-1;i>=0;i--) { bits_randbuf[i] = get_uint_rand(gsl_rng); /* printf("bits_randbuf[%d] = %u\n",i,bits_randbuf[i]); */ } /* * Set the pointers to point to the last line, and the bit AFTER the * last bit. Note that iclear should always start equal to brindex * as one enters the next code segment. */ brindex = BRBUF; iclear = brindex-1; bitindex = 0; MYDEBUG(D_BITS) { printf("Initialization: iclear = %d brindex = %d bitindex = %d\n",iclear,brindex,bitindex); } } MYDEBUG(D_BITS) { for(i=0;i 0){ tmp = 0; tmp = (unsigned int) src[sindex++]; /* Put current source byte into workspace. */ tmp = 255; printf("Source byte %2d= ",sindex-1); /* dumpbitwin((char *)&tmp,4,0,32); */ printf("\n"); /* * This signals the final byte to process */ if(sblen >= slen){ sblen = slen; /* number of bits we get */ } tmp = tmp >> (CHAR_BIT - soffset - sblen); /* right shift to byte edge */ soffset = CHAR_BIT - sblen; /* fix offset */ /* * tmp is now in "standard form" -- right aligned, with * sblen = CHAR_BIT - soffset. We don't care how we got there -- now * we just put it away. */ tmp = tmp << (CHAR_BIT+soffset-doffset); /* align with target bytes */ dst[dindex] += btmp[0]; /* always add in left byte */ /* * This is the final piece of trickiness. If the left byte is too small * to reach the right margin of dst[dindex], we do NOT increment dindex, * instead we increment doffset by sblen and are done. Otherwise we * go ahead and increment dindex and add in the second byte. We have to * be careful with the boundary case where sblen PRECISELY fills the * first byte, as then we want to increment dindex but set doffset to 0. */ if(soffset >= doffset){ doffset += sblen; if(doffset == CHAR_BIT){ dindex++; doffset = 0; } } else { dindex++; dst[dindex] = btmp[1]; doffset = sblen - CHAR_BIT + doffset; } slen -= sblen; /* This accounts for the chunk we've just gotten */ } } /* static unsigned int pattern_output[BRBUF]; */ void get_rand_pattern(void *result,unsigned int rsize,int *pattern,gsl_rng *gsl_rng) { int i,j,pindex,poffset; unsigned int bu,nbits,tmpuint; char *resultp; MYDEBUG(D_BITS) { printf("# get_rand_pattern: Initializing with rsize = %d\n",rsize); } /* * Count the number of bits in the actual returned object. */ i = 0; nbits = 0; while(pattern[i]){ if(pattern[i]>0) nbits += pattern[i]; /* * Sorry, I want to use a uint to hold snippets from get_rand_bits(). * So we must bitch if we try to use more and quit. */ if(pattern[i]>32) { fprintf(stderr,"Error: pattern[%d] = %d chunks must not exceed 32 in length.\n",i,pattern[i]); fprintf(stderr," Use contiguous 32 bit pieces to create a longer chunk.\n"); exit(0); } MYDEBUG(D_BITS) { printf("# get_rand_pattern: pattern[%d] = %d nbits = %u\n",i,pattern[i],nbits); } i++; } /* * Zero the return. Note rsize is in characters/bytes. */ memset(result,0,rsize); /* * We have to do a bit of testing on call parameters. We cannot return * more bits than the result buffer will hold. We return 0 if nbits = 0. * We cannot return more bits than bits_randbuf[] or result[] will hold. */ bu = sizeof(unsigned int)*CHAR_BIT; if(nbits == 0) return; /* Handle a "dumb call" */ if(nbits > (BRBUF-2)*bu){ fprintf(stderr,"Warning: get_rand_bits capacity exceeded!\n"); fprintf(stderr," nbits = %d > %d (nbits max)\n",nbits,(BRBUF-2)*bu); return; } if(nbits > rsize*CHAR_BIT){ fprintf(stderr,"Warning: Cannot get more bits than result vector will hold!\n"); fprintf(stderr," nbits = %d > %d (rsize max bits)\n",nbits,rsize*CHAR_BIT); return; /* Unlikely, but possible */ } /* * This should really be pretty simple. nbits holds the displacement * BACKWARDS from the end of the return. We therefore: * * a) Get the ith chunk into tmpuint OR iterate calls to skip ith bits. * b) if we got a chunk, fill it into resultp[] bytewise by e.g. * rotating left or right to align the piece and masking it into * place. decrement nbits as we go by the number of bits we've filled * in (adjusting resultp index and bit pointer as we go). * c) iterate until pattern[i] == 0 AND nbits = 0 (done) and return. * * Get and align addresses of char *pointers for (void *)result and * tmpuint to make it relatively easy to line up and generate result bytes. */ /* * Set up index and pointer into resultp as usual. Remember this is * BYTEWISE, not UINTWISE. * * For example, suppose rsize = 4 bytes and nbits = 28 bits. Then * we want pindex = 0 (it starts to fill in the first byte of resultp[]) * and poffset = 4. 28/8 = 3 (remainder 4) so: */ pindex = rsize - nbits/CHAR_BIT - 1; poffset = nbits%CHAR_BIT; while(nbits != 0){ if(pattern[i] > 0){ /* * Get pattern[i] bits (in uint chunks) */ j = pattern[i]; while(j>bu) { get_rand_bits(&tmpuint,sizeof(unsigned int),bu,rng); /* * Pack this whole uint into result at the offset. */ mybitadd((char *)(&resultp + pindex),poffset,(char *)&tmpuint,0,bu); /* * Decrement j, increment pindex, poffset remains unchanged. */ j -= bu; pindex += sizeof(unsigned int); } get_rand_bits(&tmpuint,sizeof(unsigned int),j,rng); /* * Pack this partial uint into resultp */ mybitadd((char *)(&resultp + pindex),poffset,(char *)&tmpuint,bu-j,j); /* * Done with pattern, decrement nbits */ nbits -= pattern[i]; } else if(pattern[i] < 0){ /* Skip -pattern[i] bits */ j = -pattern[i]; while(j>bu) { /* skip whole uint's worth */ get_rand_bits(&tmpuint,sizeof(unsigned int),bu,rng); j -= bu; } /* skip final remaining A, 3 ---> B, 4 ---> C, 5 ---> D,:: * and 6,7 or 8 ---> E. Thus we have a monkey at a typewriter :: * hitting five keys with with various probabilities:: 37,56,70,:: * 56,37 over 256. There are 5^5 possible 5-letter words, and :: * from a string of 256,000 (overlapping) 5-letter words, counts :: * are made on the frequencies for each word. The quadratic form :: * in the weak inverse of the covariance matrix of the cell :: * counts provides a chisquare test:: Q5-Q4, the difference of :: * the naive Pearson sums of (OBS-EXP)^2/EXP on counts for 5- :: * and 4-letter cell counts. :: * * Comment * * For the less statistically trained amongst us, the translation * of the above is: * Generate a string of base-5 digits derived as described from * specific (randomly chosen) byte offsets in a random integer. * Turn four and five digit base 5 numbers (created from these digits) * into indices and incrementally count the frequency of occurrence of * each index. * Compute the expected value of these counts given tsamples samples, * and thereby (from the vector of actual vs expected counts) generate * a chisq for 4 and 5 digit numbers separately. These chisq's are * expected, for a large number of trials, to be equal to the number of * degrees of freedom of the vectors, (5^5 - 1) or (5^4 - 1). Generate * the mean DIFFERENCE = 2500 as the expected value of the difference * chisq_5 - chisq_4 and compute a pvalue based on this expected value and * the associated standard deviation sqrt(2*2500). * * Note: The byte offset is systematically cycled PER tsample, so enough * tsamples gives one a reasonable chance of discovering "bad" offsets * in any exist. How many is enough? Difficult to say a priori -- it * depends on how bit the failure is and how many offsets create a * failure. Play around with it. * * Note also that the code itself is a bit simpler than the stream * version (no need to worry about e.g. overlap or modulus 4/5 when * getting the next int/byte) but that it generates 4x as many rands * as non-overlapping stream: tsamples*psamples*5, basically. * * This test is actually LESS stringent than the stream version overall, * and is much closer to rgb_bitdist. In fact, if rgb_bitdist for 8 bits * fails the diehard_count_1s_byte test MUST fail as it too samples all * the different offsets systematically. However, as before, MOST failures * at 8 bits are derived from failures at smaller numbers of bits (this * is an assertion that can be made precise in terms of contributing * permutations) and again, the test is vastly less sensitive than * rgb_bitdist and is less senstive that diehard_count_1s_stream EXCEPT * that it samples more rands and might reveal problems with specific * offsets ignored by the stream test. Honestly, I could fix the stream * test to cycle through the possible bitlevel offsets and make this * test completely obsolete. *======================================================================== */ #include /* * Include inline uint generator */ #include "static_get_bits.c" /* * This table was generated using the following code fragment. { char table[256]; table[i] = 0; for(j=0;j<8*sizeof(uint);j++){ table[i] += get_int_bit(i,j); } switch(table[i]){ case 0: case 1: case 2: table[i] = 0; break; case 3: table[i] = 1; break; case 4: table[i] = 2; break; case 5: table[i] = 3; break; case 6: case 7: case 8: table[i] = 4; break; default: fprintf(stderr,"Hahahahah\n"); exit(0); break; } } */ char b5b[] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 4, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 4, 2, 3, 3, 4, 3, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4}; /* * The following is needed to generate the test statistic * * Vector of probabilities for each integer. * 37.0/256.0,56.0/256.0,70.0/256.0,56.0/256.0,37.0/256.0 */ const double pb[]={ 0.144531250, 0.218750000, 0.273437500, 0.218750000, 0.144531250}; /* * Useful macro for building 4 and 5 digit base 5 numbers from * base 5 digits */ #define LSHIFT5(old,new) (old*5 + new) int diehard_count_1s_byte(Test **test, int irun) { uint i,j,k,index5=0,index4,letter,t; uint boffset; Vtest vtest4,vtest5; Xtest ptest; /* * count_1s in specific bytes is straightforward after looking over * count_1s in a byte. The statistic is identical; we just have to * cycle the offset of the bytes selected and generate 1 random uint * per digit. */ /* * I'm leaving this in so the chronically bored can validate that * the table exists and is correctly loaded and addressable. */ if(verbose == -1){ for(i=0;i<256;i++){ printf("%u, ",b5b[i]); /* dumpbits(&i,8); */ if((i+1)%16 == 0){ printf("\n"); } } exit(0); } /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * This is basically a pair of parallel vtests, with a final test * statistic generated from their difference (somehow). We therefore * create two vtests, one for four digit base 5 integers and one for * five digit base 5 integers, and generate their expected values for * test[0]->tsamples trials. */ ptest.y = 2500.0; ptest.sigma = sqrt(5000.0); Vtest_create(&vtest4,625); vtest4.cutoff = 5.0; for(i=0;i<625;i++){ j = i; vtest4.y[i] = test[0]->tsamples; vtest4.x[i] = 0.0; /* * Digitize base 5, compute expected value for THIS integer i. */ /* printf("%u: ",j); */ for(k=0;k<4;k++){ /* * Take the least significant "letter" of j in range 0-4 */ letter = j%5; /* * multiply by the probability of getting this letter */ vtest4.y[i] *= pb[letter]; /* * Right shift j to get next digit. */ /* printf("%1u",letter); */ j /= 5; } /* printf(" = %f\n",vtest4.y[i]); */ } Vtest_create(&vtest5,3125); vtest5.cutoff = 5.0; for(i=0;i<3125;i++){ j = i; vtest5.y[i] = test[0]->tsamples; vtest5.x[i] = 0.0; /* * Digitize base 5, compute expected value for THIS integer i. */ for(k=0;k<5;k++){ /* * Take the least significant "letter" of j in range 0-4 */ letter = j%5; /* * multiply by the probability of getting this letter */ vtest5.y[i] *= pb[letter]; /* * Right shift j to get next digit. */ j /= 5; } } /* * Here is the test. We cycle boffset through test[0]->tsamples */ boffset = 0; for(t=0;ttsamples;t++){ boffset = t%32; /* Remember that get_bit_ntuple periodic wraps the uint */ /* * Get the next five bytes and make an index5 out of them, no * overlap. */ for(k=0;k<5;k++){ i = get_rand_bits_uint(32, 0xFFFFFFFF, rng); if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ dumpbits(&i,32); } /* * get next byte from the last rand we generated. * Bauer fix - * Cruft: j = get_bit_ntuple_from_uint(i,8,0x000000FF,boffset); */ j = get_bit_ntuple_from_whole_uint(i,8,0x000000FF,boffset); index5 = LSHIFT5(index5,b5b[j]); if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ printf("b5b[%u] = %u, index5 = %u\n",j,b5b[j],index5); dumpbits(&j,8); } } /* * We use modulus to throw away the sixth digit in the left-shifted * base 5 index value, keeping the value of the 5-digit base 5 number * in the range 0 to 5^5-1 or 0 to 3124 decimal. We repeat for the * four digit index. At this point we increment the counts for index4 * and index5. Tres simple, no? */ index5 = index5%3125; index4 = index5%625; vtest4.x[index4]++; vtest5.x[index5]++; } /* * OK, all that is left now is to figure out the statistic. */ if(verbose == D_DIEHARD_COUNT_1S_BYTE || verbose == D_ALL){ for(i = 0;i<625;i++){ printf("%u: %f %f\n",i,vtest4.y[i],vtest4.x[i]); } for(i = 0;i<3125;i++){ printf("%u: %f %f\n",i,vtest5.y[i],vtest5.x[i]); } } Vtest_eval(&vtest4); Vtest_eval(&vtest5); if(verbose == D_DIEHARD_COUNT_1S_BYTE || verbose == D_ALL){ printf("vtest4.chisq = %f vtest5.chisq = %f\n",vtest4.chisq,vtest5.chisq); } ptest.x = vtest5.chisq - vtest4.chisq; Xtest_eval(&ptest); test[0]->pvalues[irun] = ptest.pvalue; MYDEBUG(D_DIEHARD_COUNT_1S_BYTE) { printf("# diehard_count_1s_byte(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } Vtest_destroy(&vtest4); Vtest_destroy(&vtest5); return(0); } ./libdieharder/static_get_bits.c0000664000175000017500000001772313707046103015233 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * This should be a nice, big case switch where we add EACH test * we might want to do and either just configure and do it or * prompt for input (if absolutely necessary) and then do it. *======================================================================== */ /* * This is a not-quite-drop-in replacement for my old get_rand_bits() * routine contributed by John E. Davis. * * It should give us the "next N bits" from the random number stream, * without dropping any. The return can even be of arbitrary size -- * we make the return a void pointer whose size is specified by the * caller (and guaranteed to be big enough to hold the result). */ inline static uint get_rand_bits_uint (uint nbits, uint mask, gsl_rng *rng) { static uint bit_buffer; static uint bits_left_in_bit_buffer = 0; uint bits,breturn; /* * If there are enough bits left in the bit buffer, shift them out into * bits and return. I like to watch this happen, so I'm instrumenting * this with some I/O from bits.c. I'm also adding the following * conditionals so it works even if the mask isn't set by the caller * and does the right thing if the mask is supposed to be all 1's * (in which case this is a dumb routine to call, in some sense). */ if(mask == 0){ mask = ((1u << nbits) - 1); } if(nbits == 32){ mask = 0xFFFFFFFF; } if(nbits > 32){ fprintf(stderr,"Warning! dieharder cannot yet work with\b"); fprintf(stderr," %u > 32 bit chunks. Exiting!\n\n",nbits); exit(0); } /* ****************************************************************** * OK, the way it works is: First entry, nbits = 12 Mask = |00000000000000000000111111111111| Buff = |00000000000000000000000000000000| Not enough: Bits = |00000000000000000000000000000000| So we refill the bit_buffer (which now has 32 bits left): Buff = |11110101010110110101010001110000| We RIGHT shift this (32-nbits), aligning it for return, & with mask, and return. Bits = |00000000000000000000111101010101| Need the next one. There are 20 bits left. Buff is not changed. We right shift buffer by 20-12 = 8, then & with mask to return: Buff = |11110101010110110101010001110000| ^ ^ 8 bits-> Bits = |00000000000000000000101101010100| Ready for the next one. There are only 8 bits left and we need 12. We LEFT shift Buff onto Bits by needbits = 12-8 = 4 Buff = |11110101010110110101010001110000| Bits = |01010101101101010100011100000000| We refill the bit buffer Buff: Buff = |01011110001111000000001101010010| ^ ^ We right shift 32 - needbits and OR the result with Bits, & mask, and return. The mask dumps the high part from the old buffer.: Bits = |00000000000000000000011100000101| We're back around the horn with 28 bits left. This is enough, so we just right shift until the window is aligned, mask out what we want, decrement the counter of number of bits left, return: Buff = |01011110001111000000001101010010|' ^ ^ Bits = |00000000000000000000111000111100| and so on. Very nice. ****************************************************************** * Therefore, this routine delivers bits in left to right bits * order, which is fine. */ /* * FIRST of all, if nbits == 32 and rmax_bits == 32 (or for that matter, * if we ever seek nbits == rmax_bits) we might as well just return the * gsl rng right away and skip all the logic below. In the particular * case of nbits == 32 == rmax_bits, this also avoids a nasty problem * with bitshift operators on x86 architectures, see below. I left a * local patch in below as well just to make double-dog sure that one * never does (uintvar << 32) for some uint variable; probably should * do the same for (uintvar >> 32) calls below. */ if(nbits == rmax_bits){ return gsl_rng_get(rng); } MYDEBUG(D_BITS) { printf("Entering get_rand_bits_uint. nbits = %d\n",nbits); printf(" Mask = "); dumpuintbits(&mask,1); printf("\n"); printf("%u bits left\n",bits_left_in_bit_buffer); printf(" Buff = "); dumpuintbits(&bit_buffer,1); printf("\n"); } if (bits_left_in_bit_buffer >= nbits) { bits_left_in_bit_buffer -= nbits; bits = (bit_buffer >> bits_left_in_bit_buffer); MYDEBUG(D_BITS) { printf("Enough:\n"); printf(" Bits = "); breturn = bits & mask; dumpuintbits(&breturn,1); printf("\n"); } return bits & mask; } nbits = nbits - bits_left_in_bit_buffer; /* * This fixes an annoying quirk of the x86. It only uses the bottom five * bits of the shift value. That means that if you shift right by 32 -- * required in this routine to return 32 bit integers from a 32 bit * generator -- nothing happens as 32 is 0100000 and only the 00000 is used * to shift! What a bitch! * * I'm going to FIRST try this -- which should work to clear the * bits register if nbits for the shift is 32 -- and then very * likely alter this to just check for rmax_bits == nbits == 32 * and if so just shovel gsl_rng_get(rng) straight through... */ if(nbits == 32){ bits = 0; } else { bits = (bit_buffer << nbits); } MYDEBUG(D_BITS) { printf("Not enough, need %u:\n",nbits); printf(" Bits = "); dumpuintbits(&bits,1); printf("\n"); } while (1) { bit_buffer = gsl_rng_get (rng); bits_left_in_bit_buffer = rmax_bits; MYDEBUG(D_BITS) { printf("Refilled bit_buffer\n"); printf("%u bits left\n",bits_left_in_bit_buffer); printf(" Buff = "); dumpuintbits(&bit_buffer,1); printf("\n"); } if (bits_left_in_bit_buffer >= nbits) { bits_left_in_bit_buffer -= nbits; bits |= (bit_buffer >> bits_left_in_bit_buffer); MYDEBUG(D_BITS) { printf("Returning:\n"); printf(" Bits = "); breturn = bits & mask; dumpuintbits(&breturn,1); printf("\n"); } return bits & mask; } nbits -= bits_left_in_bit_buffer; bits |= (bit_buffer << nbits); MYDEBUG(D_BITS) { printf("This should never execute:\n"); printf(" Bits = "); dumpuintbits(&bits,1); printf("\n"); } } } /* * This is a drop-in-replacement for get_bit_ntuple() contributed by * John E. Davis. It speeds up this code substantially but may * require work if/when rngs that generate 64-bit rands come along. * But then, so will other programs. */ inline static uint get_bit_ntuple_from_uint (uint bitstr, uint nbits, uint mask, uint boffset) { uint result; uint len; /* Only rmax_bits in bitstr are meaningful */ boffset = boffset % rmax_bits; result = bitstr >> boffset; if (boffset + nbits <= rmax_bits) return result & mask; /* Need to wrap */ len = rmax_bits - boffset; while (len < nbits) { result |= (bitstr << len); len += rmax_bits; } return result & mask; } /* * David Bauer doesn't like using the routine above to "fix" the * problem that some generators don't return 32 bit random uints. This * version of the routine just ignore rmax_bits. If a routine returns * 31 or 24 bit uints, tough. This is harmless enough since nobody cares * about obsolete generators that return signed uints or worse anyway, I * imagine. It MIGHT affect people writing HW generators that return only * 16 bits at a time or the like -- they need to be advised to wrap their * call routines up to return uints. It's faster, too -- less checking * of the stream, fewer conditionals. */ inline static uint get_bit_ntuple_from_whole_uint (uint bitstr, uint nbits, uint mask, uint boffset) { uint result; uint len; result = bitstr >> boffset; if (boffset + nbits <= 32) return result & mask; /* Need to wrap */ len = 32 - boffset; while (len < nbits) { result |= (bitstr << len); len += 32; } return result & mask; } ./libdieharder/random_seed.c0000664000175000017500000000340313707046103014332 0ustar eddedd/* *======================================================================== * $Id: random_seed.c 223 2006-08-17 06:19:38Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * This routine does all the required initialization and startup, * including memory allocation and prefilling of vectors. It is * COMPLETELY outside the timing loops. *======================================================================== */ #include unsigned long int random_seed() { unsigned int seed; struct timeval tv; FILE *devurandom; /* * We will routinely use /dev/urandom here, which is entropic noise * supplemented by an RNG of high quality. This is much faster than * /dev/random (doesn't block when the entropy pool is exhausted) and * should serve our purpose of providing a sufficiently random and * uniformly distributed seed. * * It falls back on the clock, which is a POOR choice. I really should * use the clock to seed a good rng (e.g. mt19937), generate a * random integer in the range 1-100, discard this number of rand and use * the next one as the seed (for example). The point isn't to get a * perfectly random seed -- it is to get a uniform distribution of possible * seeds. */ if ((devurandom = fopen("/dev/urandom","r")) == NULL) { gettimeofday(&tv,0); seed = tv.tv_sec + tv.tv_usec; if(verbose == D_SEED) printf("Got seed %u from gettimeofday()\n",seed); } else { fread(&seed,sizeof(seed),1,devurandom); if(verbose == D_SEED) printf("Got seed %u from /dev/urandom\n",seed); fclose(devurandom); } return(seed); } ./libdieharder/rgb_lagged_sums.c0000664000175000017500000000642313707046103015203 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * RGB Lagged Sums Test * * This is a very simple test template for a test that generates a single * trivial statistic -- in fact, it is the demo user test from the * dieharder CLI sources. Use a GSL-wrapped generator to generate the * rands required to sample that number, obtaining an iid (independent, * identically distributed) set of samples. find their mean. Determine * the probability of obtaining that particular value by a random trial * (from the erf of the associated normal distribution) -- this is the * "p-value" of the trial. * * The interesting thing about this test is that -- simple as it is -- when * it is run on an rng for a series of possible lags, it suffices to show * that e.g. mt19937 is actually weak because it is TOO UNIFORM -- the set * of pvalues that result from performing the lagged sum test for certain * lags come out too uniformly distributed between 0 and 1 so that the * final KS test yields a pvalue of e.g. 0.9995... -- a two in ten thousand * chance -- for two or three lags in the range 0-32. Similar weakness is * actually observed for rgb_permutations. This might not affect most * simulations based on the generator -- many of them would if anything * benefit from a slight "over-uniformity" of the random number stream, * especially when it is only apparent for certain lags and seeds. Others * might fail altogether because certain tails in the space of random * numbers aren't being sampled at the expected rate. It is very much * caveat emptor for users of pseudo-random number generators as all of them * are likely weak SOMEWHERE -- dieharder just gives you a microscope to use * to reveal their specific weaknesses and the likely bounds where they * won't matter. *======================================================================== */ #include int rgb_lagged_sums(Test **test,int irun) { uint t,i,lag; Xtest ptest; /* * Get the lag from ntuple. Note that a lag of zero means * "don't throw any away". */ test[0]->ntuple = ntuple; lag = test[0]->ntuple; /* * ptest.x = actual sum of tsamples lagged samples from rng * ptest.y = tsamples*0.5 is the expected mean value of the sum * ptest.sigma = sqrt(tsamples/12.0) is the standard deviation */ ptest.x = 0.0; /* Initial value */ ptest.y = (double) test[0]->tsamples*0.5; ptest.sigma = sqrt(test[0]->tsamples/12.0); if(verbose == D_RGB_LAGGED_SUMS || verbose == D_ALL){ printf("# rgb_lagged_sums(): Doing a test with lag %u\n",lag); } for(t=0;ttsamples;t++){ /* * A VERY SIMPLE test, but sufficient to demonstrate the * weaknesses in e.g. mt19937. */ /* Throw away lag per sample */ for(i=0;ipvalues[irun] = ptest.pvalue; if(verbose == D_RGB_LAGGED_SUMS || verbose == D_ALL){ printf("# rgb_lagged_sums(): ks_pvalue[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } return(0); } void help_rgb_lagged_sums() { printf("%s",rgb_lagged_sums_dtest.description); } ./libdieharder/timing.c0000664000175000017500000000142213707046103013340 0ustar eddedd/* * $Id: timing.c 223 2006-08-17 06:19:38Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * */ /* *======================================================================== * timing and utility sources. tv_start and tv_stop are globals. *======================================================================== */ #include void start_timing() { gettimeofday(&tv_start, (struct timezone *) NULL); } void stop_timing() { gettimeofday(&tv_stop, (struct timezone *) NULL); } double delta_timing() { return((double)(tv_stop.tv_sec - tv_start.tv_sec) + 1.0e-6*(double)(tv_stop.tv_usec - tv_start.tv_usec)); } unsigned int makeseed() { struct timeval tv; gettimeofday(&tv,0); return tv.tv_sec + tv.tv_usec; } ./libdieharder/rank.c0000664000175000017500000001256013707046103013011 0ustar eddedd/* * $Id: rank.c 223 2006-08-17 06:19:38Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * */ /* *======================================================================== * This code evaluates the binary rank of a bit matrix on the field[0,1], * for example: * * 0 1 1 0 * 1 0 1 0 * 1 0 1 1 * 0 0 1 1 * * would be a 4x4 bitwise matrix. The rank of the matrix is determined * as is the rank of any matrix, by gauss elimination with pivoting, but * in this case the "pivots" are 1 bits (the largest element in any * column or row) and the required transpositions and subtractions are * all done by pointer or bitwise (xor) operations. * *======================================================================== */ #include int binary_rank(uint **mtx,int mrows,int ncols) { int i,j,k,m,n,s_uint,rank; int col_ind,uint_col_max; uint mask,colchk; uint *rowp; /* * mtx is a vector of unsigned integers, e.g.: * * mtx[0] = 0110...110 * mtx[1] = 1010...001 * ... * mtx[ncols-1] = 0010...100 * * We go through this vector a row at a time, searching each * column for a pivot (1). When we find a pivot, we swap rows * and eliminate the column bitwise. */ /* * size of an unsigned int */ s_uint = 8*sizeof(uint); /* * row size in uint columns. Note that we have to remember * which uint ** column we are in and therefore have to * convert bit column into uint column regularly. * Subtract 1, because it is zero-basd. */ uint_col_max = (ncols-1)/s_uint; if(verbose == D_BRANK || verbose == D_ALL){ printf("Starting bitmatrix:\n"); for(m=0;m void marsaglia_tsang_gorilla(Test **test, int irun) { uint t,i,lag; Xtest ptest; /* * ptest.x = actual sum of test[0]->tsamples lagged samples from rng * ptest.y = test[0]->tsamples*0.5 is the expected mean value of the sum * ptest.sigma = sqrt(test[0]->tsamples/12.0) is the standard deviation */ ptest.x = 0.0; /* Initial value */ ptest.y = (double) test[0]->tsamples*0.5; ptest.sigma = sqrt(test[0]->tsamples/12.0); /* * sample only every lag returns from the rng, discard the rest. * We have to get the (float) value from the user input and set * a uint */ if(x_user){ lag = x_user; } else { lag = 2; /* Why not? Anything but 0, really... */ } if(verbose == D_USER_TEMPLATE || verbose == D_ALL){ printf("# marsaglia_tsang_gorilla(): Doing a test on lag %u\n",lag); } for(t=0;ttsamples;t++){ /* * A VERY SIMPLE test (probably not too sensitive) */ /* Throw away lag-1 per sample */ for(i=0;i<(lag-1);i++) gsl_rng_uniform(rng); /* sample only every lag numbers, reset counter */ ptest.x += gsl_rng_uniform(rng); } Xtest_eval(&ptest); test[0]->pvalues[irun] = ptest.pvalue; MYDEBUG(D_MARSAGLIA_TSANG_GORILLA) { printf("# marsaglia_tsang_gorilla(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } } ./libdieharder/diehard_3dsphere.c0000664000175000017500000000546713707046103015263 0ustar eddedd/* * $Id: diehard_3dsphere.c 231 2006-08-22 16:18:05Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is the Diehard 3d spheres test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * Basically, we choose 4000 points in a cube of side 1000. Compute the * smallest nearest neighbor distance (radius R of the smallest sphere * that doesn't overlap any neighboring point). R^3 is exponentially * distributed with an empirical exponential distribution with mean 30. * Thus p = 1.0 - exp(-R^3/30.0) should be a uniform distribution. Run * a KS test on a vector of independent samples of this entire test to * find out. *======================================================================== */ #include #define POINTS_3D 4000 #define DIM_3D 3 typedef struct { double x[DIM_3D]; } C3_3D; int diehard_3dsphere(Test **test, int irun) { int j,k; C3_3D *c3; double r1,r2,r3,rmin,r3min; double xdelta,ydelta,zdelta; /* * for display only. Test dimension is 3, of course. */ test[0]->ntuple = 3; r3min = 0; /* * This one should be pretty straightforward. Generate a vector * of three random coordinates in the range 0-1000 (check the * diehard code to see what "in" a 1000^3 cube means, but I'm assuming * real number coordinates greater than 0 and less than 1000). Do * a simple double loop through to float the smallest separation out. * Generate p, save in a sample vector. Apply KS test. */ c3 = (C3_3D *)malloc(POINTS_3D*sizeof(C3_3D)); rmin = 2000.0; for(j=0;j=0;k--){ xdelta = c3[j].x[0]-c3[k].x[0]; ydelta = c3[j].x[1]-c3[k].x[1]; zdelta = c3[j].x[2]-c3[k].x[2]; r2 = xdelta*xdelta + ydelta*ydelta + zdelta*zdelta; r1 = sqrt(r2); r3 = r2*r1; if(verbose == D_DIEHARD_3DSPHERE || verbose == D_ALL){ printf("%d-%d: |(%6.2f,%6.2f,%6.2f)| = r1 = %f rmin = %f, \n", j,k,xdelta,ydelta,zdelta,r1,rmin); } if(r1pvalues[irun] = 1.0 - exp(-r3min/30.0); MYDEBUG(D_DIEHARD_3DSPHERE) { printf("# diehard_3dsphere(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } nullfree(c3); return(0); } ./libdieharder/version.c0000664000175000017500000000310113707046103013532 0ustar eddedd/* * $Id: list_rngs.c 420 2008-08-18 18:29:17Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING */ /* * ======================================================================== * These two functions JUST output a "standard header" with version and * copyright information for use in various output routines or the version * information alone. Note that version might be e.g. 3.28.0beta, that * is, it may not be strictly numerical. * ======================================================================== */ #include "dieharder/libdieharder.h" /* * dh_header isn't QUITE trivial, because the version string can vary in * length. If it is longer than around 20 characters, this is going to * make ugly output but nothing should "break". Note that we assume 80 * character lines, sorry. */ #define LINE_LENGTH 80 void dh_header() { int i,half,version_length; version_length = strlen(QUOTEME(VERSION)); fprintf(stdout,"#=============================================================================#\n"); fprintf(stdout,"#"); /* Pad the front */ half = (LINE_LENGTH - 48 - version_length - 2)/2; for(i=0;i #include "skein.h" #include /* 64-bit rotate left -- defined in skein_port.h as macro u64b_t RotL_64(u64b_t x,uint_t N) { return (x << (N & 63)) | (x >> ((64-N) & 63)); } */ #define BLK_BITS (WCNT*64) /* macro to perform a key injection (same for all block sizes) */ #define InjectKey(r) \ for (i=0;i < WCNT;i++) \ X[i] += ks[((r)+i) % (WCNT+1)]; \ X[WCNT-3] += ts[((r)+0) % 3]; \ X[WCNT-2] += ts[((r)+1) % 3]; \ X[WCNT-1] += (r); /* avoid slide attacks */ \ void Threefish_512_Process_Blocks(Threefish_512_Ctxt_t *ctx, const u08b_t *input, void *output, size_t blkCnt) { enum { WCNT = SKEIN_512_STATE_WORDS }; size_t i,r; u64b_t ts[3]; /* key schedule: tweak */ u64b_t ks[WCNT+1]; /* key schedule: chaining vars */ u64b_t *X = (void *) output ; /* local copy of vars */ u64b_t w [WCNT]; /* local copy of input block */ Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */ /* precompute the key schedule for this block */ ks[WCNT] = SKEIN_KS_PARITY; for (i=0;i < WCNT; i++) { ks[i] = ctx->Key[i]; ks[WCNT] ^= ctx->Key[i]; /* compute overall parity */ } ts[0] = ctx->T[0]; /* Tweak words */ ts[1] = ctx->T[1]; ts[2] = ts[0] ^ ts[1]; do { Skein_Get64_LSB_First(w,input,WCNT); /* get input block in little-endian format */ for (i=0;i < WCNT; i++) { /* do the first full key injection */ X[i] = w[i] + ks[i]; } X[WCNT-3] += ts[0]; X[WCNT-2] += ts[1]; for (r=1;r <= SKEIN_512_ROUNDS_TOTAL/8; r++) { /* unroll 8 rounds */ X[0] += X[1]; X[1] = RotL_64(X[1],R_512_0_0); X[1] ^= X[0]; X[2] += X[3]; X[3] = RotL_64(X[3],R_512_0_1); X[3] ^= X[2]; X[4] += X[5]; X[5] = RotL_64(X[5],R_512_0_2); X[5] ^= X[4]; X[6] += X[7]; X[7] = RotL_64(X[7],R_512_0_3); X[7] ^= X[6]; X[2] += X[1]; X[1] = RotL_64(X[1],R_512_1_0); X[1] ^= X[2]; X[4] += X[7]; X[7] = RotL_64(X[7],R_512_1_1); X[7] ^= X[4]; X[6] += X[5]; X[5] = RotL_64(X[5],R_512_1_2); X[5] ^= X[6]; X[0] += X[3]; X[3] = RotL_64(X[3],R_512_1_3); X[3] ^= X[0]; X[4] += X[1]; X[1] = RotL_64(X[1],R_512_2_0); X[1] ^= X[4]; X[6] += X[3]; X[3] = RotL_64(X[3],R_512_2_1); X[3] ^= X[6]; X[0] += X[5]; X[5] = RotL_64(X[5],R_512_2_2); X[5] ^= X[0]; X[2] += X[7]; X[7] = RotL_64(X[7],R_512_2_3); X[7] ^= X[2]; X[6] += X[1]; X[1] = RotL_64(X[1],R_512_3_0); X[1] ^= X[6]; X[0] += X[7]; X[7] = RotL_64(X[7],R_512_3_1); X[7] ^= X[0]; X[2] += X[5]; X[5] = RotL_64(X[5],R_512_3_2); X[5] ^= X[2]; X[4] += X[3]; X[3] = RotL_64(X[3],R_512_3_3); X[3] ^= X[4]; InjectKey(2*r-1); X[0] += X[1]; X[1] = RotL_64(X[1],R_512_4_0); X[1] ^= X[0]; X[2] += X[3]; X[3] = RotL_64(X[3],R_512_4_1); X[3] ^= X[2]; X[4] += X[5]; X[5] = RotL_64(X[5],R_512_4_2); X[5] ^= X[4]; X[6] += X[7]; X[7] = RotL_64(X[7],R_512_4_3); X[7] ^= X[6]; X[2] += X[1]; X[1] = RotL_64(X[1],R_512_5_0); X[1] ^= X[2]; X[4] += X[7]; X[7] = RotL_64(X[7],R_512_5_1); X[7] ^= X[4]; X[6] += X[5]; X[5] = RotL_64(X[5],R_512_5_2); X[5] ^= X[6]; X[0] += X[3]; X[3] = RotL_64(X[3],R_512_5_3); X[3] ^= X[0]; X[4] += X[1]; X[1] = RotL_64(X[1],R_512_6_0); X[1] ^= X[4]; X[6] += X[3]; X[3] = RotL_64(X[3],R_512_6_1); X[3] ^= X[6]; X[0] += X[5]; X[5] = RotL_64(X[5],R_512_6_2); X[5] ^= X[0]; X[2] += X[7]; X[7] = RotL_64(X[7],R_512_6_3); X[7] ^= X[2]; X[6] += X[1]; X[1] = RotL_64(X[1],R_512_7_0); X[1] ^= X[6]; X[0] += X[7]; X[7] = RotL_64(X[7],R_512_7_1); X[7] ^= X[0]; X[2] += X[5]; X[5] = RotL_64(X[5],R_512_7_2); X[5] ^= X[2]; X[4] += X[3]; X[3] = RotL_64(X[3],R_512_7_3); X[3] ^= X[4]; InjectKey(2*r); } /* DON'T do the final "feedforward" xor, update context chaining vars */ // for (i=0;i < WCNT;i++) // ctx->X[i] = X[i] ^ w[i]; // Skein_Clear_First_Flag(ctx->h); /* clear the start bit */ input += SKEIN_512_BLOCK_BYTES; X += WCNT; } while (--blkCnt); } typedef unsigned long long uint64; #if 1 uint64 timingAdjust = 200; uint64 time() { volatile uint64 temp = 4; __asm__ __volatile__ ( "cpuid\n\t" "rdtsc\n\t" "leaq %0, %%rcx\n\t" "movl %%eax, (%%rcx)\n\t" "movl %%edx, 4(%%rcx)\n\t" : : "m" (temp) : "%eax", "%ebx", "%rcx", "%edx"); return temp - timingAdjust; } #endif int main() { Threefish_512_Ctxt_t ctx; unsigned char input[64]; unsigned char output[64]; unsigned char testKey[64]; unsigned char testTweak[16]; unsigned int i; unsigned char *bigTest; uint64 startTime, endTime; memset(&ctx, 0, sizeof(ctx)); memset(input, 0, sizeof(input)); memset(output, 0, sizeof(output)); Threefish_512_Process_Blocks(&ctx, input, output, 1); for (i = 0; i < 64; i++) { if (i % 32 == 0) printf("\n"); printf("%02x", output[i]); } printf("\n"); // 408be942494492eab19daa3e96ad19aedfc41f4e55f8a2626c1e46d54547a713 // d43b21f0de1a10881ed5c4adefdad1c4172cd768c8fc28d0dde9df018042fe3e for (i = 0; i < 16; i++) testTweak[i] = i; for (i = 0; i < 64; i++) { testKey[i] = i + 16; input[i] = 255-i; } memcpy(ctx.T, testTweak, 16); memcpy(ctx.Key, testKey, 64); Threefish_512_Process_Blocks(&ctx, input, output, 1); for (i = 0; i < 64; i++) { if (i % 32 == 0) printf("\n"); printf("%02x", output[i]); } printf("\n"); // 869ae12210e51d3b0736399f2acb400de230600b13e62f1df7596a146232d281 // dfbf127a65571b9a798906c719678394c50d995138fd83f2bfa54a3bc350d2f0 bigTest = (unsigned char *) malloc(sizeof(*bigTest) * 64 * 1048576); startTime = time(); Threefish_512_Process_Blocks(&ctx, bigTest, bigTest, 1048576); endTime = time(); printf("Timing: %f cycles/byte\n", (double) (endTime - startTime) / (64 * 1048576)); return 0; } ./libdieharder/bauer/skein.h0000664000175000017500000003076113707046103014275 0ustar eddedd#ifndef _SKEIN_H_ #define _SKEIN_H_ 1 /************************************************************************** ** ** Interface declarations and internal definitions for Skein hashing. ** ** Source code author: Doug Whiting, 2008. ** ** This algorithm and source code is released to the public domain. ** *************************************************************************** ** ** The following compile-time switches may be defined to control some ** tradeoffs between speed, code size, error checking, and security. ** ** The "default" note explains what happens when the switch is not defined. ** ** SKEIN_DEBUG -- make callouts from inside Skein code ** to examine/display intermediate values. ** [default: no callouts (no overhead)] ** ** SKEIN_ERR_CHECK -- how error checking is handled inside Skein ** code. If not defined, most error checking ** is disabled (for performance). Otherwise, ** the switch value is interpreted as: ** 0: use assert() to flag errors ** 1: return SKEIN_FAIL to flag errors ** ***************************************************************************/ #include /* get size_t definition */ #include "skein_port.h" /* get platform-specific definitions */ enum { SKEIN_SUCCESS = 0, /* return codes from Skein calls */ SKEIN_FAIL = 1, SKEIN_BAD_HASHLEN = 2 }; #define SKEIN_MODIFIER_WORDS ( 2) /* number of modifier (tweak) words */ #define SKEIN_512_STATE_WORDS ( 8) #define SKEIN_MAX_STATE_WORDS (16) #define SKEIN_512_STATE_BYTES ( 8*SKEIN_512_STATE_WORDS) #define SKEIN_512_STATE_BITS (64*SKEIN_512_STATE_WORDS) #define SKEIN_512_BLOCK_BYTES ( 8*SKEIN_512_STATE_WORDS) typedef struct { size_t hashBitLen; /* size of hash result, in bits */ size_t bCnt; /* current byte count in buffer b[] */ u64b_t T[SKEIN_MODIFIER_WORDS]; /* tweak words: T[0]=byte cnt, T[1]=flags */ } Skein_Ctxt_Hdr_t; typedef struct /* 512-bit Skein hash context structure */ { Skein_Ctxt_Hdr_t h; /* common header context variables */ u64b_t X[SKEIN_512_STATE_WORDS]; /* chaining variables */ u08b_t b[SKEIN_512_BLOCK_BYTES]; /* partial block buffer (8-byte aligned) */ } Skein_512_Ctxt_t; typedef struct { u64b_t T[SKEIN_MODIFIER_WORDS]; // Tweak u64b_t Key[SKEIN_512_STATE_WORDS]; // Key } Threefish_512_Ctxt_t; void Threefish_512_Process_Blocks(Threefish_512_Ctxt_t *ctx, const u08b_t *input, void *output, size_t blkCnt); /* Skein APIs for (incremental) "straight hashing" */ int Skein_512_Init (Skein_512_Ctxt_t *ctx, size_t hashBitLen); int Skein_512_Update(Skein_512_Ctxt_t *ctx, const u08b_t *msg, size_t msgByteCnt); int Skein_512_Final (Skein_512_Ctxt_t *ctx, u08b_t * hashVal); /* ** Skein APIs for "extended" initialization: MAC keys, tree hashing. ** After an InitExt() call, just use Update/Final calls as with Init(). ** ** Notes: Same parameters as _Init() calls, plus treeInfo/key/keyBytes. ** When keyBytes == 0 and treeInfo == SKEIN_SEQUENTIAL, ** the results of InitExt() are identical to calling Init(). ** The function Init() may be called once to "precompute" the IV for ** a given hashBitLen value, then by saving a copy of the context ** the IV computation may be avoided in later calls. ** Similarly, the function InitExt() may be called once per MAC key ** to precompute the MAC IV, then a copy of the context saved and ** reused for each new MAC computation. **/ int Skein_512_InitExt(Skein_512_Ctxt_t *ctx, size_t hashBitLen, u64b_t treeInfo, const u08b_t *key, size_t keyBytes); /* ** Skein APIs for tree hash: ** Final_Pad: pad, do final block, but no OUTPUT type ** Output: do just the output stage */ #ifndef SKEIN_TREE_HASH #define SKEIN_TREE_HASH (1) #endif #if SKEIN_TREE_HASH int Skein_512_Final_Pad(Skein_512_Ctxt_t *ctx, u08b_t * hashVal); int Skein_512_Output (Skein_512_Ctxt_t *ctx, u08b_t * hashVal); #endif /***************************************************************** ** "Internal" Skein definitions ** -- not needed for sequential hashing API, but will be ** helpful for other uses of Skein (e.g., tree hash mode). ** -- included here so that they can be shared between ** reference and optimized code. ******************************************************************/ /* tweak word T[1]: bit field starting positions */ #define SKEIN_T1_BIT(BIT) ((BIT) - 64) /* offset 64 because it's the second word */ #define SKEIN_T1_POS_TREE_LVL SKEIN_T1_BIT(112) /* bits 112..118: level in hash tree */ #define SKEIN_T1_POS_BIT_PAD SKEIN_T1_BIT(119) /* bit 119 : partial final input byte */ #define SKEIN_T1_POS_BLK_TYPE SKEIN_T1_BIT(120) /* bits 120..125: type field */ #define SKEIN_T1_POS_FIRST SKEIN_T1_BIT(126) /* bits 126 : first block flag */ #define SKEIN_T1_POS_FINAL SKEIN_T1_BIT(127) /* bit 127 : final block flag */ /* tweak word T[1]: flag bit definition(s) */ #define SKEIN_T1_FLAG_FIRST (((u64b_t) 1 ) << SKEIN_T1_POS_FIRST) #define SKEIN_T1_FLAG_FINAL (((u64b_t) 1 ) << SKEIN_T1_POS_FINAL) #define SKEIN_T1_FLAG_BIT_PAD (((u64b_t) 1 ) << SKEIN_T1_POS_BIT_PAD) /* tweak word T[1]: tree level bit field mask */ #define SKEIN_T1_TREE_LVL_MASK (((u64b_t)0x7F) << SKEIN_T1_POS_TREE_LVL) #define SKEIN_T1_TREE_LEVEL(n) (((u64b_t) (n)) << SKEIN_T1_POS_TREE_LVL) /* tweak word T[1]: block type field */ #define SKEIN_BLK_TYPE_KEY ( 0) /* key, for MAC and KDF */ #define SKEIN_BLK_TYPE_CFG ( 4) /* configuration block */ #define SKEIN_BLK_TYPE_PERS ( 8) /* personalization string */ #define SKEIN_BLK_TYPE_PK (12) /* public key (for digital signature hashing) */ #define SKEIN_BLK_TYPE_KDF (16) /* key identifier for KDF */ #define SKEIN_BLK_TYPE_NONCE (20) /* nonce for PRNG */ #define SKEIN_BLK_TYPE_MSG (48) /* message processing */ #define SKEIN_BLK_TYPE_OUT (63) /* output stage */ #define SKEIN_BLK_TYPE_MASK (63) /* bit field mask */ #define SKEIN_T1_BLK_TYPE(T) (((u64b_t) (SKEIN_BLK_TYPE_##T)) << SKEIN_T1_POS_BLK_TYPE) #define SKEIN_T1_BLK_TYPE_KEY SKEIN_T1_BLK_TYPE(KEY) /* key, for MAC and KDF */ #define SKEIN_T1_BLK_TYPE_CFG SKEIN_T1_BLK_TYPE(CFG) /* configuration block */ #define SKEIN_T1_BLK_TYPE_PERS SKEIN_T1_BLK_TYPE(PERS) /* personalization string */ #define SKEIN_T1_BLK_TYPE_PK SKEIN_T1_BLK_TYPE(PK) /* public key (for digital signature hashing) */ #define SKEIN_T1_BLK_TYPE_KDF SKEIN_T1_BLK_TYPE(KDF) /* key identifier for KDF */ #define SKEIN_T1_BLK_TYPE_NONCE SKEIN_T1_BLK_TYPE(NONCE)/* nonce for PRNG */ #define SKEIN_T1_BLK_TYPE_MSG SKEIN_T1_BLK_TYPE(MSG) /* message processing */ #define SKEIN_T1_BLK_TYPE_OUT SKEIN_T1_BLK_TYPE(OUT) /* output stage */ #define SKEIN_T1_BLK_TYPE_MASK SKEIN_T1_BLK_TYPE(MASK) /* field bit mask */ #define SKEIN_T1_BLK_TYPE_CFG_FINAL (SKEIN_T1_BLK_TYPE_CFG | SKEIN_T1_FLAG_FINAL) #define SKEIN_T1_BLK_TYPE_OUT_FINAL (SKEIN_T1_BLK_TYPE_OUT | SKEIN_T1_FLAG_FINAL) #define SKEIN_VERSION (1) #ifndef SKEIN_ID_STRING_LE /* allow compile-time personalization */ #define SKEIN_ID_STRING_LE (0x33414853) /* "SHA3" (little-endian)*/ #endif #define SKEIN_MK_64(hi32,lo32) ((lo32) + (((u64b_t) (hi32)) << 32)) #define SKEIN_SCHEMA_VER SKEIN_MK_64(SKEIN_VERSION,SKEIN_ID_STRING_LE) #define SKEIN_KS_PARITY SKEIN_MK_64(0x55555555,0x55555555) /* bit field definitions in config block treeInfo word */ #define SKEIN_CFG_TREE_LEAF_SIZE_POS ( 0) #define SKEIN_CFG_TREE_NODE_SIZE_POS ( 8) #define SKEIN_CFG_TREE_MAX_LEVEL_POS (16) #define SKEIN_CFG_TREE_LEAF_SIZE_MSK ((u64b_t) 0xFF) << SKEIN_CFG_TREE_LEAF_SIZE_POS) #define SKEIN_CFG_TREE_NODE_SIZE_MSK ((u64b_t) 0xFF) << SKEIN_CFG_TREE_NODE_SIZE_POS) #define SKEIN_CFG_TREE_MAX_LEVEL_MSK ((u64b_t) 0xFF) << SKEIN_CFG_TREE_MAX_LEVEL_POS) #define SKEIN_CFG_TREE_INFO_SEQUENTIAL (0) /* use as treeInfo in InitExt() call for sequential processing */ #define SKEIN_CFG_TREE_INFO(leaf,node,maxLevel) ((u64b_t) ((leaf) | ((node) << 8) | ((maxLevel) << 16))) /* ** Skein macros for getting/setting tweak words, etc. ** These are useful for partial input bytes, hash tree init/update, etc. **/ #define Skein_Get_Tweak(ctxPtr,TWK_NUM) ((ctxPtr)->h.T[TWK_NUM]) #define Skein_Set_Tweak(ctxPtr,TWK_NUM,tVal) {(ctxPtr)->h.T[TWK_NUM] = (tVal);} #define Skein_Get_T0(ctxPtr) Skein_Get_Tweak(ctxPtr,0) #define Skein_Get_T1(ctxPtr) Skein_Get_Tweak(ctxPtr,1) #define Skein_Set_T0(ctxPtr,T0) Skein_Set_Tweak(ctxPtr,0,T0) #define Skein_Set_T1(ctxPtr,T1) Skein_Set_Tweak(ctxPtr,1,T1) /* set both tweak words at once */ #define Skein_Set_T0_T1(ctxPtr,T0,T1) \ { \ Skein_Set_T0(ctxPtr,(T0)); \ Skein_Set_T1(ctxPtr,(T1)); \ } #define Skein_Set_Type(ctxPtr,BLK_TYPE) \ Skein_Set_T1(ctxPtr,SKEIN_T1_BLK_TYPE_##BLK_TYPE) /* set up for starting with a new type: h.T[0]=0; h.T[1] = NEW_TYPE; h.bCnt=0; */ #define Skein_Start_New_Type(ctxPtr,BLK_TYPE) \ { Skein_Set_T0_T1(ctxPtr,0,SKEIN_T1_FLAG_FIRST | SKEIN_T1_BLK_TYPE_##BLK_TYPE); (ctxPtr)->h.bCnt=0; } #define Skein_Clear_First_Flag(hdr) { (hdr).T[1] &= ~SKEIN_T1_FLAG_FIRST; } #define Skein_Set_Bit_Pad_Flag(hdr) { (hdr).T[1] |= SKEIN_T1_FLAG_BIT_PAD; } #define Skein_Set_Tree_Level(hdr,height) { (hdr).T[1] |= SKEIN_T1_TREE_LEVEL(height);} /***************************************************************** ** "Internal" Skein definitions for debugging and error checking ******************************************************************/ #ifdef SKEIN_DEBUG /* examine/display intermediate values? */ #include "skein_debug.h" #else /* default is no callouts */ #define Skein_Show_Block(bits,ctx,X,blkPtr,wPtr,ksEvenPtr,ksOddPtr) #define Skein_Show_Round(bits,ctx,r,X) #define Skein_Show_R_Ptr(bits,ctx,r,X_ptr) #define Skein_Show_Final(bits,ctx,cnt,outPtr) #define Skein_Show_Key(bits,ctx,key,keyBytes) #endif #ifndef SKEIN_ERR_CHECK /* run-time checks (e.g., bad params, uninitialized context)? */ #define Skein_Assert(x,retCode)/* default: ignore all Asserts, for performance */ #define Skein_assert(x) #elif defined(SKEIN_ASSERT) #include #define Skein_Assert(x,retCode) assert(x) #define Skein_assert(x) assert(x) #else #include #define Skein_Assert(x,retCode) { if (!(x)) return retCode; } /* caller error */ #define Skein_assert(x) assert(x) /* internal error */ #endif /***************************************************************** ** Skein block function constants (shared across Ref and Opt code) ******************************************************************/ enum { /* Skein_512 round rotation constants */ R_512_0_0=38, R_512_0_1=30, R_512_0_2=50, R_512_0_3=53, R_512_1_0=48, R_512_1_1=20, R_512_1_2=43, R_512_1_3=31, R_512_2_0=34, R_512_2_1=14, R_512_2_2=15, R_512_2_3=27, R_512_3_0=26, R_512_3_1=12, R_512_3_2=58, R_512_3_3= 7, R_512_4_0=33, R_512_4_1=49, R_512_4_2= 8, R_512_4_3=42, R_512_5_0=39, R_512_5_1=27, R_512_5_2=41, R_512_5_3=14, R_512_6_0=29, R_512_6_1=26, R_512_6_2=11, R_512_6_3= 9, R_512_7_0=33, R_512_7_1=51, R_512_7_2=39, R_512_7_3=35 }; #ifndef SKEIN_ROUNDS #define SKEIN_512_ROUNDS_TOTAL (72) #else /* allow command-line define in range 8*(5..14) */ #define SKEIN_512_ROUNDS_TOTAL (8*((((SKEIN_ROUNDS/ 10) + 5) % 10) + 5)) #endif #endif /* ifndef _SKEIN_H_ */ ./libdieharder/bauer/rng_aes.c0000664000175000017500000000453513707046103014575 0ustar eddedd/* rng_es * * Copyright (C) 1996, 1997, 1998, 1999, 2000 James Theiler, Brian Gough * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include "rijndael-alg-fst.h" // State blocks = 1 for weakest form #define STATE_BLOCKS (1) /* MUST be 1 for AES */ #define BLOCKS_SIZE (16 * STATE_BLOCKS) #define NR 10 /* * This is a wrapping of the AES algorithm as a generator */ typedef struct { u32 rk[4*(NR + 1)]; unsigned char block[BLOCKS_SIZE]; short int pos; } AES_state_t; unsigned long int aes_get (void *vstate); double aes_get_double (void *vstate); void aes_set (void *vstate, unsigned long int s); unsigned long int aes_get (void *vstate) { AES_state_t *state = vstate; unsigned int ret; if (state->pos + sizeof(ret) > BLOCKS_SIZE) { rijndaelEncrypt(state->rk, NR, state->block, state->block); state->pos = 0; } ret = *((unsigned int *) (state->block + state->pos)); state->pos += sizeof(ret); // ret &= 0x7fffffff; return(ret); } double aes_get_double (void *vstate) { // return aes_get_long(vstate) / (double) ULONG_MAX; return (double) aes_get(vstate) / (double) (UINT_MAX >> 0); } void aes_set (void *vstate, unsigned long int s) { AES_state_t *state = vstate; int i; u8 key[16]; memset(state, 0, sizeof(*state)); // Zero pos and block for (i = 0; i < 16; i++) { key[i] = (u8) (112 + i + (s >> i)); } rijndaelKeySetupEnc(state->rk, key, 128); rijndaelEncrypt(state->rk, NR, state->block, state->block); return; } static const gsl_rng_type aes_type = { "AES_OFB", /* name */ UINT_MAX>>0, // UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (AES_state_t), &aes_set, &aes_get, &aes_get_double}; const gsl_rng_type *gsl_rng_aes = &aes_type; ./libdieharder/bauer/skein_block64.c0000664000175000017500000002065113707046103015611 0ustar eddedd/*********************************************************************** ** ** Implementation of the Skein block functions. ** ** Source code author: Doug Whiting, 2008. ** ** This algorithm and source code is released to the public domain. ** ** Compile-time switches: ** ** SKEIN_USE_ASM -- set bits (256/512/1024) to select which ** versions use ASM code for block processing ** [default: use C for all block sizes] ** ************************************************************************/ #include #include "skein.h" #ifndef SKEIN_USE_ASM #define SKEIN_USE_ASM (0) /* default is all C code (no ASM) */ #endif #ifndef SKEIN_LOOP #define SKEIN_LOOP 001 /* default: unroll 256 and 512, but not 1024 */ #endif #define BLK_BITS (WCNT*64) /* some useful definitions for code here */ #define KW_TWK_BASE (0) #define KW_KEY_BASE (3) #define ks (kw + KW_KEY_BASE) #define ts (kw + KW_TWK_BASE) #ifdef SKEIN_DEBUG #define DebugSaveTweak(ctx) { ctx->h.T[0] = ts[0]; ctx->h.T[1] = ts[1]; } #else #define DebugSaveTweak(ctx) #endif /***************************** Skein_512 ******************************/ #if !(SKEIN_USE_ASM & 512) void Threefish_512_Process_Blocks64(Threefish_512_Ctxt_t *ctx, const u08b_t *input, void *output, size_t blkCnt) { enum { WCNT = SKEIN_512_STATE_WORDS }; #undef RCNT #define RCNT (SKEIN_512_ROUNDS_TOTAL/8) #ifdef SKEIN_LOOP /* configure how much to unroll the loop */ #define SKEIN_UNROLL_512 (((SKEIN_LOOP)/10)%10) #else #define SKEIN_UNROLL_512 (0) #endif #if SKEIN_UNROLL_512 #if (RCNT % SKEIN_UNROLL_512) #error "Invalid SKEIN_UNROLL_512" /* sanity check on unroll count */ #endif size_t r; u64b_t kw[WCNT+4+RCNT*2]; /* key schedule words : chaining vars + tweak + "rotation"*/ #else u64b_t kw[WCNT+4]; /* key schedule words : chaining vars + tweak */ #endif u64b_t X0,X1,X2,X3,X4,X5,X6,X7; /* local copy of vars, for speed */ u64b_t w [WCNT]; /* local copy of input block */ #ifdef SKEIN_DEBUG const u64b_t *Xptr[8]; /* use for debugging (help compiler put Xn in registers) */ Xptr[0] = &X0; Xptr[1] = &X1; Xptr[2] = &X2; Xptr[3] = &X3; Xptr[4] = &X4; Xptr[5] = &X5; Xptr[6] = &X6; Xptr[7] = &X7; #endif Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */ ts[0] = ctx->T[0]; ts[1] = ctx->T[1]; /* precompute the key schedule for this block */ ks[0] = ctx->Key[0]; ks[1] = ctx->Key[1]; ks[2] = ctx->Key[2]; ks[3] = ctx->Key[3]; ks[4] = ctx->Key[4]; ks[5] = ctx->Key[5]; ks[6] = ctx->Key[6]; ks[7] = ctx->Key[7]; ks[8] = ks[0] ^ ks[1] ^ ks[2] ^ ks[3] ^ ks[4] ^ ks[5] ^ ks[6] ^ ks[7] ^ SKEIN_KS_PARITY; ts[2] = ts[0] ^ ts[1]; do { Skein_Get64_LSB_First(w,input,WCNT); /* get input block in little-endian format */ X0 = w[0] + ks[0]; /* do the first full key injection */ X1 = w[1] + ks[1]; X2 = w[2] + ks[2]; X3 = w[3] + ks[3]; X4 = w[4] + ks[4]; X5 = w[5] + ks[5] + ts[0]; X6 = w[6] + ks[6] + ts[1]; X7 = w[7] + ks[7]; input += SKEIN_512_BLOCK_BYTES; Skein_Show_R_Ptr(BLK_BITS,&ctx->h,SKEIN_RND_KEY_INITIAL,Xptr); /* run the rounds */ #define Round512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) \ X##p0 += X##p1; X##p1 = RotL_64(X##p1,ROT##_0); X##p1 ^= X##p0; \ X##p2 += X##p3; X##p3 = RotL_64(X##p3,ROT##_1); X##p3 ^= X##p2; \ X##p4 += X##p5; X##p5 = RotL_64(X##p5,ROT##_2); X##p5 ^= X##p4; \ X##p6 += X##p7; X##p7 = RotL_64(X##p7,ROT##_3); X##p7 ^= X##p6; \ #if SKEIN_UNROLL_512 == 0 #define R512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) /* unrolled */ \ Round512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) \ Skein_Show_R_Ptr(BLK_BITS,&ctx->h,rNum,Xptr); #define I512(R) \ X0 += ks[((R)+1) % 9]; /* inject the key schedule value */ \ X1 += ks[((R)+2) % 9]; \ X2 += ks[((R)+3) % 9]; \ X3 += ks[((R)+4) % 9]; \ X4 += ks[((R)+5) % 9]; \ X5 += ks[((R)+6) % 9] + ts[((R)+1) % 3]; \ X6 += ks[((R)+7) % 9] + ts[((R)+2) % 3]; \ X7 += ks[((R)+8) % 9] + (R)+1; \ Skein_Show_R_Ptr(BLK_BITS,&ctx->h,SKEIN_RND_KEY_INJECT,Xptr); #else /* looping version */ #define R512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) \ Round512(p0,p1,p2,p3,p4,p5,p6,p7,ROT,rNum) \ Skein_Show_R_Ptr(BLK_BITS,&ctx->h,4*(r-1)+rNum,Xptr); #define I512(R) \ X0 += ks[r+(R)+0]; /* inject the key schedule value */ \ X1 += ks[r+(R)+1]; \ X2 += ks[r+(R)+2]; \ X3 += ks[r+(R)+3]; \ X4 += ks[r+(R)+4]; \ X5 += ks[r+(R)+5] + ts[r+(R)+0]; \ X6 += ks[r+(R)+6] + ts[r+(R)+1]; \ X7 += ks[r+(R)+7] + r+(R) ; \ ks[r + (R)+8] = ks[r+(R)-1]; /* rotate key schedule */ \ ts[r + (R)+2] = ts[r+(R)-1]; \ Skein_Show_R_Ptr(BLK_BITS,&ctx->h,SKEIN_RND_KEY_INJECT,Xptr); for (r=1;r < 2*RCNT;r+=2*SKEIN_UNROLL_512) /* loop thru it */ #endif /* end of looped code definitions */ { #define R512_8_rounds(R) /* do 8 full rounds */ \ R512(0,1,2,3,4,5,6,7,R_512_0,8*(R)+ 1); \ R512(2,1,4,7,6,5,0,3,R_512_1,8*(R)+ 2); \ R512(4,1,6,3,0,5,2,7,R_512_2,8*(R)+ 3); \ R512(6,1,0,7,2,5,4,3,R_512_3,8*(R)+ 4); \ I512(2*(R)); \ R512(0,1,2,3,4,5,6,7,R_512_4,8*(R)+ 5); \ R512(2,1,4,7,6,5,0,3,R_512_5,8*(R)+ 6); \ R512(4,1,6,3,0,5,2,7,R_512_6,8*(R)+ 7); \ R512(6,1,0,7,2,5,4,3,R_512_7,8*(R)+ 8); \ I512(2*(R)+1); /* and key injection */ R512_8_rounds( 0); #define R512_Unroll_R(NN) ((SKEIN_UNROLL_512 == 0 && SKEIN_512_ROUNDS_TOTAL/8 > (NN)) || (SKEIN_UNROLL_512 > (NN))) #if R512_Unroll_R( 1) R512_8_rounds( 1); #endif #if R512_Unroll_R( 2) R512_8_rounds( 2); #endif #if R512_Unroll_R( 3) R512_8_rounds( 3); #endif #if R512_Unroll_R( 4) R512_8_rounds( 4); #endif #if R512_Unroll_R( 5) R512_8_rounds( 5); #endif #if R512_Unroll_R( 6) R512_8_rounds( 6); #endif #if R512_Unroll_R( 7) R512_8_rounds( 7); #endif #if R512_Unroll_R( 8) R512_8_rounds( 8); #endif #if R512_Unroll_R( 9) R512_8_rounds( 9); #endif #if R512_Unroll_R(10) R512_8_rounds(10); #endif #if R512_Unroll_R(11) R512_8_rounds(11); #endif #if R512_Unroll_R(12) R512_8_rounds(12); #endif #if R512_Unroll_R(13) R512_8_rounds(13); #endif #if R512_Unroll_R(14) R512_8_rounds(14); #endif #if (SKEIN_UNROLL_512 > 14) #error "need more unrolling in Skein_512_Process_Block" #endif } ((u64b_t *) output)[0] = X0; ((u64b_t *) output)[1] = X1; ((u64b_t *) output)[2] = X2; ((u64b_t *) output)[3] = X3; ((u64b_t *) output)[4] = X4; ((u64b_t *) output)[5] = X5; ((u64b_t *) output)[6] = X6; ((u64b_t *) output)[7] = X7; output += SKEIN_512_BLOCK_BYTES; } while (--blkCnt); } #if defined(SKEIN_CODE_SIZE) || defined(SKEIN_PERF) size_t Skein_512_Process_Block_CodeSize(void) { return ((u08b_t *) Skein_512_Process_Block_CodeSize) - ((u08b_t *) Skein_512_Process_Block); } uint_t Skein_512_Unroll_Cnt(void) { return SKEIN_UNROLL_512; } #endif #endif ./libdieharder/bauer/skein_port.h0000664000175000017500000001074013707046103015334 0ustar eddedd#ifndef _SKEIN_PORT_H_ #define _SKEIN_PORT_H_ /******************************************************************* ** ** Platform-specific definitions for Skein hash function. ** ** Source code author: Doug Whiting, 2008. ** ** This algorithm and source code is released to the public domain. ** ** Many thanks to Brian Gladman for his portable header files. ** ** To port Skein to an "unsupported" platform, change the definitions ** in this file appropriately. ** ********************************************************************/ #include "brg_types.h" /* get integer type definitions */ typedef unsigned int uint_t; /* native unsigned integer */ typedef uint_8t u08b_t; /* 8-bit unsigned integer */ typedef uint_64t u64b_t; /* 64-bit unsigned integer */ #ifndef RotL_64 #define RotL_64(x,N) (((x) << (N)) | ((x) >> (64-(N)))) #endif /* * Skein is "natively" little-endian (unlike SHA-xxx), for optimal * performance on x86 CPUs. The Skein code requires the following * definitions for dealing with endianness: * * SKEIN_NEED_SWAP: 0 for little-endian, 1 for big-endian * Skein_Put64_LSB_First * Skein_Get64_LSB_First * Skein_Swap64 * * If SKEIN_NEED_SWAP is defined at compile time, it is used here * along with the portable versions of Put64/Get64/Swap64, which * are slow in general. * * Otherwise, an "auto-detect" of endianness is attempted below. * If the default handling doesn't work well, the user may insert * platform-specific code instead (e.g., for big-endian CPUs). * */ #ifndef SKEIN_NEED_SWAP /* compile-time "override" for endianness? */ #include "brg_endian.h" /* get endianness selection */ #if PLATFORM_BYTE_ORDER == IS_BIG_ENDIAN /* here for big-endian CPUs */ #define SKEIN_NEED_SWAP (1) #elif PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN /* here for x86 and x86-64 CPUs (and other detected little-endian CPUs) */ #define SKEIN_NEED_SWAP (0) #if PLATFORM_MUST_ALIGN == 0 /* ok to use "fast" versions? */ #define Skein_Put64_LSB_First(dst08,src64,bCnt) memcpy(dst08,src64,bCnt) #define Skein_Get64_LSB_First(dst64,src08,wCnt) memcpy(dst64,src08,8*(wCnt)) #endif #else #error "Skein needs endianness setting!" #endif #endif /* ifndef SKEIN_NEED_SWAP */ /* ****************************************************************** * Provide any definitions still needed. ****************************************************************** */ #ifndef Skein_Swap64 /* swap for big-endian, nop for little-endian */ #if SKEIN_NEED_SWAP #define Skein_Swap64(w64) \ ( (( ((u64b_t)(w64)) & 0xFF) << 56) | \ (((((u64b_t)(w64)) >> 8) & 0xFF) << 48) | \ (((((u64b_t)(w64)) >>16) & 0xFF) << 40) | \ (((((u64b_t)(w64)) >>24) & 0xFF) << 32) | \ (((((u64b_t)(w64)) >>32) & 0xFF) << 24) | \ (((((u64b_t)(w64)) >>40) & 0xFF) << 16) | \ (((((u64b_t)(w64)) >>48) & 0xFF) << 8) | \ (((((u64b_t)(w64)) >>56) & 0xFF) ) ) #else #define Skein_Swap64(w64) (w64) #endif #endif /* ifndef Skein_Swap64 */ #ifndef Skein_Put64_LSB_First void Skein_Put64_LSB_First(u08b_t *dst,const u64b_t *src,size_t bCnt) #ifdef SKEIN_PORT_CODE /* instantiate the function code here? */ { /* this version is fully portable (big-endian or little-endian), but slow */ size_t n; for (n=0;n>3] >> (8*(n&7))); } #else ; /* output only the function prototype */ #endif #endif /* ifndef Skein_Put64_LSB_First */ #ifndef Skein_Get64_LSB_First void Skein_Get64_LSB_First(u64b_t *dst,const u08b_t *src,size_t wCnt) #ifdef SKEIN_PORT_CODE /* instantiate the function code here? */ { /* this version is fully portable (big-endian or little-endian), but slow */ size_t n; for (n=0;n<8*wCnt;n+=8) dst[n/8] = (((u64b_t) src[n ]) ) + (((u64b_t) src[n+1]) << 8) + (((u64b_t) src[n+2]) << 16) + (((u64b_t) src[n+3]) << 24) + (((u64b_t) src[n+4]) << 32) + (((u64b_t) src[n+5]) << 40) + (((u64b_t) src[n+6]) << 48) + (((u64b_t) src[n+7]) << 56) ; } #else ; /* output only the function prototype */ #endif #endif /* ifndef Skein_Get64_LSB_First */ #endif /* ifndef _SKEIN_PORT_H_ */ ./libdieharder/bauer/rijndael-alg-fst.h0000664000175000017500000000365313707046103016307 0ustar eddedd/** * rijndael-alg-fst.h * * @version 3.0 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. */ #ifndef __RIJNDAEL_ALG_FST_H #define __RIJNDAEL_ALG_FST_H #define MAXKC (256/32) #define MAXKB (256/8) #define MAXNR 14 typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]); void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]); #ifdef INTERMEDIATE_VALUE_KAT void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); #endif /* INTERMEDIATE_VALUE_KAT */ #endif /* __RIJNDAEL_ALG_FST_H */ ./libdieharder/bauer/rng_threefish.c0000664000175000017500000000627213707046103016006 0ustar eddedd/* rng_threefish * * Copyright (C) 1996, 1997, 1998, 1999, 2000 James Theiler, Brian Gough * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include "skein.h" // State blocks = 1 for weakest form #define STATE_BLOCKS (1) #define BLOCKS_SIZE (64 * STATE_BLOCKS) #define Threefish_512_Process_Blocks(a,b,c,d) Threefish_512_Process_Blocks64(a,b,c,d) /* * This is a wrapping of the Threefish algorithm as a generator */ typedef struct { Threefish_512_Ctxt_t ctx; unsigned char block[BLOCKS_SIZE]; short int pos; } Threefish_state_t; unsigned long int threefish_get (void *vstate); double threefish_get_double (void *vstate); void threefish_set (void *vstate, unsigned long int s); #ifndef BADRNG unsigned long int threefish_get_long (void *vstate) { Threefish_state_t *state = vstate; unsigned long int ret; if (state->pos + sizeof(unsigned long int) > BLOCKS_SIZE) { Threefish_512_Process_Blocks(&(state->ctx), state->block, state->block, STATE_BLOCKS); state->pos = 0; } ret = *((unsigned long int *) (state->block + state->pos)); state->pos += sizeof(unsigned long int); return(ret); } unsigned long int threefish_get (void *vstate) { Threefish_state_t *state = vstate; unsigned int ret; if (state->pos + sizeof(ret) > BLOCKS_SIZE) { Threefish_512_Process_Blocks(&(state->ctx), state->block, state->block, STATE_BLOCKS); state->pos = 0; } ret = *((unsigned int *) (state->block + state->pos)); state->pos += sizeof(ret); // ret &= 0x7fffffff; return(ret); } double threefish_get_double (void *vstate) { // return threefish_get_long(vstate) / (double) ULONG_MAX; return (double) threefish_get(vstate) / (double) (UINT_MAX >> 0); } void threefish_set (void *vstate, unsigned long int s) { Threefish_state_t *state = vstate; int i; memset(state, 0, sizeof(*state)); for (i = 0; i < 16; i++) ((unsigned char *) state->ctx.T)[i] = 112 + i; for (i = 0; i < 64; i++) ((unsigned char *) state->ctx.Key)[i] = 64 + i; *((unsigned long int *) state->block) = s; Threefish_512_Process_Blocks(&(state->ctx), state->block, state->block, 1); for (i = 1; i < STATE_BLOCKS; i++) { state->ctx.T[0] = i; Threefish_512_Process_Blocks(&(state->ctx), state->block, state->block+(i*64), 1); } state->ctx.T[0] = 112; return; } static const gsl_rng_type threefish_type = { "Threefish_OFB", /* name */ UINT_MAX>>0, // UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (Threefish_state_t), &threefish_set, &threefish_get, &threefish_get_double}; const gsl_rng_type *gsl_rng_threefish = &threefish_type; #endif ./libdieharder/bauer/rijndael-alg-fst.c0000664000175000017500000017426413707046103016311 0ustar eddedd/** * rijndael-alg-fst.c * * @version 3.0 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. */ #include #include #include "rijndael-alg-fst.h" /* Te0[x] = S [x].[02, 01, 01, 03]; Te1[x] = S [x].[03, 02, 01, 01]; Te2[x] = S [x].[01, 03, 02, 01]; Te3[x] = S [x].[01, 01, 03, 02]; Te4[x] = S [x].[01, 01, 01, 01]; Td0[x] = Si[x].[0e, 09, 0d, 0b]; Td1[x] = Si[x].[0b, 0e, 09, 0d]; Td2[x] = Si[x].[0d, 0b, 0e, 09]; Td3[x] = Si[x].[09, 0d, 0b, 0e]; Td4[x] = Si[x].[01, 01, 01, 01]; */ static const u32 Te0[256] = { 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, }; static const u32 Te1[256] = { 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, }; static const u32 Te2[256] = { 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, }; static const u32 Te3[256] = { 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, }; static const u32 Te4[256] = { 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, }; static const u32 Td0[256] = { 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, }; static const u32 Td1[256] = { 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, }; static const u32 Td2[256] = { 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, }; static const u32 Td3[256] = { 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, }; static const u32 Td4[256] = { 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, }; static const u32 rcon[] = { 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ }; #define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) #ifdef _MSC_VER #define GETU32(p) SWAP(*((u32 *)(p))) #define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); } #else #define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) #define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); } #endif /** * Expand the cipher key into the encryption key schedule. * * @return the number of rounds for the given cipher key size. */ int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits) { int i = 0; u32 temp; rk[0] = GETU32(cipherKey ); rk[1] = GETU32(cipherKey + 4); rk[2] = GETU32(cipherKey + 8); rk[3] = GETU32(cipherKey + 12); if (keyBits == 128) { for (;;) { temp = rk[3]; rk[4] = rk[0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[5] = rk[1] ^ rk[4]; rk[6] = rk[2] ^ rk[5]; rk[7] = rk[3] ^ rk[6]; if (++i == 10) { return 10; } rk += 4; } } rk[4] = GETU32(cipherKey + 16); rk[5] = GETU32(cipherKey + 20); if (keyBits == 192) { for (;;) { temp = rk[ 5]; rk[ 6] = rk[ 0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[ 7] = rk[ 1] ^ rk[ 6]; rk[ 8] = rk[ 2] ^ rk[ 7]; rk[ 9] = rk[ 3] ^ rk[ 8]; if (++i == 8) { return 12; } rk[10] = rk[ 4] ^ rk[ 9]; rk[11] = rk[ 5] ^ rk[10]; rk += 6; } } rk[6] = GETU32(cipherKey + 24); rk[7] = GETU32(cipherKey + 28); if (keyBits == 256) { for (;;) { temp = rk[ 7]; rk[ 8] = rk[ 0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[ 9] = rk[ 1] ^ rk[ 8]; rk[10] = rk[ 2] ^ rk[ 9]; rk[11] = rk[ 3] ^ rk[10]; if (++i == 7) { return 14; } temp = rk[11]; rk[12] = rk[ 4] ^ (Te4[(temp >> 24) ] & 0xff000000) ^ (Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(temp >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(temp ) & 0xff] & 0x000000ff); rk[13] = rk[ 5] ^ rk[12]; rk[14] = rk[ 6] ^ rk[13]; rk[15] = rk[ 7] ^ rk[14]; rk += 8; } } return 0; } /** * Expand the cipher key into the decryption key schedule. * * @return the number of rounds for the given cipher key size. */ int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits) { int Nr, i, j; u32 temp; /* expand the cipher key: */ Nr = rijndaelKeySetupEnc(rk, cipherKey, keyBits); /* invert the order of the round keys: */ for (i = 0, j = 4*Nr; i < j; i += 4, j -= 4) { temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; } /* apply the inverse MixColumn transform to all round keys but the first and the last: */ for (i = 1; i < Nr; i++) { rk += 4; rk[0] = Td0[Te4[(rk[0] >> 24) ] & 0xff] ^ Td1[Te4[(rk[0] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[0] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[0] ) & 0xff] & 0xff]; rk[1] = Td0[Te4[(rk[1] >> 24) ] & 0xff] ^ Td1[Te4[(rk[1] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[1] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[1] ) & 0xff] & 0xff]; rk[2] = Td0[Te4[(rk[2] >> 24) ] & 0xff] ^ Td1[Te4[(rk[2] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[2] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[2] ) & 0xff] & 0xff]; rk[3] = Td0[Te4[(rk[3] >> 24) ] & 0xff] ^ Td1[Te4[(rk[3] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[3] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[3] ) & 0xff] & 0xff]; } return Nr; } void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]) { u32 s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL int r; #endif /* ?FULL_UNROLL */ /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(pt ) ^ rk[0]; s1 = GETU32(pt + 4) ^ rk[1]; s2 = GETU32(pt + 8) ^ rk[2]; s3 = GETU32(pt + 12) ^ rk[3]; #ifdef FULL_UNROLL /* round 1: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[ 4]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[ 5]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[ 6]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[ 7]; /* round 2: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[ 8]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[ 9]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[10]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[11]; /* round 3: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[12]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[13]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[14]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[15]; /* round 4: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[16]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[17]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[18]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[19]; /* round 5: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[20]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[21]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[22]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[23]; /* round 6: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[24]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[25]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[26]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[27]; /* round 7: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[28]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[29]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[30]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[31]; /* round 8: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[32]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[33]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[34]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[35]; /* round 9: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[36]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[37]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[38]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[39]; if (Nr > 10) { /* round 10: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[40]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[41]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[42]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[43]; /* round 11: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[44]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[45]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[46]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[47]; if (Nr > 12) { /* round 12: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[48]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[49]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[50]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[51]; /* round 13: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[52]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[53]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[54]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[55]; } } rk += Nr << 2; #else /* !FULL_UNROLL */ /* * Nr - 1 full rounds: */ r = Nr >> 1; for (;;) { t0 = Te0[(s0 >> 24) ] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[(s3 ) & 0xff] ^ rk[4]; t1 = Te0[(s1 >> 24) ] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[(s0 ) & 0xff] ^ rk[5]; t2 = Te0[(s2 >> 24) ] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[(s1 ) & 0xff] ^ rk[6]; t3 = Te0[(s3 >> 24) ] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[(s2 ) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) { break; } s0 = Te0[(t0 >> 24) ] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[(t3 ) & 0xff] ^ rk[0]; s1 = Te0[(t1 >> 24) ] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[(t0 ) & 0xff] ^ rk[1]; s2 = Te0[(t2 >> 24) ] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[(t1 ) & 0xff] ^ rk[2]; s3 = Te0[(t3 >> 24) ] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[(t2 ) & 0xff] ^ rk[3]; } #endif /* ?FULL_UNROLL */ /* * apply last round and * map cipher state to byte array block: */ s0 = (Te4[(t0 >> 24) ] & 0xff000000) ^ (Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t3 ) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32(ct , s0); s1 = (Te4[(t1 >> 24) ] & 0xff000000) ^ (Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t0 ) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32(ct + 4, s1); s2 = (Te4[(t2 >> 24) ] & 0xff000000) ^ (Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t1 ) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32(ct + 8, s2); s3 = (Te4[(t3 >> 24) ] & 0xff000000) ^ (Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t2 ) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32(ct + 12, s3); } void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]) { u32 s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL int r; #endif /* ?FULL_UNROLL */ /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(ct ) ^ rk[0]; s1 = GETU32(ct + 4) ^ rk[1]; s2 = GETU32(ct + 8) ^ rk[2]; s3 = GETU32(ct + 12) ^ rk[3]; #ifdef FULL_UNROLL /* round 1: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[ 4]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[ 5]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[ 6]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[ 7]; /* round 2: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[ 8]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[ 9]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[10]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[11]; /* round 3: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[12]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[13]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[14]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[15]; /* round 4: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[16]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[17]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[18]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[19]; /* round 5: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[20]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[21]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[22]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[23]; /* round 6: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[24]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[25]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[26]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[27]; /* round 7: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[28]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[29]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[30]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[31]; /* round 8: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[32]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[33]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[34]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[35]; /* round 9: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[36]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[37]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[38]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[39]; if (Nr > 10) { /* round 10: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[40]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[41]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[42]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[43]; /* round 11: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[44]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[45]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[46]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[47]; if (Nr > 12) { /* round 12: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[48]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[49]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[50]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[51]; /* round 13: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[52]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[53]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[54]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[55]; } } rk += Nr << 2; #else /* !FULL_UNROLL */ /* * Nr - 1 full rounds: */ r = Nr >> 1; for (;;) { t0 = Td0[(s0 >> 24) ] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[(s1 ) & 0xff] ^ rk[4]; t1 = Td0[(s1 >> 24) ] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[(s2 ) & 0xff] ^ rk[5]; t2 = Td0[(s2 >> 24) ] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[(s3 ) & 0xff] ^ rk[6]; t3 = Td0[(s3 >> 24) ] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[(s0 ) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) { break; } s0 = Td0[(t0 >> 24) ] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[(t1 ) & 0xff] ^ rk[0]; s1 = Td0[(t1 >> 24) ] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[(t2 ) & 0xff] ^ rk[1]; s2 = Td0[(t2 >> 24) ] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[(t3 ) & 0xff] ^ rk[2]; s3 = Td0[(t3 >> 24) ] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[(t0 ) & 0xff] ^ rk[3]; } #endif /* ?FULL_UNROLL */ /* * apply last round and * map cipher state to byte array block: */ s0 = (Td4[(t0 >> 24) ] & 0xff000000) ^ (Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t1 ) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32(pt , s0); s1 = (Td4[(t1 >> 24) ] & 0xff000000) ^ (Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t2 ) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32(pt + 4, s1); s2 = (Td4[(t2 >> 24) ] & 0xff000000) ^ (Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t3 ) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32(pt + 8, s2); s3 = (Td4[(t3 >> 24) ] & 0xff000000) ^ (Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t0 ) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32(pt + 12, s3); } #ifdef INTERMEDIATE_VALUE_KAT void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds) { int r; u32 s0, s1, s2, s3, t0, t1, t2, t3; /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(block ) ^ rk[0]; s1 = GETU32(block + 4) ^ rk[1]; s2 = GETU32(block + 8) ^ rk[2]; s3 = GETU32(block + 12) ^ rk[3]; rk += 4; /* * Nr - 1 full rounds: */ for (r = (rounds < Nr ? rounds : Nr - 1); r > 0; r--) { t0 = Te0[(s0 >> 24) ] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[(s3 ) & 0xff] ^ rk[0]; t1 = Te0[(s1 >> 24) ] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[(s0 ) & 0xff] ^ rk[1]; t2 = Te0[(s2 >> 24) ] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[(s1 ) & 0xff] ^ rk[2]; t3 = Te0[(s3 >> 24) ] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[(s2 ) & 0xff] ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; rk += 4; } /* * apply last round and * map cipher state to byte array block: */ if (rounds == Nr) { t0 = (Te4[(s0 >> 24) ] & 0xff000000) ^ (Te4[(s1 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s2 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s3 ) & 0xff] & 0x000000ff) ^ rk[0]; t1 = (Te4[(s1 >> 24) ] & 0xff000000) ^ (Te4[(s2 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s3 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s0 ) & 0xff] & 0x000000ff) ^ rk[1]; t2 = (Te4[(s2 >> 24) ] & 0xff000000) ^ (Te4[(s3 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s0 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s1 ) & 0xff] & 0x000000ff) ^ rk[2]; t3 = (Te4[(s3 >> 24) ] & 0xff000000) ^ (Te4[(s0 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s2 ) & 0xff] & 0x000000ff) ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; } PUTU32(block , s0); PUTU32(block + 4, s1); PUTU32(block + 8, s2); PUTU32(block + 12, s3); } void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds) { int r; u32 s0, s1, s2, s3, t0, t1, t2, t3; /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(block ) ^ rk[0]; s1 = GETU32(block + 4) ^ rk[1]; s2 = GETU32(block + 8) ^ rk[2]; s3 = GETU32(block + 12) ^ rk[3]; rk += 4; /* * Nr - 1 full rounds: */ for (r = (rounds < Nr ? rounds : Nr) - 1; r > 0; r--) { t0 = Td0[(s0 >> 24) ] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[(s1 ) & 0xff] ^ rk[0]; t1 = Td0[(s1 >> 24) ] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[(s2 ) & 0xff] ^ rk[1]; t2 = Td0[(s2 >> 24) ] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[(s3 ) & 0xff] ^ rk[2]; t3 = Td0[(s3 >> 24) ] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[(s0 ) & 0xff] ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; rk += 4; } /* * complete the last round and * map cipher state to byte array block: */ t0 = (Td4[(s0 >> 24) ] & 0xff000000) ^ (Td4[(s3 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s2 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s1 ) & 0xff] & 0x000000ff); t1 = (Td4[(s1 >> 24) ] & 0xff000000) ^ (Td4[(s0 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s3 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s2 ) & 0xff] & 0x000000ff); t2 = (Td4[(s2 >> 24) ] & 0xff000000) ^ (Td4[(s1 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s0 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s3 ) & 0xff] & 0x000000ff); t3 = (Td4[(s3 >> 24) ] & 0xff000000) ^ (Td4[(s2 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s0 ) & 0xff] & 0x000000ff); if (rounds == Nr) { t0 ^= rk[0]; t1 ^= rk[1]; t2 ^= rk[2]; t3 ^= rk[3]; } PUTU32(block , t0); PUTU32(block + 4, t1); PUTU32(block + 8, t2); PUTU32(block + 12, t3); } #endif /* INTERMEDIATE_VALUE_KAT */ ./libdieharder/NOTES0000664000175000017500000007544313707046103012536 0ustar eddeddThese are some simple design notes to document this program and to guide further work. This program is designed to do the following: a) Encapsulate every RNG known to humans for testing. We will use the GSL both for its rich supply of ready-to-test RNG's and for its relatively simple and consistent encapsulation of any new RNG's we add -- /dev/random is already encapsulated and can serve as a template for future work. [1/16/03 rgb] b) test speed of the available RNG's. Both: i) In "native/standard" subroutine calls (with the subroutine call overhead included). [This is done, 1/16/03, rgb] ii) In a custom "vector" form, where a whole block of dedicated memory is filled in one pass from a given algorithm, and subsequently accessed via a macro that only calls for a refill when the vector is exhausted. c) test quality of the available RNG's. There are at least three primary sources of tests that will be used in this tool. i) RGB tests. These are the tests I myself have implemented. To the best of my knowledge these are new, although of course my knowledge is far from complete. ii) DIEHARD, by Dr. George Marsaglia of FSU. This is a well-known and venerable "battery of tests" of RNG's. iii) NIST STS/FIPS (NIST special publication 800-22, revised 5/15/2001). This is also a suite of RNG tests, with some overlap with DIEHARD. I will probably implement only selected tests from this suite at least at first, as some of them appear to be relatively weak compared to e.g. rgb_binomial and to test basically the same thing. iv) Additional tests that are to be found on the web and in the literature, where they appear to test things not well-represented in tests already implemented in one suite or another. d) test quality of any input set of "random" data according to i-iv in c). This will let us test arbitrary RNG's via their data, including and especially hardware generators. Note that hardware generators available as "devices" will be interfaced via a). This step will only be implemented when enough tests to make it worthwhile are already implemented. Addendum and explanation of copyright issues. The STS was written by a variety of authors: Andrew Rukhin, Juan Soto, James Nechvatal, Miles Smid, Elaine Barker, Stefan Leigh, Mark Levenson, Mark Vangel, David Banks, Alan Heckert, James Dray, San Vo. None of the actual code in the STS suite has been used in this tool -- all testing routines have been written using only the STS published document as an excellent reference. GSL routines have been used throughout, where possible, for computing things such as erfc or Q. Since I am not using their code, I am omitting their copyright notice, but wish to acknowledge their documentation of the selected tests anyway. All the code in dieharder is GPL open source in any event, but academic credit matters. Similarly, DIEHARD is the work of George Marsaglia. Dr. Marsaglia doen't have any written copyright notice or license terms that I could find in the sources provided on the website where he openly distributes source for his own suite, but in keeping with a minor design goal of completely original GPL code, all the DIEHARD algorithms have also been completely rewritten without directly utilizing any of the actual diehard code. Fortunately, Dr. Marsaglia also provides clear documentation for his test suite, making it a fairly simple matter to implement the tests. Source code WAS examined (but not copied) to clarify places where the documentation of the tests was openly erroneous (as in the parking lot test) or unclear but dieharder code is completely original and its development thoroughly documented in CVS and (later) SVN tree form, checkin by checkin. The relatively few tests I have added are motivated by a desire to get a less ambiguous answer than many of these tests provide. In many cases it is not (or should not) be correct to say that one "accepts" a generator as being a good one just because a test run of the generator has a p-value significantly greater than 0. A few moment's experimentation, especially with relatively small data sets, should convince one that even "bad" RNG's can sometimes, or even frequently, return an "acceptable" p-value. Only when the size of the test is increased, or the test is repeatedly run with different seeds, does it become apparent that although it sometimes performs acceptably (the result of a run isn't inconsistent with the generator producing "real" random numbers) it sometimes performs so poorly that the result can >>never<< be explained or believed for a true random number generator. That is, while a really poor p-value allows us to reject the hypothesis that the tested generator is random, acceptable p-values, even a fair number of them in repeated tests, do not usually support accepting the hypothesis -- at best they don't support rejection. Running a test repeatedly to generate a full distribution of results and then directly comparing the entire distribution with theory appears to provide greater sensitivity and accuracy in the rejection process than "simple" tests that generate only a single quantity. This motivated the rgb_binomial test, which has proven very good at rejecting "bad" rng's. Similarily, it may prove useful to directly generate an empirical distribution of p-values themselves (repeating a test many times with different seeds and binning the p-values) and compare it to the expected distribution (which might work for erfc-based p-values, although not so well for Q-based p-values). This can replace running a test many times looking for an anomalous number of "poor" p-values mixed in with ones that are not so poor as to lead to immediate rejection. Contributions of rng's (consistently GSL-wrapped as e.g. dev_random.c demonstrates) and/or additional tests would be most welcome. rgb STS Critique, By Statistic The Monobit Statistic The monobit statistic checks to make sure that the raw number of 1's and 0's approximately balance in a given bitstring. This is actually a decent thing to test, but there is a better way to test it. Given a relatively short bitstring (e.g. n<=160 bits), the probability that it will have k bits according to the null hypothesis is p(n,k,1/2) (the binomial distribution of outcomes over n independent trials, each with p=1/2). If one runs m runs of n independent trials each, and accumulates X[k] (the count histogram for each possible value of output k in [0,n]) then one has X[k], the expected value histogram Y(k) = m*p(n,k,1/2), and sigma(k) = sqrt(m)*p(n,k,1/2). From this it is simple to compute a p-value from an incomplete gamma function for the >>details<< of the distribution of 1's. One can even do it two ways -- with an independent random number seed for each of the m samples, or by simply running the rng with its original seed long enough to produce m*n bits. This binomial test is stronger than the monobit test. Any result histogram that passes it necessarily passes the monobit test for the aggregate distribution with m*n bits (as I hope is obvious -- passing it means that the distribution is binomial in detail, not just uniformly balanced. However, it is simple enough to compute the monobit result more or less in passing in the binomial test by simply summing the count histogram at the end or aggregating a total 1-bit count as one goes. In that case one can generate two p-values -- a p-value for the monobit test and one for the binomial -- in one pass for the same data. I would predict that the binomial p-value is strictly less than the monobit p-value, and that there exist rng's that pass the monobit that explicitly fail the binomial, but we can determine that empirically. This chisq-based binomial test methodology can be used to improve nearly any single test statistic in sts. Instead of looking at the expected value of the statistic itself, frame its generation as a Bernoulli trial with a known percentage, compute the expected binomial distribution and its error, generate the result histogram as the test statistic, and use chisq and the complementary incomplete gamma function Q(a,x) to generate a p-value over many smaller "independent" trials instead of one long one. This suggests ways of improving e.g. the runs and other tests as well, see below. The Runs Statistic For n bits, count the test statistic X as the number of (overlapping) 01 and 10 pairs and add one. Compute p_1 = (# ones)/n, p_0 = (1 - p_1) (and ensure that they are close enough to p_0 = p_1 = 0.5). Compute the expected number of 01 and 10 pairs as Y = 2*n*p_1*p_0. Compute the expected error in the number of 01 and 10 pairs as sigma = 2*sqrt(2*n)*p_1*p_0. Finally, compute the p-value as erfc(|X - Y|/sigma). This methodology seems questionable, at least to me. First of all, it seems odd to use a p_0 and p_1 derived from the sample, given that the null hypothesis is p_0 = p_1 = 0.5 and independent. Ensuring that the sample passes monobit (in a slightly different formulation) to start means that one has conditionally >>accepted<< this null hypothesis for the rng before beginning the runs test, using different p's implies a different null hypothesis. In addition, given their prior assumption that p_1 = # ones/# bits, their computation of the probability of p_01 and p_10 (and hence Y) is erroneous. The probability of 01 in a finite string of n bits, subject to constrained numbers of 0's and 1's needs to be computed WITHOUT replacement, just as one does with a deck of cards. After shuffling a deck of cards known to contain four aces, the probability that the top two cards are aces is not (4/52)*(4/52), but rather (4/52)*(3/52) -- if the first card is an ace, it means there are fewer aces left in the deck for the second card. To be consistent, they should compute the expected number of 01 strings in a 10-bit sequence containing 6 1's as (4/10)(6/9) and not (4/10)(6/10). They need to choose between a null hypothesis of p_1 = p_0 = 0.5 (where they can presume successive bit probabilities to be independent) and a null hypothesis of p_1 = (# 1's)/(# bits) and use "probability for a 1, given that the first draw is a 0". This matters for short strings. Next, they don't wrap the n-value bitstring into a torus. Consequently, there are only n-1 bitpairs examined, and thus the expected value should be Y = 2*(n-1)*p_1*p_0 and not 2*n*p_1*p_0. For large n, of course, it won't matter (neither will the previous two problems, at least not much), but it is surprisingly sloppy mathematically. In addition there is no reason I can see to add a 1 to the test statistic of (# of 01 and 10 pairs in an overlapping scan of the string). This is very difficult to understand, as it clearly breaks the symmetry of this test statistic with the complementary view where the test statistic X is (# of 00 or 11 pairs in an overlapping scan of the string) but Y and sigma are the same -- the sum of the Y's necessarily equals n (or n-1, if that is the number of examined pairs). This leads to an obvious problem for short strings, e.g. n = 2, where the formula they give for the expected number of 01 or 10's measured is 2*2*(1/2)*(1/2) = 1, but the statistic can only take on the values 1 or 2, each with probability 1/2. There is something odd here. Finally, it is more than a bit crazy to view this assessment as somehow a measure of excessive sequential correlation, as a measure of "runs". Let us reframe the test statistic (count of 01 and 10's) in terms of our null hypothesis. Presuming random, equal probability 0's and 1's, we expect 25% each of 00 01 10 11. Given an exemplary bit string of e.g. 1001101011, it doesn't really matter if one examines disjoint bitpairs (10 01 10 10 11) (n/2 bitpairs for n even) or the overlapping bitpairs 10 00 01 11 10 01 10 01 11 11 (wrapping the last pair around periodically to ensure symmetry and n pairs of bits, EACH pair is expected to occur with a frequency, in the limit of many bitpairs, of #bitpairs*(1/4). Furthermore, in an ensemble of measurements of bitpair frequencies, each distinct possibility is (for lots of identical bitsets) to be binomially distributed with respect to the rest (as in p_01 = 1/4, p_!01 = 3/4) regardless of whether or not sequential overlapping bitpairs are counted. We can understand this by noting that our null hypothesis (a random generator producing pairs of bits) can be applied to any pair of bits in any string. Note also that in a given bitstring with periodic wraparound, the number of 01 (overlapping) pairs must equal the number of 10 pairs. This can be proven with ease. Every bit flipped can either change >>both<< the 01 and 10 count by one (flipping a bit with two neighbors that are both 0 or both 1) or it can leave them both the same (flipping a bit with a neighboring 0 AND a neighboring 1). This wreaks a certain measure of havoc on the notion that each sequentially overlapping pair examined is an independent measurement -- measuring any pair of (01 or 10 count) and (00 or 11 count) suffices to determine the counts for all four possible bit pairs. The only question remaining is whether measuring the counts using overlapping bitpairs is more or less rigorous a test than measuring the counts using non-overlapping pairs. That is, can a generator create a bitstring that is correctly pairwise distributed in both non-overlapping pair sequences but that is NOT correctly pairwise distributed in overlapping pair sequences or vice versa. The answer is not terribly obvious, but if we make the very weak presumption that our test measurments do not depend, on average, on whether we begin them systematically at bit 0 or bit 1 (so that if we have a bad generator we'll eventually fail for either starting point with roughly equal frequency for different starting seeds and/or first-bit displacements), then measuring both possibilities for each string should (on average) produce results that are conservatively related to measuring one possibility on twice as many strings. To put it another way, if a generator creates strings that >>fail<< the overlapping test, they would necessarily fail at least one of the two non-overlapping tests possible for the same bitstring, since the counts for the two non-overlapping tests add to produce the count for the non-overlapping test. For this addition to push values out of acceptable ranges one would require two deviations from the expected value in the same direction. If we only make the extremely weak assumption that failure of the non-overlapping tests is equally likely for both possible cyclic starting points, the 1/sqrt(2) scaling implicit in using both strings is thus conservative. However, we can easily average over this as well by simply randomly starting each non-overlapping run on bit 0 or bit 1. This might actually simplify the code and provides an ADDITIONAL measure of randomness as the two results should themselves be binomially distributed, independently. The final problem with runs is that it is not easy to see how to extend it to a higher order. For example, does 101 occur too often? How about 010? Again, each bit pattern should occur at a rigorously predicted rate for p_0 = p_1 = 0.5 and independent bits, e.g. p_000 = p_001 = p_010 = ... = 1/8 for any distinct three-bit combination, p_0000... = 1/16 for four-bit combinations, and so on. EACH of these outcomes should occur with binomially distributed frequencies when measured as a bernoulli trial with p_xyz, (1 - p_xyz), making it easy to compute both Y and sigma. This suggests that the correct generalization of monobit and runs (and probably more of the sts tests) is a test that (in one pass): a) presumes a valid bitlevel rng so that p_0 = p_1 = 0.5 exactly, all bits independent (null hypothesis). b) counts 1's (and infers 0's) for M sets of N bits, incrementing a histogram vector of the number of 1's observed accordingly. This is rigorously compared for EACH possible value of the count to the expected binomial distribution of counts. c) counts e.g. 00,01,10,11 overlapping pairs. We showed above that the count of 01's exactly equals the count of 10's. The count of 11 pairs equals the total number of pairs less the count of 00's, 01's and 10's (all known). Even though these are not all independent, there is no harm and a small ease of coding advantage in binning all four counts in four result histograms, each to be compared to its binomial expectation. d) counts e.g. 000, 001, 010... overlapping pairs. Here we IGNORE possible count relationships for sure (as we won't stop with three bits:-). Again, bin the outcome count frequencies and compare to their expected binomial distribution. This process can continue indefinitely, as long as we can accumulate enough counts in each pattern histogram to make aggregate statistics reliable. For example, at 8 bits, one is basically ensuring that the distribution of ascii characters is BOTH overall uniform (has the correct mean number of letters) AND that the actual distribution of those letters in samples is correct from the point of view of Bernoulli trials. I think that this process is strengthened significantly by conducting it simultaneously for all the sequences. The first measures "bit frequency and randomness". The second measures "pairwise sequential correlations". The third measure "three-bit sequential correlations" and so forth. A sequence might pass the first and fail the second, pass the first two and fail the third, pass the first seven and fail the eighth, pass the first eight and fail the 32nd (so that floats formed from the inverse are not uniformly distributed). =============== Addendum to previous note. The insight has struck me that all that this does is give one the actual DISTRIBUTION of outcomes for any given experiment. The distribution of sample means should be -- guess what -- normal -- provided that there are enough elements in the sample itself. For small numbers of elements in the sample, they should be binomial if the experiment is framed as a bernoulli trial. I'll bet that if I convert smoothly from binomial into normal as the number of outcome states exceeds the threshold where computing binomial probabilities is reasonably possible, I'll see no difference in an appropriately computed chisq! This is the solution to the problem of doing long strings. If I counted e.g. bitpair combinations across a string of length 8, (for many samples) binomial is appropriate. If I count bitpair combinations across a string of length 2^23 (8 million), I can't do binomial, but don't have to. Outcomes will be normally distributed about the expected means. SO, this is the answer to the bigger problem of why one should ever trust "p-value" for a single sample, or even a dozen samples, of a random process. Sure (to quote Marsaglia) "p happens", but it doesn't JUST happen, it happens according to a distribution. Instead of wondering if THIS occurrence of p = 0.02 from a single mean value is reasonable or not, compute the p of an entire distribution of mean values compared to the appropriate normal or binomial distribution, and get a p-value one can really trust! ======================= OK, so I'm stupid and I'm wrong. sts_monobit is, in fact, more sensitive than rgb_binomial although rgb_binomial might yet pick up a generator that passes sts_monobit and fail it -- one that preserves the symmetry of its 0/1 distribution about the midpoint (so the mean number of 0's and 1's is correct) but has the >>wrong<< distribution, e.g. is not binomial. As it turns out, most distributions that fail rgb_binomial do not have symmetry about their midpoint and consequently fail sts_monobit "before" failing rgb_binomial. If you like, rgb_binomial only becomes reliable when there is enough data to fill the primary non-zero bins near the middle, which takes a goodly chunk of data. sts_monobit, in the meantime, just adds up the number of 0's and 1's while steadily chopping down sigma -- by the time one has sampled a few thousand bits a lot of rng's are already 0/1 asymmetric enough to fail monobit, but the bin sigma's are still large enough to forgive a lot of slop in any given bin. Interestingly, binomial can be applied to very small bitstrings -- in fact, to bitstrings of length 1 (I think). At that point it should become equivalent to monobit, but in a somewhat different way, especially since rgb_binomial now evaluates monobit directly on the accumulated bit values. Looks like I >>do<< have some work to do to fully understand everything, I do I do...;-) ============== Whoo, dawgies! Out of a bit of insight, rgb_persist was born, and it explains why a LOT of rng's suck incredibly. Lots of rng's quite literally never change the contents of certain bits (usually lower order bits). One common symptom is for an rng to always return odd or even numbers. Another common symptom is for a rng to fail a distributional test when the repeated bits are measured (as repeated 1's cause an excess of 1's, repeated 0's an excess of 0's, even repeated 01's can cause runs/bitpair tests to fail). Worse, rgb_persist clearly shows that MOST rng's that exhibit the problem at all exhibit it STRONGLY (LOTS of repeated lower order bits) for at least some seeds. Using them, one runs a significant (indeed, a near "sure thing") risk of encountering seeds such that as many as 18 bits out of 32 are repeated, leaving one with only a fraction of the variation you thought you had. At this point, I'd have to say that rgb_persist is one of the first tests to run on ANY rng, and any rng that fails it should probably just be rejected out of hand -- even if only the last (least significant) bit is repeated, it seems dangerous to use an rng that produces only even or only odd numbers from any given seed, even for games. Writing the dumpbits and rgb_persist routines also gave me insight into how rgb_binomial and even the sts routines might be failing relative to their design goals. I've been processing bits least to most significant, and I've been ignoring random_max when doing so. This is a capital mistake, as of course an rng will fail when it only returns e.g. 16 bits in a 32 bit slot (and the other bits are necessarily repeated). I've probably been "passing" only rng's that return a full 32 "random bits" (and of course don't fail e.g. rgb_persist()). SO, I need to rewrite sts_monobit, sts_runs, and rgb_binomial (last first) so that they only check bits in the valid part of each returned word. This will be modestly annoying, but is of course absolutely necessary for the results to mean a damn thing. ==================== Note the new test rgb_bitdist, which is the BEST generalization of sts_monobit and perhaps better than rgb_binomial as well. We need to merge sts_monobit, rgb_persist, and rgb_bitdist into a single test that measures the total/average bit number, the per-bit-slot total/average number, and derives the cumulative bitmask of repeated bits. Two additional directions to take this: First: generate a set of Ntest variables for e.g. 1 bit 2 bit 3 bit 4 bit ... N bit combinations (one each). For number of bits and bitpattern, sweep the bitstring and accumulate the frequency histogram (for each possible bitpattern in each string location) ntest[no_of_bits].x[bit_pattern_slot] with periodic wraparound on the bitstring and so forth -- this is, in fact, sts_runs but for arbitrary numbers of bits and accumulating BOTH the totals AND the actual distribution, and check the chisq on the distribution and the pvalue of the total expected. Second: Here we look for subtle sequential bitlevel correlations. We do the same test as before, except that the frequency histogram is LATERAL -- doing each bit position in a sequential fashion. This test should see a clear failure for bits that don't change (strong sequential correlation, that) but should ALSO discover individual bits that do things like: 01010101 or 0011110000111100 or any other "balanced" repetition. In fact, we may eventually do a fft on the forward sequential bit sequences to see if there are even very weak sequential bit-level correlations like 001010100001100010 (where every sequential triplet has two 0's and one 1), even if the triplets themselves are "random". A good frequency test on all 3-way bit patterns should catch this, of course, and the lovely thing about binary is that I can always use a suitably masked integer conversion of the bit pattern itself as the histogram index! So it needn't be TOO horrible to encode. ===================================================== Note on diehard parking lot test. First of all, the documentation for the test is incorrect -- it tests for "crashes" (overlap) of SQUARE cars with sides of length 1, not ROUND cars of RADIUS one as Marsaglia's documentation and comments assert. If round cars ("helicopters", to borrow Marsaglia's term) are used a different distribution is obtained with mean over 4000. Actually to me, round cars seems very very similar to one of Knuth's tests for hyperplanar distribution of random coordinates, which has a much more solid theoretical foundation; I suspect the tests are more or less equivalent in sensitivity and will yield identical success/failure patterns in 99% of all cases (maybe even 100%). And the sensitivity of this test sucks -- it was very difficult for me to find a test that failed it out of the entire GSL collection (trying a half dozen known-weak generators or more in the process). The one that finally DID fail it really, really sucked and failed all sorts of other tests. I'd be interested to see if this test deserves to live, in the long run. I rather suspect that Knuth tests in variable dimensions will yield a much more systematic view of RNG failure, just as rgb_bitdist does compared to e.g. runs tests. ================================================================== 07/11/06 I've just finished testing Marsaglia's bitstream test, and it is (like rgb_bitdist) a test that nothing survives. In fact, it is a dead certainty that rgb_bitdist is a better version of the same basic test, and that generators that fail rgb_bitdist at (say) 6 bits are going to fail Marsaglia's less sensitive 20-bit test. What his test does that bitstream doesn't is use a single relatively coarse grained test statistic -- the expected number of missing 20 bit numbers out of 2 million trials -- instead of doing what rgb_bitdist does, which is do a chisq test on the fractional occupancy of the entire VECTOR of 20 bit numbers. Research question: Which is more sensitive AT 20 bits? It seems to me that the chisq vector test is clearly superior as it would catch many possible "bad" distributions that conserved the mean number of missing numbers at this sample size (however unlikely such special deviations might be in practice) but then there is the question of sensitivity given a fixed sample size. SO FAR, however, rgb_bitdist continues to be the premier test for revealing failure, with nothing getting out alive past 6 bits, ASSUMING that I'm computing the vector chisq and p-value per run correctly and not just revealing that I'm using the wrong form as the number of bits goes up. Oh, and nothing survives diehard_bitdist EITHER, at least when one cranks the test up past Marsaglia's wimply 20 iterations to (say) 200. At that point the non-uniformity of the p-distribution is absolutely apparent -- it even has structure. That is, some seeds lead to biased results that are TOO CLOSE to the mean value and not properly distributed... an interesting observation all by itself. rgb ================================================================== 07/11/06 later that day... diehard_count_1s_stream() now WORKS! What a PITA! And (I suspect) how unnecessary all the complexity! This test (as it turns out) computes chisq on what amounts to a strangely remapped rgb_bitdist test (precisely!) on four and five digit base 5 integers obtained by remapping bytes based on the number of 1's therein. That is, 256 possibilities are reduced to 5, each with a trivial-to-compute frequency/probability, the base 5 integer is left shifted (base 5!) and added to the next one to cumulate 4 or 5 digit numbers, those numbers are then counted, and the counts compared to the EXPECTED counts given the number of samples and turned into chisq (one each, for 4 and for 5 digit numbers). Sigh. OK then, we COULD just print the p-value of those chisq's -- an absolutely straightforward process. Alternatively, we could do what Marsaglia does -- compute the DIFFERENCE of the chisq's themselves, which of course are supposedly distributed around the number of degrees of freedom of each one separately, that is 3125 - 625 = 2500! This is the mean value of the difference, with stddev = sqrt(2*2500). This final result is turned into a p-value. This of course is wierd and wrong in so many ways. For one, it is entirely possible for chisq_4 and chisq_5 to differ systematically from their expected values, and it is perfectly possible and likely that those deviations would occur in the same direction -- e.g. down -- so that the 4 byte and 5 byte streams BOTH have fewer degrees of freedom than expected. Of course in this case part of the individual deviations CANCEL and is not visible in the final p-value! Honestly, I can think of pretty much "no" reasonable ways that this final pvalue can fail where any/all of the p-values for the 4 or 5 (or 2 or 3 or 1 or 17) digit distributions would not also fail, but I can (and just did) think of a way that the final p-value might MARGINALLY pass while the individual p-values fail. Although the general approach is a good one, what is clearly needed is a new test -- one that extends rgb_bitdist to multidigit strings of smaller base. For example, right now rgb_bitdist tests the FREQUENCY of the occurrence of all 5 digit strings but not all 5 digit strings taken two at a time (32 x 32 = 1K possbilities). Of course one REASON that I don't do that is that I >>already<< do e.g. 10 bit strings -- the DIRECT frequency distribution of those 1K possibilities, which obviously samples all the 5 bit combos taken two at a time!. And besides, every rng I have tested fails at the level of what amounts to two digit octal numbers -- six bit strings. So I'm cynical about this. I also don't think that this really counts 1's. How is this one iota different from simply evaluating the distribution of bytes (8 bit randoms)? If the complete distribution of 8 bit bytes (rgb_bitdist at 8 bits) is random, ALL DERIVED DISTRIBUTIONS are random, with the only catchy part being temporal/sequential correlations that might be revealed from taking the strings four or five bytes at a time (at the expense of compressing the information tremendously). Once again, this test seems reduceable to but not as sensitive as rgb_bitdist at a given level, unfortunately a level far beyond where all known rng's fail anyway. It is a MEASURE of the lack of sensitivity that this does does NOT fail for many of those rng's where rgb_bitdist does... rgb ./libdieharder/dab_monobit2.c0000664000175000017500000000536513707046103014422 0ustar eddedd/* * ======================================================================== * $Id: sts_monobit.c 237 2006-08-23 01:33:46Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * See also accompanying file STS.COPYING * ======================================================================== */ /* * ======================================================================== * Block-monobit test. * Since we don't know what block size to use, try a bunch of block sizes. * In particular, try all blocks sizes of 2^k words, where k={0..n}. * Not sure what n should be. Especially considering the difficulty with * getting a statistic out of the test. * ======================================================================== */ #include #define BLOCK_MAX (16) /* The evalMostExtreme function is in dab_dct.c */ extern double evalMostExtreme(double *pvalue, uint num); int dab_monobit2(Test **test, int irun) { uint i, j; uint blens = rmax_bits; uint ntup = ntuple; double *counts; uint *tempCount; double pvalues[BLOCK_MAX]; /* First, find out the maximum block size to use. * The maximum size will be 2^ntup words. */ if (ntup == 0) { for (j=0;jtsamples / (2<ntuple = ntup; counts = (double *) malloc(sizeof(*counts) * blens * (2<tsamples;i++) { uint n = gsl_rng_get(rng); uint t = 1; // Begin: count bits n -= (n >> 1) & 0x55555555; n = (n & 0x33333333) + ((n >> 2) & 0x33333333); n = (n + (n >> 4)) & 0x0f0f0f0f; if (0) { n = (n * 0x01010101) >> 24; } else { n = n + (n >> 8); n = (n + (n >> 16)) & 0x3f; } // End: count bits for (j = 0; j < ntup; j++) { tempCount[j] += n; // Update block count if ((t & i) && !(t & (i-1))) { // If this is the start of a new block counts[blens * ((2<tsamples / (2<pvalues[irun] = evalMostExtreme(pvalues, ntup); nullfree(counts); nullfree(tempCount); return(0); } ./libdieharder/convertoperm.pl0000775000175000017500000000407313707046103014775 0ustar eddedd#!/usr/bin/perl # use FileHandle; my $i=1; my $j=1; $r[$i][$j] = 1; $firstcall = 1; # Open op5dat.for open(IN,"op5dat.for") || die "Sorry, I couldn't open op5dat.for\n"; open(OUT,">op5dat") || die "Sorry, I couldn't open op5dat.\n"; autoflush OUT 1; # Write to the file... printf OUT "#========================================================================\n"; printf OUT "# R and S data ported from diehard and put into C-style matrix form\n"; printf OUT "#========================================================================\n"; # ...and also output to console, just for fun. printf "#========================================================================\n"; printf "# R and S data ported from diehard and put into C-style matrix form\n"; printf "#========================================================================\n"; # Initialize the table (read in the whole thing in order) nextrs(); for($i=0;$i<60;$i++) { for($j=$i;$j<60;$j++){ $r[$i][$j] = nextrs(); $r[$j][$i] = $r[$i][$j]; } } print OUT "static int r[60][60] = {\n"; for($i=0;$i<60;$i++) { print OUT " {"; for($j=0;$j<59;$j++){ printf OUT (" %10d,",$r[$i][$j]); } if($i<59){ printf OUT (" %10d},\n",$r[$i][59]); } else { printf OUT (" %10d}\n",$r[$i][59]); } } print OUT "};\n"; for($i=0;$i<60;$i++) { for($j=$i;$j<60;$j++){ $s[$i][$j] = nextrs(); $s[$j][$i] = $s[$i][$j]; } } print OUT "static int s[60][60] = {\n"; for($i=0;$i<60;$i++) { print OUT " {"; for($j=0;$j<59;$j++){ printf OUT (" %10d,",$s[$i][$j]); } if($i<59){ printf OUT (" %10d},\n",$r[$i][59]); } else { printf OUT (" %10d}\n",$r[$i][59]); } } print OUT "};\n"; exit; sub nextrs { if($firstcall == 1){ my $irs = 0; my $jrs; while(){ chop; @field = split(/\s+/,$_); $fields = @field; for($jrs=1;$jrs<$fields;$jrs++){ $rs[$irs] = $field[$jrs]; $irs++; } } # print "# Read in $irs values\n"; $irs = 0; $firstcall = 0; return; } return $rs[$irs++]; } ./libdieharder/rgb_operm.c0000664000175000017500000004505513707046103014037 0ustar eddedd/* * ======================================================================== * $Id: rgb_operm.c 252 2006-10-10 13:17:36Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This is the revised Overlapping Permutations test. It directly * simulates the covariance matrix of overlapping permutations. The way * this works below (tentatively) is: * * For a bit ntuple of length N, slide a window of length N to the * right one bit at a time. Compute the permutation index of the * original ntuple, the permutation index of the window ntuple, and * accumulate the covariance matrix of the two positions. This * can be directly and precisely computed as well. The simulated * result should be distributed according to the chisq distribution, * so we subtract the two and feed it into the chisq program as a * vector to compute p. * * This MAY NOT BE RIGHT. I'm working from both Marsaglia's limited * documentation (in a program that doesn't do ANYTHING like what the * documentation says it does) and from Nilpotent Markov Processes. * But I confess to not quite understand how to actually perform the * test in the latter -- it is very good at describing the construction * of the target matrix, not so good at describing how to transform * this into a chisq and p. * * FWIW, as I get something that actually works here, I'm going to * THOROUGHLY document it in the book that will accompany the test. *======================================================================== */ #include #define RGB_OPERM_KMAX 10 /* * Some globals that will eventually go in the test include where they * arguably belong. */ double fpipi(int pi1,int pi2,int nkp); uint piperm(size_t *data,int len); void make_cexact(); void make_cexpt(); int nperms,noperms; double **cexact,**ceinv,**cexpt,**idty; double *cvexact,*cvein,*cvexpt,*vidty; int rgb_operm(Test **test,int irun) { int i,j,n,nb,iv,s; uint csamples; /* rgb_operm_k^2 is vector size of cov matrix */ uint *count,ctotal; /* counters */ uint size; double pvalue,ntuple_prob,pbin; /* probabilities */ Vtest *vtest; /* Chisq entry vector */ gsl_matrix_view CEXACT,CEINV,CEXPT,IDTY; /* * For a given n = ntuple size in bits, there are n! bit orderings */ MYDEBUG(D_RGB_OPERM){ printf("#==================================================================\n"); printf("# rgb_operm: Running rgb_operm verbosely for k = %d.\n",rgb_operm_k); printf("# rgb_operm: Use -v = %d to focus.\n",D_RGB_OPERM); printf("# rgb_operm: ======================================================\n"); } /* * Sanity check first */ if((rgb_operm_k < 0) || (rgb_operm_k > RGB_OPERM_KMAX)){ printf("\nError: rgb_operm_k must be a positive integer <= %u. Exiting.\n",RGB_OPERM_KMAX); exit(0); } nperms = gsl_sf_fact(rgb_operm_k); noperms = gsl_sf_fact(3*rgb_operm_k-2); csamples = rgb_operm_k*rgb_operm_k; gsl_permutation * p = gsl_permutation_alloc(nperms); /* * Allocate memory for value_max vector of Vtest structs and counts, * PER TEST. Note that we must free both of these when we are done * or leak. */ vtest = (Vtest *)malloc(csamples*sizeof(Vtest)); count = (uint *)malloc(csamples*sizeof(uint)); Vtest_create(vtest,csamples+1); /* * We have to allocate and free the cexact and cexpt matrices here * or they'll be forgotten when these routines return. */ MYDEBUG(D_RGB_OPERM){ printf("# rgb_operm: Creating and zeroing cexact[][] and cexpt[][].\n"); } cexact = (double **)malloc(nperms*sizeof(double*)); ceinv = (double **)malloc(nperms*sizeof(double*)); cexpt = (double **)malloc(nperms*sizeof(double*)); idty = (double **)malloc(nperms*sizeof(double*)); cvexact = (double *)malloc(nperms*nperms*sizeof(double)); cvein = (double *)malloc(nperms*nperms*sizeof(double)); cvexpt = (double *)malloc(nperms*nperms*sizeof(double)); vidty = (double *)malloc(nperms*nperms*sizeof(double)); for(i=0;idata[k]; /* Not cruft, but quiet... MYDEBUG(D_RGB_OPERM){ printf("#------------------------------------------------------------------\n"); printf("# Generating offset sample permutation pi's\n"); } */ for(k=0;k<2*rgb_operm_k - 1;k++){ gsl_sort_index((size_t *) ps,&testv[k],1,rgb_operm_k); pi[k] = piperm((size_t *) ps,rgb_operm_k); /* Not cruft, but quiet... MYDEBUG(D_RGB_OPERM){ printf("# %u: ",k); for(ip=k;ipdata[ip]); } printf(" = %u\n",pi[k]); } */ } /* * This is the business end of things. The covariance matrix is the * the sum of a central function of the permutation indices that yields * nperms-1/nperms on diagonal, -1/nperms off diagonal, for all the * possible permutations, for the FIRST permutation in a sample (fi) * times the sum of the same function over all the overlapping permutations * drawn from the same sample. Quite simple, really. */ for(i=0;idata[rgb_operm_k-j-1] = lookup[i]->data[j]; } } else { gsl_permutation_memcpy(lookup[i],lookup[i-1]); gsl_permutation_next(lookup[i]); for(j=0;jdata[rgb_operm_k-j-1] = lookup[i]->data[j]; } } } */ MYDEBUG(D_RGB_OPERM){ for(i=0;i ",i); gsl_permutation_fprintf(stdout,lookup[i]," %u"); printf("\n"); } } } for(i=0;idata,len*sizeof(uint))==0){ /* Not cruft, but off: MYDEBUG(D_RGB_OPERM){ printf("# piperm(): "); gsl_permutation_fprintf(stdout,lookup[i]," %u"); printf(" = %u\n",i); } */ return(i); } } printf("We'd better not get here...\n"); return(0); } double fpipi(int pi1,int pi2,int nkp) { int i; double fret; /* * compute the k-permutation index from iperm for the window * at data[offset] of length len. If it matches pind, return * the first quantity, otherwise return the second. */ if(pi1 == pi2){ fret = (double) (nkp - 1.0)/nkp; if(verbose < 0){ printf(" f(%d,%d) = %10.6f\n",pi1,pi2,fret); } return(fret); } else { fret = (double) (-1.0/nkp); if(verbose < 0){ printf(" f(%d,%d) = %10.6f\n",pi1,pi2,fret); } return(fret); } } ./libdieharder/std_test.c0000664000175000017500000002235513707046103013712 0ustar eddedd/* * $Id: rgb_bitdist.c 225 2006-08-17 13:15:00Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * */ #include /* * A standard test returns a single-pass p-value as an end result. * The "size" of the single pass test is controlled by the tsamples * parameter, where possible (some tests use statistics evaluated only * for very particular values of tsamples. * * The test is, in general, executed psamples times and the p-values * for each run are in turn accumulated in a vector. This can all be * done in a very standard loop. * * These values SHOULD be uniformly distributed from [0-1]. A * Kuiper Kolmogorov-Smirnov test is performed on the final distribution * of p to generate a p-value for the entire test series, containing * (typically) tsamples*psamples actual samples. * * Some tests generate more than one p-value per single pass. Others * are designed to be iterated over yet another integer-indexed control * parameter. To facilitate the consistent pass-back of test results to * a UI and allow test reuse without leaks, it is important to be able * to create "a standard test" and destroy/free it when done. For this * reason the API for the library standard test function is quite * object-oriented in its implementation. * * It is strongly suggested that this object oriented design be reused * whenever possible when designing new tests. This also permits the * maximal reuse of code in the UI or elsewhere. */ /* static uint save_psamples; */ /* * Create a new test that will return nkps p-values per single pass, * for psamples passes. dtest is a pointer to a struct containing * the test description and default values for tsamples and psamples. * This should be called before a test is started in the UI. */ Test **create_test(Dtest *dtest, uint tsamples,uint psamples) { uint i,j; uint pcutoff; Test **newtest; MYDEBUG(D_STD_TEST){ fprintf(stdout,"# create_test(): About to create test %s\n",dtest->sname); } /* * Here we have to create a vector of tests of length nkps */ /* printf("Allocating vector of pointers to Test structs of length %d\n",dtest->nkps); */ newtest = (Test **)malloc((size_t) dtest->nkps*sizeof(Test *)); for(i=0;inkps;i++){ /* printf("Allocating the actual test struct for the %d th test\n",i); */ newtest[i] = (Test *)malloc(sizeof(Test)); } /* * Initialize the newtests. The implementation of TTD (test to * destruction) modes makes this inevitably a bit complex. In * particular, we have to malloc the GREATER of Xoff and psamples in * newtest[i]->pvalues to make room for more pvalues right up to the * Xoff cutoff. */ for(i=0;inkps;i++){ /* * Do a standard test if -a(ll) is selected no matter what people enter * for tsamples or psamples. ALSO use standard values if tsamples or * psamples are 0 (not initialized). HOWEVER, note well the new control * for psamples that permits one to scale the standard number of psamples * in an -a(ll) run by multiply_p. */ if(all == YES || tsamples == 0){ newtest[i]->tsamples = dtest->tsamples_std; } else { newtest[i]->tsamples = tsamples; } if(all == YES || psamples == 0){ newtest[i]->psamples = dtest->psamples_std*multiply_p; if (newtest[i]->psamples < 1) newtest[i]->psamples = 1; } else { newtest[i]->psamples = psamples; } /* Give ntuple an initial value of zero; most tests will set it. */ newtest[i]->ntuple = 0; /* * Now we can malloc space for the pvalues vector, and a * single (80-column) LINE for labels for the pvalues. We default * the label to a line of #'s. */ if(Xtrategy != 0 && Xoff > newtest[i]->psamples){ pcutoff = Xoff; } else { pcutoff = newtest[i]->psamples; } newtest[i]->pvalues = (double *)malloc((size_t)pcutoff*sizeof(double)); newtest[i]->pvlabel = (char *)malloc((size_t)LINE*sizeof(char)); snprintf(newtest[i]->pvlabel,LINE,"##################################################################\n"); for(j=0;jpvalues[j] = 0.0; } /* * Finally, we initialize ks_pvalue so that std_test() knows the next * call is the first call. It will be nonzero after the first call. */ newtest[i]->ks_pvalue = 0.0; MYDEBUG(D_STD_TEST){ printf("Allocated and set newtest->tsamples = %d\n",newtest[i]->tsamples); printf("Xtrategy = %u -> pcutoff = %u\n",Xtrategy,pcutoff); printf("Allocated and set newtest->psamples = %d\n",newtest[i]->psamples); } } /* printf("Allocated complete test struct at %0x\n",newtest); */ return(newtest); } /* * Destroy (free) a test created with create_test without leaking. * This should be called as soon as a test is finished in the UI. */ void destroy_test(Dtest *dtest, Test **test) { int i; /* * To destroy a test one has to first free its allocated contents * or leak. */ /* printf("Destroying test %s\n",dtest->name); printf("Looping over %d test pvalue vectors\n",dtest->nkps); */ for(i=0;inkps;i++){ free(test[i]->pvalues); free(test[i]->pvlabel); } /* printf("Freeing all the test structs\n"); */ for(i=0;inkps;i++){ free(test[i]); } /* printf("Freeing the toplevel test struct at %0x\n",test); */ free(test); } /* * Clear a test. This must be called if one wants to call std_test() * twice after creating it and have the second call just add samples to * the previous call. std_test needs the vector of ks_psamples * accumulated so far to be clear, and for test[i]->psamples to be * reset to its original/default value. I'm not sure that one cannot * screw this up by creating multiple tests and running interleaved * std_tests and clear_tests, but at least it makes it challenging to * do so. */ void clear_test(Dtest *dtest, Test **test) { int i; /* * reset psamples and clear the ks_pvalues */ for(i=0;inkps;i++){ if(all == YES || psamples == 0){ test[i]->psamples = dtest->psamples_std*multiply_p; } else { test[i]->psamples = psamples; } test[i]->ks_pvalue = 0.0; } /* * At this point you can call std_test() and it will start over, instead * of just adding more samples to a run for this particular test. */ } /* * Test To Destruction (TTD) or Resolve Ambiguity (RA) modes require one * to iterate, adding psamples until: * * TTD -- a test either fails or completes Xoff psamples without * completely failing. * RA -- a test that is initially "weak" (compared to Xweak) either * fails or gets back up over 0.05 or completes Xoff psamples * without completely failing. * * This routine just adds count (usually Xstep) psamples to a test. It * is called by std_test() in two modes -- first call and TTD/RA (add more * samples) mode. This is completely automagic, though. * * Note that Xoff MUST remain global, if nothing else. Otherwise we * can run out of allocated headroom in the pvalues vector. */ void add_2_test(Dtest *dtest, Test **test, int count) { uint i,j,imax; /* * Will count carry us over Xoff? If it will, stop at Xoff and * adjust count to match. test[0]->psamples is the running total * of how many samples we have at the end of it all. */ imax = test[0]->psamples + count; if(imax > Xoff) imax = Xoff; count = imax - test[0]->psamples; for(i = test[0]->psamples; i < imax; i++){ dtest->test(test,i); } for(j = 0;j < dtest->nkps;j++){ /* * Don't forget to count the new number of samples and use it in the * new KS test. */ test[j]->psamples += count; if(ks_test >= 3){ /* * This (Kuiper KS) can be selected with -k 3 from the command line. * Generally it is ignored. All smaller values of ks_test are passed * through to kstest() and control its precision (and speed!). */ test[j]->ks_pvalue = kstest_kuiper(test[j]->pvalues,test[j]->psamples); } else { /* This is (symmetrized Kolmogorov-Smirnov) is the default */ test[j]->ks_pvalue = kstest(test[j]->pvalues,test[j]->psamples); } } /* printf("test[0]->ks_pvalue = %f\n",test[0]->ks_pvalue); */ } /* * std_test() checks to see if this is the first call by looking at * all the ks_pvalues. If they are zero, it assumes first call (in * general they will be clear only right after create_test or clear_test * have been called). If it is first call, it calls add_2_test() in just * the right way to create test[0]->psamples, starting with 0. If it is * the second or beyond call, it just adds Xstep more psamples to the * vector, up to the cutoff Xoff. */ void std_test(Dtest *dtest, Test **test) { int j,count; double pmax = 0.0; /* * First we see if this is the first call. If it is, we save * test[0]->psamples as count, then call add_2_test(). We determine * first call by checking the vector of pvalues and seeing if they * are all still zero (something that should pretty much never happen * except on first call). */ for(j = 0;j < dtest->nkps;j++){ if(test[j]->ks_pvalue > pmax) pmax = test[j]->ks_pvalue; } if(pmax == 0.0){ /* First call */ count = test[0]->psamples; for(j = 0;j < dtest->nkps;j++){ test[j]->psamples = 0; } } else { /* Add Xstep more samples */ count = Xstep; } add_2_test(dtest,test,count); } ./libdieharder/rng_uvag.c0000664000175000017500000001372413707046103013671 0ustar eddedd/* * rng_uvag.c * * Copyright(c) 2004 by Alex Hay - zenjew@hotmail.com * * From: * * Private communication, 6/5/07. * * GSL packaged for dieharder by Robert G. Brown 6/5/07 * * Alex has agree to make this available under the GSL so it can be * integrated with the dieharder package. * * Here is pretty much the only documentation on this generator in * existence, at least until dieharder-based studies enable a real * publication to occur. The following is from Alex: * * UVAG: The Universal Virtual Array Generator * * This generator is universal in the sense that a single algorithm * can be used to produce random numbers with any integer data TYPE. * Thus it is trivial to extend it to 64 bits and beyond. If and when * long long = 128 bits, UVAG is ready to go. * * The array is virtual in that when TYPE>char the 256 inner TYPES overlap * producing an effectively huge "virtual" inner complexity in a very small * physical memory. When TYPE = uint, every cycle changes 4-7 (depending on * where rp is pointing in the array) virtual TYPEs in the array. When * TYPE = long long each cycle changes 8-15 virtual TYPES at a physical * memory cost of just 4 bytes over uint for the entire array. * * As sindex is incremented, its next potential value has been changed many * times since it was last encountered along with the entire inner state. * Not very rigorous but then I'm no mathematician. UVAG is something I * would dub a chaotic prng. It doesn't yield easily to mathematical * analysis unlike well researched prngs like MT and RC4. I have * experimented using fewer than 256 seeds. Fewer than 100 do well in * DIEHARD. The cost is in speed due to an extra mod. * * Where did UVAG come from? * * It evolved over years of playing around. In its previous incarnation, rp * was moved randomly and proved (as Makoto Matsumoto predicted) to zero out * after extended cycling. Systematically stepping thru the array with sindex * seems to eliminate the problem although I have not consulted further with * Dr Matsumoto. * *======================================================================== * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include /* * This is a wrapping of the uvag rng */ static unsigned long int uvag_get (void *vstate); static double uvag_get_double (void *vstate); static void uvag_set (void *vstate, unsigned long int s); typedef struct { int i; } uvag_state_t; /* * UVAG specific defines. * * UVAG provides globally as *rndint, an effectively infinite sequence of * TYPEs, uniformly distributed (0, 2**(8*sizeof(TYPE))-1). We need to * return uints in our GSL-compatible wrapper, at least at the moment. */ /* #define TYPE long long || char || short || int || long */ #define TYPE uint #define WORD sizeof(TYPE) /* * Global variables and data for UVAG */ TYPE *rp; TYPE rndint; unsigned char sindex, svec[255 + WORD]; /* 256 overlapping TYPE seeds */ static inline unsigned long int uvag_get (void *vstate) { /* * Returns a 32-bit unsigned integer produced by the UVAG */ rp = (TYPE *)(svec + svec[sindex+=1]); rndint += *rp += rndint; return rndint; } static double uvag_get_double (void *vstate) { return uvag_get (vstate) / (double) UINT_MAX; } static void uvag_set (void *vstate, unsigned long int s) { /* Initialize automaton using specified seed. */ uvag_state_t *state __attribute__((unused)) = (uvag_state_t *) vstate; uint i, array_len = 255 + WORD, tot, seed_seed, tmp8; unsigned char key[256], *kp, temp; gsl_rng *seed_rng; /* random number generator used to seed uvag */ /* * Preload the array with 1-byte integers */ for (i=0; i>= 1; rmax_mask = rmax_mask << 1; rmax_mask++; rmax_bits++; } for(i=0;i<256;i++){ /* if(i%32 == 0) printf("\n"); */ get_rand_bits(&tmp8,sizeof(uint),8,seed_rng); if(i!=255){ key[i] = tmp8; } else { key[i] = 0; } /* printf("%02x",key[i]); */ } /* printf("\n"); */ kp = key; tot = 0; for(i=0; i static unsigned long int kiss_get (void *vstate); static double kiss_get_double (void *vstate); static void kiss_set (void *vstate, unsigned long int s); typedef struct { /* * Seed variables. Note that kiss requires a moderately complex * seeding using a "seed rng" that we will arbitrarily set to be * a MT from the GSL. This makes this routine NOT PORTABLE, but * D. Jones' article (URL above) contains a portable, public doman * version of this code that includes a seeding routine (and commentary!). */ unsigned int x; unsigned int y; unsigned int z; unsigned int c; } kiss_state_t; static unsigned long int kiss_get (void *vstate) { kiss_state_t *state = vstate; unsigned long long t; state->x = 314527869 * state->x + 1234567; state->y ^= state->y << 5; state->y ^= state->y >> 7; state->y ^= state->y << 22; t = 4294584393ULL * state->z + state->c; state->c = t >> 32; state->z = t; return (unsigned int)(state->x + state->y + state->z); } static double kiss_get_double (void *vstate) { return (double) kiss_get (vstate) / (double) UINT_MAX; } static void kiss_set (void *vstate, unsigned long int s) { /* Initialize automaton using specified seed. */ kiss_state_t *state = (kiss_state_t *) vstate; uint seed_seed; gsl_rng *seed_rng; /* random number generator used to seed uvag */ /* * kiss needs four random number seeds. They have to be reproducible * from a single seed in order to be consistent with the GSL. We * therefore have to do a two step process where we use seed to * seed an existing GSL generator (say mt19937_1999) and take the * first three returns as the rest of our seed for this generator. */ seed_rng = gsl_rng_alloc(dh_rng_types[14]); seed_seed = s; gsl_rng_set(seed_rng,seed_seed); /* printf("Seeding kiss\n"); */ state->x = gsl_rng_get(seed_rng); while (!(state->y = gsl_rng_get(seed_rng))); /* y must not be zero! */ state->z = gsl_rng_get(seed_rng); /* printf("Done!\n"); */ /* * We don't really need to set c as well but let's anyway. * Notes: offset c by 1 to avoid z=c=0; should be less than 698769069. */ state->c = gsl_rng_get(seed_rng) % 698769068 + 1; /* printf("x = %10u y = %10u z = %10u c = %10u\n", state->x,state->y,state->z,state->c); */ return; } static const gsl_rng_type kiss_type = {"kiss", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (kiss_state_t), &kiss_set, &kiss_get, &kiss_get_double}; const gsl_rng_type *gsl_rng_kiss = &kiss_type; ./libdieharder/README0000664000175000017500000001557213707046103012600 0ustar eddedd======================================================================== Author Contact Information: Robert G. Brown Duke University Dept. of Physics, Box 90305 Durham, N.C. 27708-0305 Phone: 1-919-660-2567 Fax: 919-660-2525 Email: rgb@phy.duke.edu URL: http://www.phy.duke.edu/~rgb ======================================================================== Notes About the Tests in Dieharder Dieharder is original code written by and Copyright Robert G. Brown (with different code modules written over the period 2003-present). The tests included (or expected to be included in the future) in dieharder, are, however, derived from descriptions from several places. * Diehard, a famous suite of random number tests written over many years by George Marsaglia. The original Diehard sources (written in Fortran) are (of course) Copyright George Marsaglia according to the Berne convention, where authors retain copyright with or without a notice in any original work. The original Diehard code written by Marsaglia did not include a copyright notice or an explicit license in or with the sources that have been made publically available on the web for many years. When contacted, Dr. Marsaglia has indicated his wish to restrict commercial usage of his code and permit only academic/research related use. For this reason the the algorithms are fully re-implemented, in original code, in dieharder to keep authorship and GPL licensing issues clear. However, all diehard-equivalent tests are clearly labelled as such and academically attributed to Dr. Marsaglia. * The National Institute of Standards and Technology (NIST) Statistical Test Suite (STS) as described in publication SP800-22b. Although this test suite was developed with government support and is explicitly in the public domain, and is available in C source. There is some overlap between STS and Diehard -- for example, both have binary matrix rank tests -- but the STS focusses primarily on bitlevel randomness and the suitability of a random number generator for use in cryptographic applications. The tests described in SP800-22b that are implemented in dieharder are completely rewritten in original C by Robert G. Brown to keep copyright and GPL issues clear. All STS-derived tests are clearly labelled as such and are academically attributed to the various authors of the suite (Andrew Rukhin, Juan Soto, James Nechvatal, Miles Smid, Elaine Barker, Stefan Leigh, Mark Levenson, Mark Vangel, David Banks, Alan Heckert, James Dray, San Vo). * Original tests or timing operations inserted by Robert G. Brown. Almost any distribution that can be computed on the basis of a source of random numbers with a derived statistic with known or reliably measurable statistical properties can serve as a test of random numbers using the general approach implemented in Diehard, the STS, Dieharder, and elsewhere. * Tests described in Knuth's The Art of Computer Programming. * User-contributed tests. * Tests described elsewhere in the literature. In all cases some effort has been made to correctly attribute the originator of a test algorithm, and if there are any errors in this regard they will be happily corrected once they are brought to the attention of the author. ======================================================================== To Build Dieharder Dieharder can be built from source in most cases by simply typing "make" on the command line while in the source directory. However, it does require certain resources to build, notably the Gnu Scientific Library in a revision no earlier than 1.4 (and ideally greater than 1.6). It has been tested primarily on gcc/linux-based systems, but should port well to any unixoid environment with at most some minor hacking of the include files or systems calls used. If one is using an RPM-based linux, the easiest way to simply build and install the library is to either take a chance on installing a binary rpm, preferrably one that was built on a system with the same general distribution and environment, or rebuilding the source RPM. However, RPM based installations are actually less desireable with a tool such as diehard than source builds, since part of its appeal is the availability of its source and the ease with which new tests or generators can be directly implemented. Dieharder is an open source project for a reason -- it simply is not possible to trust a test suite of this sort without access to the source because even a subtle error in the sources or data used to perform a test will cause the test to return incorrect answers, conceivably to the detriment of all concerned. With the source readily available, any user is free to examine or modify the source for any test and determine whether or not the test is working and participate in the critical process whereby academia arrives at a consensus truth. ======================================================================== Licensing and Revision Control Dieharder is (as noted) Copyright Robert G. Brown, 2003-2006. It has been kept under revision control (first CVS, more recently Subversion) since the inception of the process in 2003 and all incremental changes to the code as it was developed are carefully documented. Dieharder was deliberately developed to by a GPL project, since alternative random number test suites were either incomplete with regard to the span of test possibilities of interest to the author, restricted or unclear about their licensing restrictions, or both. In addition, by integrating from the beginning with the Gnu Scientific Library (which is a full GPL project with the viral version of the license) it becomes itself a GPL project in any event. It is strongly suggested that prospective users of this test read the terms of the license included with this source distribution in the file COPYING. In summary, permission is granted to freely use and modify the sources and distribute the result or any binary objects derived therefrom as long as the terms of the GPL are abided by. These terms require the preservation of all copyright and license information in the sources and that the source of any and all revisions to the original dieharder code be made available upon request to any receivers of a dieharder binary, among other things. 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. If any user of the dieharder program should revise the program in a way that is likely to be of use to others, they are encouraged to at least offer to contribute the revision back to the project (subject to the "editorial" approval of the primary author). Contact Robert G. Brown to arrange for such a contribution. ======================================================================== ./libdieharder/parse.c0000664000175000017500000000703314345634463013202 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== * Utility routines to support basic needs of the program like managing * models, creating and deleting directories with contents. Probable * cruft or yet-unused routines belong at the bottom... *======================================================================== */ #include #include #include extern int verbose; /* * split() is a reusable routine to break up a string into char[PBUF] * fields. Anything past PBUF characters is truncated. The output * is put into parsebuf[i] and the number of fields found is returned. * It is somewhat like the perl split function except that I give it * a 128K buffer of its very own to work with and you don't get to * choose your delimiters. */ int split(char *inbuffer) { char delim[7],*nextval; if(verbose){ printf("split(%s)\n",inbuffer); } /* * Permit blank, tab, or comma separators anywhere we need to parse * a line. */ delim[0] = ' '; /* blanks */ delim[1] = (char) 9; /* tab */ delim[2] = ','; /* comma */ delim[3] = (char) 10; /* LF */ delim[4] = (char) 13; /* CR */ delim[5] = ':'; /* : needed to parse /proc/net/dev or passwd */ delim[6] = (char) 0; /* terminator */ nextval = strtok(inbuffer,delim); if(nextval == (char *)NULL) return 0; int i = 0; strncpy(splitbuf[i],nextval,PBUF); if(verbose){ printf("split(): split field[%d] = %s.\n",i,splitbuf[i]); } i++; while(i < PK-1){ nextval = strtok((char *) NULL, delim); if(nextval == (char *)NULL) break; strncpy(splitbuf[i], nextval,PBUF); if(verbose){ printf("split(): split field[%d] = %s.\n",i,splitbuf[i]); } i++; } /* Null the last field */ memset(splitbuf[i],0,PBUF); if(verbose){ printf("split(): Terminated split field[%d] = %s.\n",i,splitbuf[i]); printf("split(): Returning %d as the field count\n",i); } return i; } /* * parse() is a reusable routine to break up a string into char[32] * fields. Anything past 32 characters is truncated. */ int parse(char *inbuffer,char **outfields,int maxfields,int maxfieldlength) { char delim[7],*nextval; int i = 0; if(verbose){ printf("parse():\n"); } /* * Permit blank, tab, or comma separators anywhere we need to parse * a line. */ delim[0] = ' '; /* blanks */ delim[1] = (char) 9; /* tab */ delim[2] = ','; /* comma */ delim[3] = (char) 10; /* LF */ delim[4] = (char) 13; /* CR */ delim[5] = ':'; /* : needed to parse /proc/net/dev or passwd */ delim[6] = (char) 0; /* terminator */ nextval = strtok(inbuffer,delim); if(nextval == (char *)NULL) return 0; strncpy(outfields[i++],nextval,maxfieldlength); if(verbose){ printf("parse(): Parsed field[%d] = %s.\n",i-1,outfields[i-1]); } while(i < maxfields-1){ nextval = strtok((char *) NULL, delim); if(nextval == (char *)NULL) break; strncpy(outfields[i++], nextval,maxfieldlength); if(verbose){ printf("parse(): Parsed field[%d] = %s.\n",i-1,outfields[i-1]); } } /* Null the last field */ memset(outfields[i],0,maxfieldlength); if(verbose){ printf("parse(): Terminated field[%d] = %s.\n",i,outfields[i]); } return i; } void chop(char *buf) { /* Advance to end of string */ while(*buf != 0) buf++; buf--; /* Reterminate one character earlier */ *buf = 0; } ./libdieharder/rng_stdin_input_raw.c0000664000175000017500000000233413707046103016133 0ustar eddedd#include #include #include #include /* * This is a wrapping of stdin. */ static unsigned long int stdin_input_raw_get (void *vstate); static double stdin_input_raw_get_double (void *vstate); static void stdin_input_raw_set (void *vstate, unsigned long int s); static unsigned long int stdin_input_raw_get (void *vstate) { unsigned int j; if (fread(&j,sizeof(j),1,stdin) != 1) { if (feof(stdin)) { fprintf(stderr,"# stdin_input_raw(): Error: EOF\n"); } else { fprintf(stderr,"# stdin_input_raw(): Error: %s\n", strerror(errno)); } exit(0); } /* printf("raw: %10u\n",j); */ return j; } static double stdin_input_raw_get_double (void *vstate) { return stdin_input_raw_get(vstate) / (double)UINT_MAX; } static void stdin_input_raw_set (void *vstate, unsigned long int s) { /* empty */ } static const gsl_rng_type stdin_input_raw_type = {"stdin_input_raw", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ 0, stdin_input_raw_set, stdin_input_raw_get, stdin_input_raw_get_double}; const gsl_rng_type *gsl_rng_stdin_input_raw = &stdin_input_raw_type; ./libdieharder/diehard_bitstream.c0000664000175000017500000002267713707046103015542 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is the Diehard BITSTREAM test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * THE BITSTREAM TEST :: * The file under test is viewed as a stream of bits. Call them :: * b1,b2,... . Consider an alphabet with two "letters", 0 and 1 :: * and think of the stream of bits as a succession of 20-letter :: * "words", overlapping. Thus the first word is b1b2...b20, the :: * second is b2b3...b21, and so on. The bitstream test counts :: * the number of missing 20-letter (20-bit) words in a string of :: * 2^21 overlapping 20-letter words. There are 2^20 possible 20 :: * letter words. For a truly random string of 2^21+19 bits, the :: * number of missing words j should be (very close to) normally :: * distributed with mean 141,909 and sigma 428. Thus :: * (j-141909)/428 should be a standard normal variate (z score) :: * that leads to a uniform [0,1) p value. The test is repeated :: * twenty times. :: * * Except that in dieharder, the test is not run 20 times, it is * run a user-selectable number of times, default 100. *======================================================================== * NOTE WELL! * If you use non-overlapping samples, sigma is 290, not 428. This * makes sense -- overlapping samples aren't independent and so you * have fewer "independent" samples than you think you do, and * the variance is consequently larger. *======================================================================== */ #include /* * Include inline uint generator */ #include "static_get_bits.c" int diehard_bitstream(Test **test, int irun) { uint i,j,t,boffset,coffset; Xtest ptest; char *w; uint *bitstream,w20,wscratch,newbyte; unsigned char *cbitstream = 0; uint overlap = 1; /* Leftovers/Cruft */ /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * p = 141909, with sigma 428, for test[0]->tsamples = 2^21 20 bit ntuples. * a.k.a. the number of 20 bit integers missing from 2^21 random * samples drawn from this field. At some point, I should be able * to figure out the expected value for missing integers as a rigorous * function of the size of the field sampled and number of samples drawn * and hence make this test capable of being run with variable sample * sizes, but at the moment I cannot do this and so test[0]->tsamples cannot be * varied. Hence we work with diehard's values and hope that they are * correct. * * ptest.x = number of "missing ntuples" given 2^21 trials * ptest.y = 141909 * * for non-overlapping samples we need (2^21)*5/8 = 1310720 uints, but * for luck we add one as we'd hate to run out. For overlapping samples, * we need 2^21 BITS or 2^18 = 262144 uints, again plus one to be sure * we don't run out. */ #define BS_OVERLAP 262146 #define BS_NO_OVERLAP 1310722 ptest.y = 141909; if(overlap){ ptest.sigma = 428.0; bitstream = (uint *)malloc(BS_OVERLAP*sizeof(uint)); for(i = 0; i < BS_OVERLAP; i++){ bitstream[i] = get_rand_bits_uint(32,0xffffffff,rng); } MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: Filled bitstream with %u rands for overlapping\n",BS_OVERLAP); printf("# diehard_bitstream: samples. Target is mean 141909, sigma = 428.\n"); } } else { ptest.sigma = 290.0; bitstream = (uint *)malloc(BS_NO_OVERLAP*sizeof(uint)); for(i = 0; i < BS_NO_OVERLAP; i++){ bitstream[i] = get_rand_bits_uint(32,0xffffffff,rng); } cbitstream = (unsigned char *)bitstream; /* To allow us to access it by bytes */ MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: Filled bitstream with %u rands for non-overlapping\n",BS_NO_OVERLAP); printf("# diehard_bitstream: samples. Target is mean 141909, sigma = 290.\n"); } } /* * We now make test[0]->tsamples measurements, as usual, to generate the * missing statistic. The easiest way to proceed is to just increment a * vector of length 2^20 using the generated ntuples as the indices of * the slot being incremented. Then we zip through the vector counting * the remaining zeros. This is horribly nonlocal but then, these ARE * random numbers, right? */ w = (char *)malloc(M*sizeof(char)); memset(w,0,M*sizeof(char)); MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: w[] (counter vector) is allocated and zeroed\n"); } i = 0; wscratch = bitstream[i++]; /* Get initial uint into wscratch */ for(t=0;ttsamples;t++){ if(overlap){ /* * We have to slide an overlapping 20-bit window along one bit at a * time to be able to use Marsaglia's sigma of 428. We do this by * taking two scratch uints and pulling a left, right trick to get * the desired window for 8 returns, then shifting left a byte for * four bytes, advancing to the next full uint in bitstream[] on * the boundary. Yuk, but what can one do? */ coffset = (t%32)/8; /* next byte to shift in from bitstream, 0,1,2 or 3 */ boffset = t%8; /* bit offset of w20 in wscratch */ i = t/32 + 1; /* bitstream index of uint from which we draw next byte */ /* printf("t = %u, coffset = %u\n",t,coffset); */ if(boffset == 0) { /* Get a new byte */ wscratch = wscratch << 8; /* make room for next byte */ /* printf("# diehard_bitstream: left shift 8 wscratch = "); dumpuintbits(&wscratch, 1); printf("\n"); */ newbyte = bitstream[i] << (8*coffset); /* printf("# diehard_bitstream: left shift %u newbyte = ",8*coffset); dumpuintbits(&newbyte, 1); printf("\n"); */ newbyte = newbyte >> 24; /* printf("# diehard_bitstream: newbyte = "); dumpuintbits(&newbyte, 1); printf("\n"); */ wscratch += newbyte; } /* MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: wscratch = "); dumpuintbits(&wscratch, 1); printf("\n"); } */ w20 = ((wscratch << boffset) >> 12); MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: w20 = "); dumpuintbits(&w20, 1); printf("\n"); } w[w20]++; } else { /* * For non-overlapping samples, easiest way is to just get 2.5 bytes * at a time and keep track of a byte index into bitstream, * cbitstream. Then things are actually pretty straightforward. */ MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: Non-overlapping t = %u, i = %u\n",t,i); } if(t%2 == 0){ w20 = 0; /* Start with window clear, of course... */ for(j=0;j<2;j++){ /* Get two bytes */ w20 = w20 << 8; /* Does nothing on first call */ w20 += cbitstream[i]; /* Shift in each byte */ MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: i = %u cb = %u w20 = ",i,cbitstream[i]); dumpuintbits(&w20, 1); printf("\n"); } i++; } wscratch = (uint) (cbitstream[i] >> 4); /* Get first 4 bits of next byte */ MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: wscratch = "); dumpuintbits(&wscratch, 1); printf("\n"); } w20 = (w20 << 4) + wscratch; /* Gets evens */ MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: w20 = "); dumpuintbits(&w20, 1); printf("\n"); } } else { wscratch = (uint) cbitstream[i]; MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: i = %u wscratch = ",i); dumpuintbits(&wscratch, 1); printf("\n"); } w20 = wscratch & 0x0000000F ; /* Get last 4 bits of next byte */ MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: i = %u w20 = ",i); dumpuintbits(&w20, 1); printf("\n"); } i++; for(j=0;j<2;j++){ /* Get two more bytes */ w20 = w20 << 8; w20 += cbitstream[i]; /* Shift in each byte */ MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: i = %u w20 = ",i); dumpuintbits(&w20, 1); printf("\n"); } i++; } MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream: w20 = "); dumpuintbits(&w20, 1); printf("\n"); } } w[w20]++; } } /* * Now we count the holes, so to speak */ ptest.x = 0; for(i=0;ipvalues[irun] = ptest.pvalue; MYDEBUG(D_DIEHARD_BITSTREAM) { printf("# diehard_bitstream(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } /* * Don't forget to free or we'll leak. Hate to have to wear * depends... */ nullfree(w); nullfree(bitstream); return(0); } ./libdieharder/libdieharder.svn.time0000664000175000017500000000000013707046103015777 0ustar eddedd./libdieharder/diehard_count_1s_stream.c0000664000175000017500000003331413707046103016644 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is the Diehard Count a Stream of 1's test, rewritten from the * description in tests.txt on George Marsaglia's diehard site. * * This is the COUNT-THE-1's TEST on a stream of bytes. :: * Consider the file under test as a stream of bytes (four per :: * 32 bit integer). Each byte can contain from 0 to 8 1's, :: * with probabilities 1,8,28,56,70,56,28,8,1 over 256. Now let :: * the stream of bytes provide a string of overlapping 5-letter :: * words, each "letter" taking values A,B,C,D,E. The letters are :: * determined by the number of 1's in a byte:: 0,1,or 2 yield A,:: * 3 yields B, 4 yields C, 5 yields D and 6,7 or 8 yield E. Thus :: * we have a monkey at a typewriter hitting five keys with vari- :: * ous probabilities (37,56,70,56,37 over 256). There are 5^5 :: * possible 5-letter words, and from a string of 256,000 (over- :: * lapping) 5-letter words, counts are made on the frequencies :: * for each word. The quadratic form in the weak inverse of :: * the covariance matrix of the cell counts provides a chisquare :: * test:: Q5-Q4, the difference of the naive Pearson sums of :: * (OBS-EXP)^2/EXP on counts for 5- and 4-letter cell counts. :: * * Comment * * For the less statistically trained amongst us, the translation * of the above is: * Generate a string of base-5 digits derived as described from * random bytes (where we by default generate NON-overlapping bytes * but overlapping ones can be selected by setting the overlap flag * on the command line). * Turn four and five digit base 5 numbers (created from these digits) * into indices and incrementally count the frequency of occurrence of * each index. * Compute the expected value of these counts given tsamples samples, * and thereby (from the vector of actual vs expected counts) generate * a chisq for 4 and 5 digit numbers separately. These chisq's are * expected, for a large number of trials, to be equal to the number of * degrees of freedom of the vectors, (5^5 - 1) or (5^4 - 1). Generate * the mean DIFFERENCE = 2500 as the expected value of the difference * chisq_5 - chisq_4 and compute a pvalue based on this expected value and * the associated standard deviation sqrt(2*2500). * * This test is written so overlap can be flag-controlled and so that * tsamples can be freely varied compared to diehard's presumed 256,000. * As usual, it also runs at 100 times and not 10 to generate the final * KS pvalue for the test. * * One can easily prove that this test will fail whenever rgb_bitdist * fails at 40 bits and pass when rgb_bitdist passes, as rgb_bitdist * tests the much more stringent requirement that the actual underlying * 40 bit strings are correctly distributed not just with respect to * the morphed number of 1 bits but with respect to the actual underlying * bit patterns. It is, however, vastly less sensitive -- rgb_bitdist * already FAILS at six bit strings for every generator thus far tested, * meaning that two OCTAL digits WITHOUT any transformations or bit counts * are already incorrectly distributed. It is then perfectly obvious that * all bitstrings with higher numbers of bits will be incorrectly * distributed as well (including 40 bit strings), but count_the_1s is * distressingly insensitive to this embedded but invisible failure. *======================================================================== */ #include /* * Include inline uint generator */ #include "static_get_bits.c" /* * This table was generated using the following code fragment. { char table[256]; table[i] = 0; for(j=0;j<8*sizeof(uint);j++){ table[i] += get_int_bit(i,j); } switch(table[i]){ case 0: case 1: case 2: table[i] = 0; break; case 3: table[i] = 1; break; case 4: table[i] = 2; break; case 5: table[i] = 3; break; case 6: case 7: case 8: table[i] = 4; break; default: fprintf(stderr,"Hahahahah\n"); exit(0); break; } } */ char b5s[] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 4, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 4, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 4, 2, 3, 3, 4, 3, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4}; /* * The following are needed to generate the test statistic. * Note that sqrt(5000) = 70.710678118654752440084436210485 */ const double mu=2500, std=70.7106781; /* * Vector of probabilities for each integer. (All exact, btw.) * 37.0/256.0,56.0/256.0,70.0/256.0,56.0/256.0,37.0/256.0 */ const double ps[]={ 0.144531250, 0.218750000, 0.273437500, 0.218750000, 0.144531250}; #define LSHIFT5(old,new) (old*5 + new) int diehard_count_1s_stream(Test **test, int irun) { uint i,j,k,index5=0,index4,letter,t; uint boffset; Vtest vtest4,vtest5; Xtest ptest; uint overlap = 1; /* leftovers/cruft */ /* * Count a Stream of 1's is a very complex way of generating a statistic. * We take a random stream, and turn it bytewise (overlapping or not) * into a 4 and/or 5 digit base 5 integer (in the ranges 0-624 and 0-3124 * respectively) via the bytewise mapping in b5[] above, derived from the * prescription of Marsaglia in diehard. Increment a vector for 4 and 5 * digit numbers separately that counts the number of times that 4, 5 * digit integer has occurred in the random stream. Compare these * vectors to their expected values, generated from the probabilities of * the occurrence of each base 5 integer in the byte map. Compute chisq * for each of these vectors -- the "degrees of freedom" of the stream * thus mapped.. The difference between chisq(5) and chisq(4)should be * 5^4 - 5^3 = 2500 with stddev sqrt(5000), use this in an Xtest to * generate the final trial statistic. */ /* * I'm leaving this in so the chronically bored can validate that * the table exists and is correctly loaded and addressable. */ if(verbose == -1){ for(i=0;i<256;i++){ printf("%u, ",b5s[i]); /* dumpbits(&i,8); */ if((i+1)%16 == 0){ printf("\n"); } } exit(0); } /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * This is basically a pair of parallel vtests, with a final test * statistic generated from their difference (somehow). We therefore * create two vtests, one for four digit base 5 integers and one for * five digit base 5 integers, and generate their expected values for * test[0]->tsamples trials. */ ptest.y = 2500.0; ptest.sigma = sqrt(5000.0); Vtest_create(&vtest4,625); vtest4.cutoff = 5.0; for(i=0;i<625;i++){ j = i; vtest4.y[i] = test[0]->tsamples; vtest4.x[i] = 0.0; /* * Digitize base 5, compute expected value for THIS integer i. */ /* printf("%u: ",j); */ for(k=0;k<4;k++){ /* * Take the least significant "letter" of j in range 0-4 */ letter = j%5; /* * multiply by the probability of getting this letter */ vtest4.y[i] *= ps[letter]; /* * Right shift j to get next digit. */ /* printf("%1u",letter); */ j /= 5; } /* printf(" = %f\n",vtest4.y[i]); */ } Vtest_create(&vtest5,3125); vtest5.cutoff = 5.0; for(i=0;i<3125;i++){ j = i; vtest5.y[i] = test[0]->tsamples; vtest5.x[i] = 0.0; /* * Digitize base 5, compute expected value for THIS integer i. */ for(k=0;k<5;k++){ /* * Take the least significant "letter" of j in range 0-4 */ letter = j%5; /* * multiply by the probability of getting this letter */ vtest5.y[i] *= ps[letter]; /* * Right shift j to get next digit. */ j /= 5; } } /* * Preload index with the four bytes of the first rand if overlapping * only. */ if(overlap){ i = get_rand_bits_uint(32, 0xFFFFFFFF, rng); MYDEBUG(D_DIEHARD_COUNT_1S_STREAM){ dumpbits(&i,32); } /* 1st byte */ /* * Bauer fix. I don't think he likes my getting ntuples sequentially * from the stream in diehard tests, which is fair enough...;-) * In the raw bit distribution tests, however, it is essential. * j = get_bit_ntuple_from_uint(i,8,0x000000FF,0); */ j = get_bit_ntuple_from_whole_uint(i,8,0x000000FF,0); index5 = b5s[j]; if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ printf("b5s[%u] = %u, index5 = %u\n",j,b5s[j],index5); dumpbits(&j,8); } /* 2nd byte */ /* Cruft: See above. j = get_bit_ntuple_from_uint(i,8,0x000000FF,8); */ j = get_bit_ntuple_from_whole_uint(i,8,0x000000FF,8); index5 = LSHIFT5(index5,b5s[j]); if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ printf("b5s[%u] = %u, index5 = %u\n",j,b5s[j],index5); dumpbits(&j,8); } /* 3rd byte */ /* Cruft: See above. j = get_bit_ntuple_from_uint(i,8,0x000000FF,16); */ j = get_bit_ntuple_from_whole_uint(i,8,0x000000FF,16); index5 = LSHIFT5(index5,b5s[j]); if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ printf("b5s[%u] = %u, index5 = %u\n",j,b5s[j],index5); dumpbits(&j,8); } /* 4th byte */ /* Cruft: See above. j = get_bit_ntuple_from_uint(i,8,0x000000FF,24); */ j = get_bit_ntuple_from_whole_uint(i,8,0x000000FF,24); index5 = LSHIFT5(index5,b5s[j]); if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ printf("b5s[%u] = %u, index5 = %u\n",j,b5s[j],index5); dumpbits(&j,8); } } boffset = 0; for(t=0;ttsamples;t++){ /* * OK, we now have to do a simple modulus decision as to whether or not * a new random uint is required AND to track the byte offset. We also * have to determine whether or not to use overlapping bytes. I * actually think that we may need to turn index5 into a subroutine * where each successive call returns the next morphed index5, * overlapping or not. */ if(overlap){ /* * Use overlapping bytes to generate the next index5 according to * the diehard prescription (designed to work with a very small * input file of rands). */ if(boffset%32 == 0){ /* * We need a new rand to get our next byte. */ boffset = 0; i = get_rand_bits_uint(32, 0xFFFFFFFF, rng); if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ dumpbits(&i,32); } } /* * get next byte from the last rand we generated. */ /* Cruft: See above. j = get_bit_ntuple_from_uint(i,8,0x000000FF,boffset); */ j = get_bit_ntuple_from_whole_uint(i,8,0x000000FF,boffset); index5 = LSHIFT5(index5,b5s[j]); /* * I THINK that this basically throws away the sixth digit in the * left-shifted base 5 value, keeping the value of the 5-digit base 5 * number in the range 0 to 5^5-1 or 0 to 3124 decimal. */ index5 = index5%3125; if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ printf("b5s[%u] = %u, index5 = %u\n",j,b5s[j],index5); dumpbits(&j,8); } boffset+=8; } else { /* * Get the next five bytes and make an index5 out of them, no * overlap. */ for(k=0;k<5;k++){ if(boffset%32 == 0){ /* * We need a new rand to get our next byte. */ boffset = 0; i = get_rand_bits_uint(32, 0xFFFFFFFF, rng); if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ dumpbits(&i,32); } } /* * get next byte from the last rand we generated. */ /* Cruft: See above. j = get_bit_ntuple_from_uint(i,8,0x000000FF,boffset); */ j = get_bit_ntuple_from_whole_uint(i,8,0x000000FF,boffset); index5 = LSHIFT5(index5,b5s[j]); if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ printf("b5s[%u] = %u, index5 = %u\n",j,b5s[j],index5); dumpbits(&j,8); } boffset+=8; } } /* * We use modulus to throw away the sixth digit in the left-shifted * base 5 index value, keeping the value of the 5-digit base 5 number * in the range 0 to 5^5-1 or 0 to 3124 decimal. We repeat for the * four digit index. At this point we increment the counts for index4 * and index5. Tres simple, no? */ index5 = index5%3125; index4 = index5%625; vtest4.x[index4]++; vtest5.x[index5]++; } /* * OK, all that is left now is to figure out the statistic. */ if(verbose == D_DIEHARD_COUNT_1S_STREAM || verbose == D_ALL){ for(i = 0;i<625;i++){ printf("%u: %f %f\n",i,vtest4.y[i],vtest4.x[i]); } for(i = 0;i<3125;i++){ printf("%u: %f %f\n",i,vtest5.y[i],vtest5.x[i]); } } Vtest_eval(&vtest4); Vtest_eval(&vtest5); MYDEBUG(D_DIEHARD_COUNT_1S_STREAM) { printf("vtest4.chisq = %f vtest5.chisq = %f\n",vtest4.chisq,vtest5.chisq); } ptest.x = vtest5.chisq - vtest4.chisq; Xtest_eval(&ptest); test[0]->pvalues[irun] = ptest.pvalue; MYDEBUG(D_DIEHARD_COUNT_1S_STREAM) { printf("# diehard_count_1s_stream(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } Vtest_destroy(&vtest4); Vtest_destroy(&vtest5); return(0); } ./libdieharder/rng_threefish.c0000664000175000017500000000766713707046103014721 0ustar eddedd/* rng_threefish * * Copyright (C) 1996, 1997, 1998, 1999, 2000 James Theiler, Brian Gough * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include // State blocks = 1 for weakest form #define STATE_BLOCKS (1) #define BLOCKS_SIZE (64 * STATE_BLOCKS) #define Threefish_512_Process_Blocks(a,b,c,d) Threefish_512_Process_Blocks64(a,b,c,d) /* * This is a wrapping of the Threefish algorithm as a generator */ typedef struct { Threefish_512_Ctxt_t ctx; unsigned char block[BLOCKS_SIZE]; short int pos; } Threefish_state_t; unsigned long int threefish_get (void *vstate); double threefish_get_double (void *vstate); void threefish_set (void *vstate, unsigned long int s); #ifndef BADRNG unsigned long int threefish_get_long (void *vstate) { Threefish_state_t *state = vstate; unsigned long int ret; if (state->pos + sizeof(unsigned long int) > BLOCKS_SIZE) { Threefish_512_Process_Blocks(&(state->ctx), state->block, state->block, STATE_BLOCKS); state->pos = 0; } ret = *((unsigned long int *) (state->block + state->pos)); state->pos += sizeof(unsigned long int); return(ret); } unsigned long int threefish_get (void *vstate) { Threefish_state_t *state = vstate; unsigned int ret; if (state->pos + sizeof(ret) > BLOCKS_SIZE) { Threefish_512_Process_Blocks(&(state->ctx), state->block, state->block, STATE_BLOCKS); state->pos = 0; } ret = *((unsigned int *) (state->block + state->pos)); state->pos += sizeof(ret); // ret &= 0x7fffffff; return(ret); } double threefish_get_double (void *vstate) { // return threefish_get_long(vstate) / (double) ULONG_MAX; return (double) threefish_get(vstate) / (double) (UINT_MAX >> 0); } void threefish_set (void *vstate, unsigned long int s) { Threefish_state_t *state = vstate; int i; unsigned long int *blockptr; memset(state, 0, sizeof(*state)); for (i = 0; i < 16; i++) ((unsigned char *) state->ctx.T)[i] = 112 + i; for (i = 0; i < 64; i++) ((unsigned char *) state->ctx.Key)[i] = 64 + i; /* * This causes the dread "dereferencing type-punned pointer" warning * and breaks strict aliasing rules. It seems to say * "set the contents of the unsigned long int pointer state->block * to be s". OTOH, we see unsigned char block[BLOCKS_SIZE], * suggesting that block is a character string. BLOCKS_SIZE * seems to be de facto 64, so block is basically a chunk of * memory that is 64 bytes long. The unsigned long int s, * OTOH, is only 32 bits long. This, therefore, sets only the * first four bytes of it, and makes the compiler complain. * I'm going to try to make exactly the same thing happen a * different way. *((unsigned long int *) state->block) = s; */ blockptr = (unsigned long int*) &state->block; *blockptr = s; Threefish_512_Process_Blocks(&(state->ctx), state->block, state->block, 1); for (i = 1; i < STATE_BLOCKS; i++) { state->ctx.T[0] = i; Threefish_512_Process_Blocks(&(state->ctx), state->block, state->block+(i*64), 1); } state->ctx.T[0] = 112; return; } static const gsl_rng_type threefish_type = { "Threefish_OFB", /* name */ UINT_MAX>>0, // UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (Threefish_state_t), &threefish_set, &threefish_get, &threefish_get_double}; const gsl_rng_type *gsl_rng_threefish = &threefish_type; #endif ./libdieharder/rijndael-alg-fst.c0000664000175000017500000017427613707046103015216 0ustar eddedd/** * rijndael-alg-fst.c * * @version 3.0 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. */ #include #include #include /* Te0[x] = S [x].[02, 01, 01, 03]; Te1[x] = S [x].[03, 02, 01, 01]; Te2[x] = S [x].[01, 03, 02, 01]; Te3[x] = S [x].[01, 01, 03, 02]; Te4[x] = S [x].[01, 01, 01, 01]; Td0[x] = Si[x].[0e, 09, 0d, 0b]; Td1[x] = Si[x].[0b, 0e, 09, 0d]; Td2[x] = Si[x].[0d, 0b, 0e, 09]; Td3[x] = Si[x].[09, 0d, 0b, 0e]; Td4[x] = Si[x].[01, 01, 01, 01]; */ static const u32 Te0[256] = { 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, }; static const u32 Te1[256] = { 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, }; static const u32 Te2[256] = { 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, }; static const u32 Te3[256] = { 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, }; static const u32 Te4[256] = { 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, }; static const u32 Td0[256] = { 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, }; static const u32 Td1[256] = { 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, }; static const u32 Td2[256] = { 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, }; static const u32 Td3[256] = { 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, }; static const u32 Td4[256] = { 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, }; static const u32 rcon[] = { 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ }; #define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) #ifdef _MSC_VER #define GETU32(p) SWAP(*((u32 *)(p))) #define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); } #else #define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) #define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); } #endif /** * Expand the cipher key into the encryption key schedule. * * @return the number of rounds for the given cipher key size. */ int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits) { int i = 0; u32 temp; rk[0] = GETU32(cipherKey ); rk[1] = GETU32(cipherKey + 4); rk[2] = GETU32(cipherKey + 8); rk[3] = GETU32(cipherKey + 12); if (keyBits == 128) { for (;;) { temp = rk[3]; rk[4] = rk[0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[5] = rk[1] ^ rk[4]; rk[6] = rk[2] ^ rk[5]; rk[7] = rk[3] ^ rk[6]; if (++i == 10) { return 10; } rk += 4; } } rk[4] = GETU32(cipherKey + 16); rk[5] = GETU32(cipherKey + 20); if (keyBits == 192) { for (;;) { temp = rk[ 5]; rk[ 6] = rk[ 0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[ 7] = rk[ 1] ^ rk[ 6]; rk[ 8] = rk[ 2] ^ rk[ 7]; rk[ 9] = rk[ 3] ^ rk[ 8]; if (++i == 8) { return 12; } rk[10] = rk[ 4] ^ rk[ 9]; rk[11] = rk[ 5] ^ rk[10]; rk += 6; } } rk[6] = GETU32(cipherKey + 24); rk[7] = GETU32(cipherKey + 28); if (keyBits == 256) { for (;;) { temp = rk[ 7]; rk[ 8] = rk[ 0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[ 9] = rk[ 1] ^ rk[ 8]; rk[10] = rk[ 2] ^ rk[ 9]; rk[11] = rk[ 3] ^ rk[10]; if (++i == 7) { return 14; } temp = rk[11]; rk[12] = rk[ 4] ^ (Te4[(temp >> 24) ] & 0xff000000) ^ (Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(temp >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(temp ) & 0xff] & 0x000000ff); rk[13] = rk[ 5] ^ rk[12]; rk[14] = rk[ 6] ^ rk[13]; rk[15] = rk[ 7] ^ rk[14]; rk += 8; } } return 0; } /** * Expand the cipher key into the decryption key schedule. * * @return the number of rounds for the given cipher key size. */ int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits) { int Nr, i, j; u32 temp; /* expand the cipher key: */ Nr = rijndaelKeySetupEnc(rk, cipherKey, keyBits); /* invert the order of the round keys: */ for (i = 0, j = 4*Nr; i < j; i += 4, j -= 4) { temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; } /* apply the inverse MixColumn transform to all round keys but the first and the last: */ for (i = 1; i < Nr; i++) { rk += 4; rk[0] = Td0[Te4[(rk[0] >> 24) ] & 0xff] ^ Td1[Te4[(rk[0] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[0] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[0] ) & 0xff] & 0xff]; rk[1] = Td0[Te4[(rk[1] >> 24) ] & 0xff] ^ Td1[Te4[(rk[1] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[1] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[1] ) & 0xff] & 0xff]; rk[2] = Td0[Te4[(rk[2] >> 24) ] & 0xff] ^ Td1[Te4[(rk[2] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[2] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[2] ) & 0xff] & 0xff]; rk[3] = Td0[Te4[(rk[3] >> 24) ] & 0xff] ^ Td1[Te4[(rk[3] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[3] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[3] ) & 0xff] & 0xff]; } return Nr; } void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]) { u32 s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL int r; #endif /* ?FULL_UNROLL */ /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(pt ) ^ rk[0]; s1 = GETU32(pt + 4) ^ rk[1]; s2 = GETU32(pt + 8) ^ rk[2]; s3 = GETU32(pt + 12) ^ rk[3]; #ifdef FULL_UNROLL /* round 1: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[ 4]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[ 5]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[ 6]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[ 7]; /* round 2: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[ 8]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[ 9]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[10]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[11]; /* round 3: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[12]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[13]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[14]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[15]; /* round 4: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[16]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[17]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[18]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[19]; /* round 5: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[20]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[21]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[22]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[23]; /* round 6: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[24]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[25]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[26]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[27]; /* round 7: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[28]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[29]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[30]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[31]; /* round 8: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[32]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[33]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[34]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[35]; /* round 9: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[36]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[37]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[38]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[39]; if (Nr > 10) { /* round 10: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[40]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[41]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[42]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[43]; /* round 11: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[44]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[45]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[46]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[47]; if (Nr > 12) { /* round 12: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[48]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[49]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[50]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[51]; /* round 13: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[52]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[53]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[54]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[55]; } } rk += Nr << 2; #else /* !FULL_UNROLL */ /* * Nr - 1 full rounds: */ r = Nr >> 1; for (;;) { t0 = Te0[(s0 >> 24) ] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[(s3 ) & 0xff] ^ rk[4]; t1 = Te0[(s1 >> 24) ] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[(s0 ) & 0xff] ^ rk[5]; t2 = Te0[(s2 >> 24) ] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[(s1 ) & 0xff] ^ rk[6]; t3 = Te0[(s3 >> 24) ] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[(s2 ) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) { break; } s0 = Te0[(t0 >> 24) ] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[(t3 ) & 0xff] ^ rk[0]; s1 = Te0[(t1 >> 24) ] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[(t0 ) & 0xff] ^ rk[1]; s2 = Te0[(t2 >> 24) ] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[(t1 ) & 0xff] ^ rk[2]; s3 = Te0[(t3 >> 24) ] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[(t2 ) & 0xff] ^ rk[3]; } #endif /* ?FULL_UNROLL */ /* * apply last round and * map cipher state to byte array block: */ s0 = (Te4[(t0 >> 24) ] & 0xff000000) ^ (Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t3 ) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32(ct , s0); s1 = (Te4[(t1 >> 24) ] & 0xff000000) ^ (Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t0 ) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32(ct + 4, s1); s2 = (Te4[(t2 >> 24) ] & 0xff000000) ^ (Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t1 ) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32(ct + 8, s2); s3 = (Te4[(t3 >> 24) ] & 0xff000000) ^ (Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t2 ) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32(ct + 12, s3); } void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]) { u32 s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL int r; #endif /* ?FULL_UNROLL */ /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(ct ) ^ rk[0]; s1 = GETU32(ct + 4) ^ rk[1]; s2 = GETU32(ct + 8) ^ rk[2]; s3 = GETU32(ct + 12) ^ rk[3]; #ifdef FULL_UNROLL /* round 1: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[ 4]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[ 5]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[ 6]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[ 7]; /* round 2: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[ 8]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[ 9]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[10]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[11]; /* round 3: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[12]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[13]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[14]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[15]; /* round 4: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[16]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[17]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[18]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[19]; /* round 5: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[20]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[21]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[22]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[23]; /* round 6: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[24]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[25]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[26]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[27]; /* round 7: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[28]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[29]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[30]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[31]; /* round 8: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[32]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[33]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[34]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[35]; /* round 9: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[36]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[37]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[38]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[39]; if (Nr > 10) { /* round 10: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[40]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[41]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[42]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[43]; /* round 11: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[44]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[45]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[46]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[47]; if (Nr > 12) { /* round 12: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[48]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[49]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[50]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[51]; /* round 13: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[52]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[53]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[54]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[55]; } } rk += Nr << 2; #else /* !FULL_UNROLL */ /* * Nr - 1 full rounds: */ r = Nr >> 1; for (;;) { t0 = Td0[(s0 >> 24) ] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[(s1 ) & 0xff] ^ rk[4]; t1 = Td0[(s1 >> 24) ] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[(s2 ) & 0xff] ^ rk[5]; t2 = Td0[(s2 >> 24) ] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[(s3 ) & 0xff] ^ rk[6]; t3 = Td0[(s3 >> 24) ] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[(s0 ) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) { break; } s0 = Td0[(t0 >> 24) ] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[(t1 ) & 0xff] ^ rk[0]; s1 = Td0[(t1 >> 24) ] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[(t2 ) & 0xff] ^ rk[1]; s2 = Td0[(t2 >> 24) ] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[(t3 ) & 0xff] ^ rk[2]; s3 = Td0[(t3 >> 24) ] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[(t0 ) & 0xff] ^ rk[3]; } #endif /* ?FULL_UNROLL */ /* * apply last round and * map cipher state to byte array block: */ s0 = (Td4[(t0 >> 24) ] & 0xff000000) ^ (Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t1 ) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32(pt , s0); s1 = (Td4[(t1 >> 24) ] & 0xff000000) ^ (Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t2 ) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32(pt + 4, s1); s2 = (Td4[(t2 >> 24) ] & 0xff000000) ^ (Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t3 ) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32(pt + 8, s2); s3 = (Td4[(t3 >> 24) ] & 0xff000000) ^ (Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t0 ) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32(pt + 12, s3); } #ifdef INTERMEDIATE_VALUE_KAT void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds) { int r; u32 s0, s1, s2, s3, t0, t1, t2, t3; /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(block ) ^ rk[0]; s1 = GETU32(block + 4) ^ rk[1]; s2 = GETU32(block + 8) ^ rk[2]; s3 = GETU32(block + 12) ^ rk[3]; rk += 4; /* * Nr - 1 full rounds: */ for (r = (rounds < Nr ? rounds : Nr - 1); r > 0; r--) { t0 = Te0[(s0 >> 24) ] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[(s3 ) & 0xff] ^ rk[0]; t1 = Te0[(s1 >> 24) ] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[(s0 ) & 0xff] ^ rk[1]; t2 = Te0[(s2 >> 24) ] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[(s1 ) & 0xff] ^ rk[2]; t3 = Te0[(s3 >> 24) ] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[(s2 ) & 0xff] ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; rk += 4; } /* * apply last round and * map cipher state to byte array block: */ if (rounds == Nr) { t0 = (Te4[(s0 >> 24) ] & 0xff000000) ^ (Te4[(s1 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s2 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s3 ) & 0xff] & 0x000000ff) ^ rk[0]; t1 = (Te4[(s1 >> 24) ] & 0xff000000) ^ (Te4[(s2 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s3 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s0 ) & 0xff] & 0x000000ff) ^ rk[1]; t2 = (Te4[(s2 >> 24) ] & 0xff000000) ^ (Te4[(s3 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s0 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s1 ) & 0xff] & 0x000000ff) ^ rk[2]; t3 = (Te4[(s3 >> 24) ] & 0xff000000) ^ (Te4[(s0 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s2 ) & 0xff] & 0x000000ff) ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; } PUTU32(block , s0); PUTU32(block + 4, s1); PUTU32(block + 8, s2); PUTU32(block + 12, s3); } void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds) { int r; u32 s0, s1, s2, s3, t0, t1, t2, t3; /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(block ) ^ rk[0]; s1 = GETU32(block + 4) ^ rk[1]; s2 = GETU32(block + 8) ^ rk[2]; s3 = GETU32(block + 12) ^ rk[3]; rk += 4; /* * Nr - 1 full rounds: */ for (r = (rounds < Nr ? rounds : Nr) - 1; r > 0; r--) { t0 = Td0[(s0 >> 24) ] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[(s1 ) & 0xff] ^ rk[0]; t1 = Td0[(s1 >> 24) ] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[(s2 ) & 0xff] ^ rk[1]; t2 = Td0[(s2 >> 24) ] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[(s3 ) & 0xff] ^ rk[2]; t3 = Td0[(s3 >> 24) ] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[(s0 ) & 0xff] ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; rk += 4; } /* * complete the last round and * map cipher state to byte array block: */ t0 = (Td4[(s0 >> 24) ] & 0xff000000) ^ (Td4[(s3 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s2 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s1 ) & 0xff] & 0x000000ff); t1 = (Td4[(s1 >> 24) ] & 0xff000000) ^ (Td4[(s0 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s3 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s2 ) & 0xff] & 0x000000ff); t2 = (Td4[(s2 >> 24) ] & 0xff000000) ^ (Td4[(s1 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s0 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s3 ) & 0xff] & 0x000000ff); t3 = (Td4[(s3 >> 24) ] & 0xff000000) ^ (Td4[(s2 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s0 ) & 0xff] & 0x000000ff); if (rounds == Nr) { t0 ^= rk[0]; t1 ^= rk[1]; t2 ^= rk[2]; t3 ^= rk[3]; } PUTU32(block , t0); PUTU32(block + 4, t1); PUTU32(block + 8, t2); PUTU32(block + 12, t3); } #endif /* INTERMEDIATE_VALUE_KAT */ ./libdieharder/rng_ca.c0000664000175000017500000001402313707046103013303 0ustar eddedd/* * rng_ca.c * * Copyright (C) Tony Pasqualoni / Sept. 20, 2006 * * From: * * http://home.southernct.edu/~pasqualonia1/ca/report.html * * GSL-style packaging for dieharder by Robert G. Brown 2/27/07 * * Cellular automaton random number generator * Uses a 256-state automaton to generate random sequences of * 32-bit unsigned integers. * *======================================================================== * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include /* * This is a wrapping of the /dev/random hardware rng */ static unsigned long int ca_get (void *vstate); static double ca_get_double (void *vstate); static void ca_set (void *vstate, unsigned long int s); typedef struct { FILE *fp; } ca_state_t; #define CA_WIDTH 2056 // width in cells of cellular automaton #define RULESIZE 511 // amount of elements in rule table static unsigned char init_config[CA_WIDTH]; // initial configuration of CA static unsigned char * first_cell; // leftmost cell static unsigned char * last_cell; // rightmost cell static unsigned char * cell_d; // current cell unsigned int rule[RULESIZE] = { 100,75,16,3,229,51,197,118,24,62,198,11,141,152,241,188,2,17,71,47,179,177,126,231,202,243,59,25,77,196,30,134, 199,163,34,216,21,84,37,182,224,186,64,79,225,45,143,20,48,147,209,221,125,29,99,12,46,190,102,220,80,215,242, 105,15,53,0,67,68,69,70,89,109,195,170,78,210,131,42,110,181,145,40,114,254,85,107,87,72,192,90,201,162,122,86, 252,94,129,98,132,193,249,156,172,219,230,153,54,180,151,83,214,123,88,164,167,116,117,7,27,23,213,235,5,65,124, 60,127,236,149,44,28,58,121,191,13,250,10,232,112,101,217,183,239,8,32,228,174,49,113,247,158,106,218,154,66, 226,157,50,26,253,93,205,41,133,165,61,161,187,169,6,171,81,248,56,175,246,36,178,52,57,212,39,176,184,185,245, 63,35,189,206,76,104,233,194,19,43,159,108,55,200,155,14,74,244,255,222,207,208,137,128,135,96,144,18,95,234, 139,173,92,1,203,115,223,130,97,91,227,146,4,31,120,211,38,22,138,140,237,238,251,240,160,142,119,73,103,166,33, 148,9,111,136,168,150,82,204,100,75,16,3,229,51,197,118,24,62,198,11,141,152,241,188,2,17,71,47,179,177,126,231, 202,243,59,25,77,196,30,134,199,163,34,216,21,84,37,182,224,186,64,79,225,45,143,20,48,147,209,221,125,29,99,12, 46,190,102,220,80,215,242,105,15,53,0,67,68,69,70,89,109,195,170,78,210,131,42,110,181,145,40,114,254,85,107,87, 72,192,90,201,162,122,86,252,94,129,98,132,193,249,156,172,219,230,153,54,180,151,83,214,123,88,164,167,116,117, 7,27,23,213,235,5,65,124,60,127,236,149,44,28,58,121,191,13,250,10,232,112,101,217,183,239,8,32,228,174,49,113, 247,158,106,218,154,66,226,157,50,26,253,93,205,41,133,165,61,161,187,169,6,171,81,248,56,175,246,36,178,52,57, 212,39,176,184,185,245,63,35,189,206,76,104,233,194,19,43,159,108,55,200,155,14,74,244,255,222,207,208,137,128, 135,96,144,18,95,234,139,173,92,1,203,115,223,130,97,91,227,146,4,31,120,211,38,22,138,140,237,238,251,240,160, 142,119,73,103,166,33,148,9,111,136,168,150,82 }; static inline unsigned long int ca_get (void *vstate) { /* Returns a 32-bit unsigned integer produced by the automaton */ /* * cell addresses (these cells and cell_d serve as pointers to the 4 * bytes of the next integer) */ unsigned char * cell_a; unsigned char * cell_b; unsigned char * cell_c; /* set cell addresses using address of current cell (cell_d) */ cell_c = cell_d - 1; cell_b = cell_c - 1; cell_a = cell_b - 1; /* update cell states using rule table */ *cell_d = rule[*cell_c + *cell_d]; *cell_c = rule[*cell_b + *cell_c]; *cell_b = rule[*cell_a + *cell_b]; /* * update the state of cell_a and shift current cell (cell_d) to the * left by 4 bytes (first_cell - 1 = last_cell) */ if (cell_a == first_cell) { *cell_a = rule[*cell_a]; cell_d = last_cell; return( *((unsigned int *)cell_a) ); } else { *cell_a = rule[*(cell_a - 1) + *cell_a]; cell_d -= 4; return( *((unsigned int *)cell_a) ); } } static double ca_get_double (void *vstate) { return ca_get (vstate) / (double) UINT_MAX; } static void ca_set (void *vstate, unsigned long int s) { /* Initialize automaton using specified seed. */ ca_state_t *state __attribute__((unused)) = (ca_state_t *) vstate; int i; /* clear cells */ for (i = 0; i < CA_WIDTH - 1; i++) init_config[i] = 0; /* set initial cell states using seed */ init_config[CA_WIDTH - 1] = (unsigned char)(seed); init_config[CA_WIDTH - 2] = (unsigned char)(seed << 8); init_config[CA_WIDTH - 3] = (unsigned char)(seed << 16); init_config[CA_WIDTH - 4] = (unsigned char)(seed << 24); if (seed != 0xFFFFFFFF) seed++; for (i = 0; i < CA_WIDTH - 4; i++) init_config[i] = (unsigned char) ( seed >> (i % 32) ); /* define addresses of first_cell and last_cell */ first_cell = init_config; last_cell = init_config + CA_WIDTH - 1; /* * set address of current cell to last_cell (automaton is updated right * to left) */ cell_d = last_cell; /* evolve automaton before returning integers */ for (i = 0 ; i < ( (CA_WIDTH * CA_WIDTH) / 4.0); i++) ca_get(vstate); } static const gsl_rng_type ca_type = {"ca", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (ca_state_t), &ca_set, &ca_get, &ca_get_double}; const gsl_rng_type *gsl_rng_ca = &ca_type; ./libdieharder/rng_dev_urandom.c0000664000175000017500000000262313707046103015226 0ustar eddedd/* * dev_urandom */ #include /* * This is a wrapping of the /dev/random hardware rng */ static unsigned long int dev_urandom_get (void *vstate); static double dev_urandom_get_double (void *vstate); static void dev_urandom_set (void *vstate, unsigned long int s); typedef struct { FILE *fp; } dev_urandom_state_t; static unsigned long int dev_urandom_get (void *vstate) { dev_urandom_state_t *state = (dev_urandom_state_t *) vstate; unsigned long int j; if(state->fp != NULL) { fread(&j,sizeof(j),1,state->fp); return j; } else { fprintf(stderr,"Error: /dev/urandom not open. Exiting.\n"); exit(0); } } static double dev_urandom_get_double (void *vstate) { return dev_urandom_get (vstate) / (double) UINT_MAX; } static void dev_urandom_set (void *vstate, unsigned long int s) { dev_urandom_state_t *state = (dev_urandom_state_t *) vstate; if ((state->fp = fopen("/dev/urandom","r")) == NULL) { fprintf(stderr,"Error: Cannot open /dev/urandom, exiting.\n"); fprintf(stderr,"/dev/urandom may only be available on Linux systems.\n"); exit(0); } return; } static const gsl_rng_type dev_urandom_type = {"/dev/urandom", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (dev_urandom_state_t), &dev_urandom_set, &dev_urandom_get, &dev_urandom_get_double}; const gsl_rng_type *gsl_rng_dev_urandom = &dev_urandom_type; ./libdieharder/rng_dev_random.c0000664000175000017500000000260713707046103015043 0ustar eddedd/* * dev_random * * See copyright in copyright.h and the accompanying file COPYING * */ #include static unsigned long int dev_random_get (void *vstate); static double dev_random_get_double (void *vstate); static void dev_random_set (void *vstate, unsigned long int s); typedef struct { FILE *fp; } dev_random_state_t; static unsigned long int dev_random_get (void *vstate) { dev_random_state_t *state = (dev_random_state_t *) vstate; unsigned long int j; if(state->fp != NULL) { fread(&j,sizeof(j),1,state->fp); return j; } else { fprintf(stderr,"Error: /dev/random not open. Exiting.\n"); exit(0); } } static double dev_random_get_double (void *vstate) { return dev_random_get (vstate) / (double) UINT_MAX; } static void dev_random_set (void *vstate, unsigned long int s) { dev_random_state_t *state = (dev_random_state_t *) vstate; if ((state->fp = fopen("/dev/random","r")) == NULL) { fprintf(stderr,"Error: Cannot open /dev/random, exiting.\n"); fprintf(stderr,"/dev/random may only be available on Linux systems.\n"); exit(0); } return; } static const gsl_rng_type dev_random_type = {"/dev/random", /* name */ UINT_MAX, /* RAND_MAX */ 0, /* RAND_MIN */ sizeof (dev_random_state_t), &dev_random_set, &dev_random_get, &dev_random_get_double}; const gsl_rng_type *gsl_rng_dev_random = &dev_random_type; ./libdieharder/diehard_craps.c0000664000175000017500000001037513707046103014650 0ustar eddedd/* * $Id: diehard_craps.c 231 2006-08-22 16:18:05Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * */ /* *======================================================================== * This is the Diehard Craps test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * *: This is the CRAPS TEST. It plays 200,000 games of craps, finds:: *: the number of wins and the number of throws necessary to end :: *: each game. The number of wins should be (very close to) a :: *: normal with mean 200000p and variance 200000p(1-p), with :: *: p=244/495. Throws necessary to complete the game can vary :: *: from 1 to infinity, but counts for all>21 are lumped with 21. :: *: A chi-square test is made on the no.-of-throws cell counts. :: *: Each 32-bit integer from the test file provides the value for :: *: the throw of a die, by floating to [0,1), multiplying by 6 :: *: and taking 1 plus the integer part of the result. :: * *======================================================================== */ #include uint roll(){ uint d = 1 + gsl_rng_uniform_int(rng,6); return d; } int diehard_craps(Test **test, int irun) { uint i; uint point,throw,tries,wins; double sum,p; Xtest ptest; Vtest vtest; /* * This is just for output display. */ test[0]->ntuple = 0; test[1]->ntuple = 0; /* * ptest.x = number of wins * p = 244.0/495.0 is the probability of winning, so the mean * should be normally distributed with a binary distribution * sigma (standard stuff). * ptest.y = test[0]->tsamples*p * ptest.sigma = sqrt(test[0]->tsamples*p*(1 - p)) * * HOWEVER, it also counts the number of throws required to win * each game, binned according to 1,2,3... 21+ (the last bin is * holds all games that require more than 20 throws). The * vector of bin values is subjected to a chi-sq test. BOTH * tests must be passed, making this one a bit more complex to * report on, as it is really two tests in one. */ p = 244.0/495.0; ptest.y = (double) test[0]->tsamples*p; ptest.sigma = sqrt(ptest.y*(1.0 - p)); /* * Allocate memory for Vtest struct vector (length 21) and initialize * it with the expected values. */ Vtest_create(&vtest,21); vtest.cutoff = 5.0; sum = 1.0/3.0; vtest.y[0] = sum; for(i=1;i<20;i++){ vtest.y[i] = (27.0*pow(27.0/36.0,i-1) + 40*pow(13.0/18.0,i-1) + 55.0*pow(25.0/36.0,i-1))/648.0; sum += vtest.y[i]; } vtest.y[20] = 1.0 - sum; /* * Normalize the probabilities by the expected number of trials */ for(i=0;i<21;i++){ vtest.y[i] *= test[0]->tsamples; } /* * Initialize sundry things. This is short enough I'll use * a loop instead of memset. */ for(i=0;i<21;i++) vtest.x[i] = 0; wins = 0; /* * We now play test[0]->tsamples games of craps! */ for(i=0;itsamples;i++){ /* * This is the point count we have to make, the sum of two rolled * dice. */ point = roll() + roll(); tries = 0; if(point == 7 || point == 11) { /* * If we rolled 7 or 11, we just win. */ wins++; vtest.x[tries]++; } else if(point == 2 || point == 3 || point == 12){ /* * If we rolled 2, 3, or 12, we just lose. */ vtest.x[tries]++; } else { /* * We have to roll until we make the point (win) or roll * a seven (lose). We have to keep going until we win * or lose, but have to compress the number of throws * to bin 21 for all throw>21. */ while(1){ /* * This little ditty increments tries if it is less than 20 * then freezes it. */ (tries<20)?tries++:tries; throw = roll() + roll(); if(throw == 7){ vtest.x[tries]++; break; } else if(throw == point){ vtest.x[tries]++; wins++; break; } } } } ptest.x = wins++; Xtest_eval(&ptest); Vtest_eval(&vtest); test[0]->pvalues[irun] = ptest.pvalue; test[1]->pvalues[irun] = vtest.pvalue; MYDEBUG(D_DIEHARD_CRAPS) { printf("# diehard_runs(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); printf("# diehard_runs(): test[1]->pvalues[%u] = %10.5f\n",irun,test[1]->pvalues[irun]); } Vtest_destroy(&vtest); return(0); } ./libdieharder/Xtest.c0000664000175000017500000000256613707046103013172 0ustar eddedd/* *======================================================================== * $Id: Xtest.c 239 2006-10-03 18:56:47Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * This should be a nice, big case switch where we add EACH test * we might want to do and either just configure and do it or * prompt for input (if absolutely necessary) and then do it. *======================================================================== */ #include void Xtest_eval(Xtest *xtest) { /* * This routine evaluates the p-value from the xtest data. * x, y, sigma all must be filled in by the calling routine. */ /* xtest->pvalue = 0.5*gsl_sf_erfc((xtest->y - xtest->x)/(sqrt(2.0)*xtest->sigma)); xtest->pvalue = 1 - 0.5*gsl_sf_erfc((xtest->y - xtest->x)/(sqrt(2.0)*xtest->sigma)); xtest->pvalue = gsl_sf_erfc(fabs(xtest->y - xtest->x)/(sqrt(2.0)*xtest->sigma)); */ xtest->pvalue = gsl_cdf_gaussian_P(xtest->y - xtest->x,xtest->sigma); if(verbose == D_XTEST || verbose == D_ALL){ printf("# Xtest_eval(): x = %10.5f y = %10.5f sigma = %10.5f\n", xtest->x, xtest->y, xtest->sigma); printf("# Xtest_eval(): p-value = %10.5f\n",xtest->pvalue); } } ./libdieharder/dab_filltree2.c0000664000175000017500000002017214273744276014571 0ustar eddedd/* *========================================================= * DAB Fill Tree 2 Test * Bit version of Fill Tree test. * This test fills small binary trees of fixed depth with * "visited" markers. When a marker cannot be placed, the * current count of markers in the tree and the position * that the marker would have been inserted, if it hadn't * already been marked. * * For each bit in the RNG input, the test takes a step * right (for a zero) or left (for a one) in the tree. * If the node hasn't been marked, it is marked, and the * path restarts. Otherwise, the test continues with the * next bit. * * The test returns two p-values. The first is a Pearson * chi-sq test against the expected values (which were * estimated empirically. The second is a Pearson chi-sq * test for a uniform distribution of the positions at * which the insert failed. * * Because of the target data for the first p-value, * ntuple must be kept at the default (128). */ #include typedef unsigned char uchar; static double targetData1[32] __attribute__((unused)) = { // size=32, generated from 3e9 samples 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00, 9.76265666667e-04, 3.90648133333e-03, 9.42791500000e-03, 1.77898240000e-02, 2.88606903333e-02, 4.21206876667e-02, 5.67006123333e-02, 7.13000270000e-02, 8.43831060000e-02, 9.43500813333e-02, 9.97647353333e-02, 9.97074473333e-02, 9.39825660000e-02, 8.32745740000e-02, 6.90631193333e-02, 5.33001223333e-02, 3.80133193333e-02, 2.48386790000e-02, 1.47058170000e-02, 7.79203100000e-03, 3.63280466667e-03, 1.45833733333e-03, 4.88868000000e-04, 1.31773666667e-04, 2.63546666667e-05, 3.51800000000e-06, 2.42333333333e-07, 0.00000000000e+00 }; static double targetData2[64] __attribute__((unused)) = { // size=64, generated from 3e9 samples 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00, 3.03990000000e-05, 1.52768666667e-04, 4.47074666667e-04, 1.00459133333e-03, 1.91267566667e-03, 3.25090066667e-03, 5.08490633333e-03, 7.45162400000e-03, 1.03865720000e-02, 1.38770320000e-02, 1.78957393333e-02, 2.23788223333e-02, 2.72281453333e-02, 3.23125090000e-02, 3.74760433333e-02, 4.25407143333e-02, 4.72809176667e-02, 5.15021953333e-02, 5.49909926667e-02, 5.75592136667e-02, 5.90709556667e-02, 5.94040870000e-02, 5.85191160000e-02, 5.64374923333e-02, 5.32542393333e-02, 4.91296690000e-02, 4.42833420000e-02, 3.89462263333e-02, 3.33966756667e-02, 2.78853806667e-02, 2.26466276667e-02, 1.78641310000e-02, 1.36666050000e-02, 1.01212106667e-02, 7.24765200000e-03, 5.00267066667e-03, 3.32686800000e-03, 2.12376733333e-03, 1.29971400000e-03, 7.59987666667e-04, 4.23040000000e-04, 2.23585333333e-04, 1.11777000000e-04, 5.27836666667e-05, 2.33956666667e-05, 9.67033333333e-06, 3.63066666667e-06, 1.29500000000e-06, 4.04666666667e-07, 1.24666666667e-07, 2.80000000000e-08, 8.33333333333e-09, 1.33333333333e-09, 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00, 0.00000000000e+00 }; static double targetData[128] = { // size=128, generated from 6e9 samples 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00, 0.00000000000e+00,0.00000000000e+00,4.77166666667e-07,2.85516666667e-06, 9.85200000000e-06,2.55708333333e-05,5.54055000000e-05,1.06338000000e-04, 1.86151333333e-04,3.02864333333e-04,4.66803833333e-04,6.86296166667e-04, 9.71489833333e-04,1.33154316667e-03,1.77454416667e-03,2.31186450000e-03, 2.94724100000e-03,3.68750350000e-03,4.53733233333e-03,5.50155300000e-03, 6.58318550000e-03,7.77896366667e-03,9.08643266667e-03,1.05029766667e-02, 1.20238296667e-02,1.36316733333e-02,1.53215870000e-02,1.70715931667e-02, 1.88714935000e-02,2.06986750000e-02,2.25274171667e-02,2.43387205000e-02, 2.61018481667e-02,2.77880516667e-02,2.93792388333e-02,3.08369918333e-02, 3.21362530000e-02,3.32571148333e-02,3.41773491667e-02,3.48649186667e-02, 3.53142736667e-02,3.55033806667e-02,3.54345836667e-02,3.50962926667e-02, 3.44943555000e-02,3.36465076667e-02,3.25496588333e-02,3.12430565000e-02, 2.97450508333e-02,2.80761470000e-02,2.62786038333e-02,2.43732936667e-02, 2.24096238333e-02,2.04087746667e-02,1.84149658333e-02,1.64520138333e-02, 1.45553360000e-02,1.27460330000e-02,1.10448845000e-02,9.47002933333e-03, 8.03035333333e-03,6.73145016667e-03,5.58088483333e-03,4.56875066667e-03, 3.69710383333e-03,2.95267200000e-03,2.32891533333e-03,1.81311533333e-03, 1.39093383333e-03,1.05322383333e-03,7.86386833333e-04,5.78384666667e-04, 4.18726333333e-04,2.98206500000e-04,2.09200000000e-04,1.44533833333e-04, 9.79670000000e-05,6.52683333333e-05,4.27531666667e-05,2.73350000000e-05, 1.72115000000e-05,1.06390000000e-05,6.38166666667e-06,3.79950000000e-06, 2.21116666667e-06,1.25500000000e-06,6.95833333333e-07,3.83500000000e-07, 1.98000000000e-07,9.91666666667e-08,4.73333333333e-08,2.66666666667e-08, 1.13333333333e-08,5.50000000000e-09,2.66666666667e-09,1.00000000000e-09, 6.66666666667e-10,3.33333333333e-10,0.00000000000e+00,0.00000000000e+00, 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00, 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00, 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00, 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00, 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00, 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00, }; static inline int insertBit(uint x, uchar *array, uint *i, uint *d); int dab_filltree2(Test **test, int irun) { int size = (ntuple == 0) ? 128 : ntuple; uint target = sizeof(targetData)/sizeof(double); int startVal = (size / 2) - 1; uchar *array = (uchar *) malloc(sizeof(*array) * size); double *counts, *expected; int i, j; uint x; uint start = 0; uint end = 0; double *positionCounts; uint bitCount; test[0]->ntuple = 0; test[1]->ntuple = 1; counts = (double *) malloc(sizeof(double) * target); expected = (double *) malloc(sizeof(double) * target); memset(counts, 0, sizeof(double) * target); positionCounts = (double *) malloc(sizeof(double) * size/2); memset(positionCounts, 0, sizeof(double) * size/2); /* Calculate expected counts. */ for (i = 0; i < target; i++) { expected[i] = targetData[i] * test[0]->tsamples; if (expected[i] < 4) { if (end == 0) start = i; } else if (expected[i] > 4) end = i; } start++; x = gsl_rng_get(rng); bitCount = rmax_bits; for (j = 0; j < test[0]->tsamples; j++) { int ret; memset(array, 0, sizeof(*array) * size); i = 0; do { /* While new markers can be aded to this tree.... */ uint index = startVal; uint d = (startVal + 1) / 2; if (i > size * 2) { test[0]->pvalues[irun] = 0; return(0); } do { /* While this path has not yet found a blank node to mark.... */ ret = insertBit(x & 0x01, array, &index, &d); /* Keep going */ x >>= 1; if (--bitCount == 0) { x = gsl_rng_get(rng); bitCount = rmax_bits; } } while (ret == -2); /* End of path. */ i++; } while (ret == -1); /* Couldn't insert marker; end of this tree. */ positionCounts[ret/2]++; counts[i-1]++; } /* First p-value is calculated based on the targetData array. */ test[0]->pvalues[irun] = chisq_pearson(counts + start, expected + start, end - start); /* Second p-value is calculated against a uniform distribution. */ for (i = 0; i < size/2; i++) expected[i] = test[0]->tsamples/(size/2); test[1]->pvalues[irun] = chisq_pearson(positionCounts, expected, size/2); nullfree(positionCounts); nullfree(expected); nullfree(counts); nullfree(array); return(0); } /* * Insert a bit into the tree, represented by an array. * A value of one is marked; zero is unmarked. * The function returns -2 is still on the path. * The function returns -1 if the path ends by marking a node. * The function returns >= 0 if the path went too deep; the * returned value is the last position of the path. */ static inline int insertBit(uint x, uchar *array, uint *i, uint *d) { if (x != 0) { *i += *d; } else { *i -= *d; } *d /= 2; if (array[*i] == 0) { array[*i] = 1; return -1; } if (*d == 0) return *i; else return -2; } ./libdieharder/diehard_sums.c0000664000175000017500000002564613707046103014536 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is the Diehard sums test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * The OVERLAPPING SUMS test :: * Integers are floated to get a sequence U(1),U(2),... of uni- :: * form [0,1) variables. Then overlapping sums, :: * S(1)=U(1)+...+U(100), S(2)=U(2)+...+U(101),... are formed. :: * The S's are virtually normal with a certain covariance mat- :: * rix. A linear transformation of the S's converts them to a :: * sequence of independent standard normals, which are converted :: * to uniform variables for a KSTEST. The p-values from ten :: * KSTESTs are given still another KSTEST. :: * * Comments * * From the papers I've collected, the reason for the overlap is * simply to use all of the data when observing whether or not * the quantities are uniformly distributed. The use of a * covariance matrix doesn't test anything different, it just * uses fewer rands to achieve a given sensitivity. I would therefore * strongly suggest that users use the far more sensitive and reliable * rgb_lagged_sum test which tests more or less the same thing in an * unbroken and scalable way. * * At this point I think there is rock solid evidence that this test * is completely useless in every sense of the word. It is broken, * and it is so broken that there is no point in trying to fix it. * If I crank up tsamples to where one can actually see the asymptotic * distribution (which should be uniform) it is visibly non-uniform and * indeed the final kstest CONVERGES to a non-zero pvalue of 0.09702690 * for ALL rngs tested, which hardly seems useful. If one runs the test * on only 100 samples (as Marsaglia's code did in both the original * fortran or the newer C version) but then increases the number of * runs of the test from the default 100, it is easy to make it fail for * gold standard generators. The test just doesn't work. It cannot be * used to identify a generator that fails the null hypothesis. * * Don't use it. *======================================================================== */ #include int diehard_sums(Test **test, int irun) { int m,t; double mean,std; double *x,*y,*rand_list; double newrand; double a,b; /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * SUMS requires that we evaluate y[i] = \sum_i^{100+i} u[i]. Naturally, * the sum (or mean, if you prefer) is supposedly normally distributed * according to the central limit theorem. So each number has an * associated p-value -- the probability of that particular number * occurring from the random sum. The vector of p-values can be turned * into an overall p-value via a KS test. * * I have a set of really good papers on this. One is on nilpotent * Markov chain tests communicated by Janusz Kawczak. A whole * series of better ones have come from Stefan Wegankittl. In fact, * Stefan give more or less an exact prescription for writing this * sort of test in terms of the weak inverse of its covariance matrix. * * Unfortunately, Marsaglia's description is pretty opaque, at least * to a poor ignorant physicist like myself. I quote: * * The y's covariance matrix T is Toeplitz with diagonals 100,99,...2,1 * A Cholesky factorization of T: V'V = T provides M=V^(-1). The * covariance of x = yM is M'TM=I. The columns of M have at most * 3 non-zero elements. * * Ouch! Toeplitz used as an adjective! Cholesky factorization! * What means these strange terms? OK, here's what Wikipedia has * to say: A Toeplitz matrix is a "diagonal constant matrix". This * means that all elements on the parallel diagonals are the same, so * the prescription above actually tells one exactly what T is. * * Cholesky decomposition takes a symmetric positive definite matrix * and decomposes it into a lower triangular matrix and the transpose * of the lower triangular matrix, where the lower triangular matrix * is called the Cholesky triangle. It is primarily used to compute * the solution to Ax = b via A = LL^T (really LL^* but L is real), * solving Ly = b (which is easy, just "backsubstitution"), then * solving L^T x = y for x. * * Translated, this means (I think) that we form T = VV^T, invert * M = V^(-1), and then form x = My (where y is a set of overlapping * sums). This converts y back to an ordinarly multivariate normal * with a chisq distribution with 100-1 degrees of freedom (where the * latter I'm not quite certain of). But again Wegankittl will help * me rewrite the test from scratch, I think. * * Generators that fail when the number of test samples is only 100 PASS * when I crank up the number of samples to around 200 or 300, then fail * consistently with a distribution of p that is now biased LOW (where * before it was biased HIGH) for all the "best" rngs in the GSL. * Again, this suggests that there is a very subtle error somewhere but * is far from definitive. If you are a real stats person and a coder * and are reading this, PLEASE consider helping out by figuring this * out and contributing a fix -- otherwise I'll fix it (or at least * address it) when I have time to get to it. */ if(verbose == D_DIEHARD_SUMS || verbose == D_ALL){ printf("# diehard_sums: focus with -v %d.\n",D_DIEHARD_SUMS); } /* * John E. Davis noticed that I failed to initialize m. * This produces one set of annoying errors. However, * it is better to say that I failed to eliminate m * altogether in favor of tsamples. I'm going to go * BACKWARDS and restore m EVERYWHERE. I'm going to * just freeze the diehard version as close as I can * make it to the way it was in the fortran and * rewrite the whole test from Wegankittl for general * tsamples later (volunteers welcome). */ m = test[0]->tsamples; /* * Needed to transform raw sums into a N(0,1) distro. * * Note well that the "user" sample test in the dieharder * source proper >>is<< sums, only without overlap * and hellaciously more accurate and easier to understand. * A run of diehard_sums with tsamples = psamples = 100 * consumes 20,000 rands -- 200 used to make 100 overlapping * sums, transformed into iid multivariate normal N(0,1), * turned into p-values on [0,1), turned into a p-value, * 100 times for 100 cumulate p-values. No matter how * you slice it, no matter how hard you work to deal with * the overlapping sample covariance, you have 20,000 * rands in the whole computation. Compare to running * the "sample" sums test with tsamples = 100 and psamples * = 10,000, one also gets 100 sums of 100 each 100 times, * this time to just make 10,000 pvalues (which one might * as well do in this sums as well, frankly). However, * one samples 1,000,000 rands along the way! For most * systematic failures, the resolution in the latter case will * be AT LEAST \sqrt(50) times better, and there is * virtually no possibility of programmer error as the * code is trivial -- no Toeplitz or Cholesky need apply! */ mean = 0.5*m; std = sqrt(12.0); /* * Allocate x, y and rand_list. No need to zero x and rand_list, * y is an accumulator and we zero on general principles. */ x = (double *)malloc(m*sizeof(double)); rand_list = (double *)malloc(m*sizeof(double)); y = (double *)malloc(m*sizeof(double)); memset(y,0,m*sizeof(double)); /* * Fill a rand_list, summing into y[0] at the same time. */ if(verbose == D_DIEHARD_SUMS || verbose == D_ALL){ printf("#==================================================================\n"); printf("# Initializing initial y[0] and rand_list\n"); } for(t=0;tpvalues[irun] = kstest(x,m); MYDEBUG(D_DIEHARD_SUMS) { printf("# diehard_sums(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } free(x); free(y); free(rand_list); return(0); } ./libdieharder/diehard_parking_lot.c0000664000175000017500000001270213707046103016045 0ustar eddedd/* * $Id: diehard_parking_lot.c 231 2006-08-22 16:18:05Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * */ /* *======================================================================== * This is the Diehard Parking Lot test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * :: THIS IS A PARKING LOT TEST :: * :: In a square of side 100, randomly "park" a car---a circle of :: * :: radius 1. Then try to park a 2nd, a 3rd, and so on, each :: * :: time parking "by ear". That is, if an attempt to park a car :: * :: causes a crash with one already parked, try again at a new :: * :: random location. (To avoid path problems, consider parking :: * :: helicopters rather than cars.) Each attempt leads to either :: * :: a crash or a success, the latter followed by an increment to :: * :: the list of cars already parked. If we plot n: the number of :: * :: attempts, versus k:: the number successfully parked, we get a:: * :: curve that should be similar to those provided by a perfect :: * :: random number generator. Theory for the behavior of such a :: * :: random curve seems beyond reach, and as graphics displays are :: * :: not available for this battery of tests, a simple characteriz :: * :: ation of the random experiment is used: k, the number of cars :: * :: successfully parked after n=12,000 attempts. Simulation shows :: * :: that k should average 3523 with sigma 21.9 and is very close :: * :: to normally distributed. Thus (k-3523)/21.9 should be a st- :: * :: andard normal variable, which, converted to a uniform varia- :: * :: ble, provides input to a KSTEST based on a sample of 10. :: * * Comments * * First, the description above is incorrect in two regards. * As seen in the original code, the test measures * overlap of SQUARES of radius one, a thing I only observed after * actually programming circles as described (which are * also easy, although a bit more expensive to evaluate crashes * for). Circles produce an altogether different mean and are * probably a bit more sensitive to 2d striping at arbitrary angles. * * Note that I strongly suspect that this test is basically * equivalent to Knuth's better conceived hyperplane test, which * measures aggregation of N dimensional sets of "coordinates" in * hyperplanes. To put it another way, if something fails a * hyperplane test in 2d, it will certainly fail this test as well. * If something fails this test, I'd bet serious money that it * is because of aggregation of points on hyperplanes although * there MAY be other failure patterns as well. * * Finally, note that the probability that any given k is * obtained for a normal random distribution is just determined * from the erf() -- this is just an Xtest(). * * As always, we will increase the number of tsamples and hopefully improve * the resolution of the test. However, it should be carefully noted * that modern random number generators can almost certainly add many * decimal places to the simulation value used in this test. In other * words, test failure at higher resolution can be INVERTED -- it can * indicate the relative failure of the generators used to produce the * earlier result! This is really a subject for future research... *======================================================================== */ #include typedef struct { double x; double y; } Cars; int diehard_parking_lot(Test **test, int irun) { /* * This is the most that could under any circumstances be parked. */ Cars parked[12000]; uint k,n,i,crashed; double xtry,ytry; Xtest ptest; /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; test[0]->tsamples = 12000; /* * ptest.x = (double) k * ptest.y = 3523.0 * ptest.sigma = 21.9 * This will generate ptest->pvalue when Xtest(ptest) is called */ ptest.y = 3523.0; ptest.sigma = 21.9; /* * Clear the parking lot the fast way. */ memset(parked,0,12000*sizeof(Cars)); /* * Park a single car to have something to avoid and count it. */ parked[0].x = 100.0*gsl_rng_uniform(rng); parked[0].y = 100.0*gsl_rng_uniform(rng); k = 1; /* * This is now a really simple test. Park them cars! We try to park * 12000 times, and increment k (the number successfully parked) on * successes. We brute force the crash test. */ for(n=1;n<12000;n++){ xtry = 100.0*gsl_rng_uniform(rng); ytry = 100.0*gsl_rng_uniform(rng); crashed = 0; for(i=0;ipvalues[irun] = ptest.pvalue; MYDEBUG(D_DIEHARD_PARKING_LOT) { printf("# diehard_parking_lot(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } return(0); } ./libdieharder/chisq.c0000664000175000017500000002011313707046103013156 0ustar eddedd/* * $Id: chisq.c 229 2006-08-21 20:33:07Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * */ /* *======================================================================== * This code evaluates a vector of chisq's and p-values from a vector * of sampled results. I believe that it assumes a Poissonian * distribution in the vector, not a normal one. If so, we'll rename * this appropriately. *======================================================================== */ #include /* * This routine computes chisq on a vector of nvec values drawn * presumably from a known discrete distribution (Poisson). * lambda is the expected mean, and pvec is a vector * where a list of associated p-values is returned. * * Note that a Poisson distribution with mean lambda is: * * p(k) = (lambda^k/k!) exp(-lambda) * * and that it can be computed in a single pass by: * * p(k) = gsl_ran_poisson_pdf(uint k,double lambda); * * All we need to do, then, is compute p(k) and use it to * determine a vector of estimates for the interval frequency, * then compute Pearson's chisq in a straightforward way. * The only "tricky" part of all of this is going to be a) * scaling the data by the number of independent samples; and * b) converting into p-values, which requires a knowledge of * the number of degrees of freedom of the fit. */ double chisq_poisson(unsigned int *observed,double lambda,int kmax,unsigned int nsamp) { unsigned int k; double *expected; double delchisq,chisq,pvalue; /* * Allocate a vector for the expected value of the bin frequencies up * to kmax-1. */ expected = (double *)malloc(kmax*sizeof(double)); for(k = 0;k 10.0){ expected = nsamp*gsl_ran_binomial_pdf(n,prob,nmax); obstotal += observed[n]; exptotal += expected; delchisq = (observed[n] - expected)*(observed[n] - expected)/expected; chisq += delchisq; if(verbose){ printf("# %5u %3u %10.4f %10.4f %10.4f %10.4f\n", n,ndof,observed[n],expected,delchisq,chisq); } ndof++; } } if(verbose){ printf("Total: %10.4f %10.4f\n",obstotal,exptotal); printf("#==================================================================\n"); printf("Evaluated chisq = %f for %u degrees of freedom\n",chisq,ndof); } /* * Now evaluate the corresponding pvalue. The only real question * is what is the correct number of degrees of freedom. I'd argue we * did use a constraint when we set expected = binomial*nsamp, so we'll * go for ndof (count of bins tallied) - 1. */ ndof--; pvalue = gsl_sf_gamma_inc_Q((double)(ndof)/2.0,chisq/2.0); if(verbose){ printf("Evaluted pvalue = %6.4f in chisq_binomial.\n",pvalue); } return(pvalue); } /* * Contributed by David Bauer to do a Pearson chisq on a 2D * histogram. */ double chisq2d(unsigned int *obs, unsigned int rows, unsigned int columns, unsigned int N) { double chisq = 0.0; unsigned int i, j, k; unsigned int ndof = (rows - 1) * (columns - 1); for (i = 0; i < rows; i++) { for (j = 0; j < columns; j++) { unsigned int sum1 = 0, sum2 = 0; double expected, top; for (k = 0; k < columns; k++) sum1 += obs[i * columns + k]; for (k = 0; k < rows; k++) sum2 += obs[k * columns + j]; expected = (double) sum1 * sum2 / N; top = (double) obs[i * columns + j] - expected; chisq += (top * top) / expected; } } return( gsl_sf_gamma_inc_Q((double)(ndof)/2.0,chisq/2.0) ); } /* * Contributed by David Bauer, copied from chisq_poisson, with trivial * modifications to change it to use the geometric distribution. */ double chisq_geometric(unsigned int *observed,double prob,int kmax,unsigned int nsamp) { unsigned int k; double *expected; double delchisq,chisq,pvalue; /* * Allocate a vector for the expected value of the bin frequencies up * to kmax-1. */ expected = (double *)malloc(kmax*sizeof(double)); for(k = 0;k #define RotL(x,N) (rmax_mask & (((x) << (N)) | ((x) >> (rmax_bits-(N))))) void fDCT2(const unsigned int input[], double output[], size_t len); void iDCT2(const double input[], double output[], size_t len); void fDCT2_fft(const unsigned int input[], double output[], size_t len); double evalMostExtreme(double *pvalue, unsigned int num); /* * Discrete Cosine Transform (frequency or energy compaction) test. * So, it is easy to say that we want to do a DCT of the data as a test. But, * after we take a DCT, then what? * I tested a number of different methods for generating a p value from the * DCT. I was actually quite surprised at the method that worked the best... * First off, the output of the DCT should be random-looking, normally * distributed with a mean of zero and standard deviation of 1, after some * adjustments. (The first element requires different adjustments than the * rest.) The adjustments are trivial to calculate. * There are t-sample DCTs taken; each DCT is on ntuple values. * 1. Generate a p value for every DCT value (t-sample * nutple of them), * and run a single kstest on them all. * -- Worked second best; surprisngly slow for some parameters. * 2. Find the single worst DCT value, generate a p-value, and compensate. * -- Generally less powerful than #1. the only exception was generator #20. * 3. Sum each DCT vector, producing a result of length ntuple. * A. Generate a p value for each sum, run ks test on them. * -- Weaker than #2 even. * B. Find the single worst sum, generate a p-value, and compensate. * -- Also weaker than #2. * 4. Find the position of the most extreme value in each DCT. Run a chisq * on the vector of counts of how many times each position was the most * extreme. Requires t-samples to be > 5*ntuple. * -- The best! Amazingly, fails the ENTIRE random* family for the right * parameters!! (Also, seems to avoid some false positives I was * getting from #1.) * * On the current false positives: for the primary method the false * positives occur because the first and (ntuple/2)+1'th samples are the * largest too often (and about as often as each other). */ int dab_dct(Test **test,int irun) { double *dct; unsigned int *input; double *pvalues = NULL; unsigned int i, j; unsigned int len = (ntuple == 0) ? 256 : ntuple; int rotAmount = 0; unsigned int v = 1<<(rmax_bits-1); double mean = (double) len * (v - 0.5); /* positionCounts is only used by the primary test, and not by the * fallback test. */ double *positionCounts; /* The primary method is a chisq; we want expected counts of at least * five. If the number of tsamples is too low for that, use the * fallback method, which is doing kstest across the pvalues. */ int useFallbackMethod = (test[0]->tsamples > 5 * len) ? 0 : 1; /* ptest, v, and sd are only used in the fall-back method, when * tsamples is too small compared to ntuple. */ Xtest ptest; double sd = sqrt((1.0/6.0) * len) * v; dct = (double *) malloc(sizeof(double) * len); input = (unsigned int *) malloc(sizeof(unsigned int) * len); positionCounts = (double *) malloc(sizeof(double) * len); if (useFallbackMethod) { pvalues = (double *) malloc(sizeof(double) * len * test[0]->tsamples); } /* Zero out the counts initially. */ memset(positionCounts, 0, sizeof(double) * len); test[0]->ntuple = len; /* When used, the data is normalized first. */ ptest.y = 0.0; ptest.sigma = 1.0; /* Main loop runs tsamples times. During each iteration, a vector * of length ntuple will be read from the generator, so a total of * (tsamples * ntuple) words will be read from the RNG. */ for (j=0; jtsamples; j++) { unsigned int pos = 0; double max = 0; /* Change the rotation amount after each quarter of the samples * have been used. */ if (j != 0 && (j % (test[0]->tsamples / 4) == 0)) { rotAmount += rmax_bits/4; } /* Read (and rotate) the actual rng words. */ for (i=0; i max) { pos = i; max = fabs(dct[i]); } } /* And record it. */ positionCounts[pos]++; } else { /* Fallback method: convert all values to pvalues. */ for (i=0; itsamples / len; } p = chisq_pearson(positionCounts, expected, len); test[0]->pvalues[irun] = p; free(expected); } else { /* Fallback method: perform a ks test for uniformity of the * continuous p-values. */ test[0]->pvalues[irun] = kstest(pvalues, len * test[0]->tsamples); } nullfree(positionCounts); nullfree(pvalues); /* Conditional; only used in fallback */ nullfree(input); nullfree(dct); return(0); } void help_dab_dct() { printf("%s",dab_dct_dtest.description); } /* Not sure why, but prototype is not included from header. */ int gsl_fft_real_radix2_transform (double data[], size_t stride, size_t n); /* * Perform a type-II DCT using GSL's FFT function. * Assumes len is a power of 2 */ void fDCT2_fft(const unsigned int input[], double output[], size_t len) { double *fft_data; int i; /* * David, please check this -- do you mean to call fDCT2 and then return? * ISO C forbids a return with expression in a void function. */ if (len <= 4) { fDCT2(input, output, len); return; } /* Allocate the new vector and zero all of the elements. * The even elements will remain zero. */ fft_data = (double *) malloc(sizeof(double) * 4 * len); memset(fft_data, 0, sizeof(double) * 4 * len); for (i = 0; i < len; i++) fft_data[2*i + 1] = input[i]; for (i = 1; i < 2*len; i++) fft_data[4*len - i] = fft_data[i]; gsl_fft_real_radix2_transform(fft_data, 1, 4*len); for (i = 0; i < len; i++) output[i] = fft_data[i] / 2; free(fft_data); } /* * Old, now only used if working on a very short vector. * Simple (direct) implementation of the DCT, type II. * O(n^2) run time -- TODO replace with faster implementation. * Note: the GSL library has lots of FFTs, DWT, and DHT, but not DCT! * DCT can be efficiently implemented using FFT, though. */ void fDCT2(const unsigned int input[], double output[], size_t len) { unsigned int i, j; memset(output, 0, sizeof(double) * len); for (i = 0; i < len; i++) { for (j = 0; j < len; j++) { output[i] += (double) input[j] * cos((M_PI / len) * (0.5 + j) * i); } } } /* * Old, no longer used. * Note: scaling of output was done empiricaclly to make the output * actually match the input. * I'm a little concerned that the scaling is different than expected, * but the scaling factor isn't important to how I'm expecting to * use it, anyway. * (Actually, I made it expecting to only use the forward transform. * I implemented the inverse transform as a quick way to check for * bugs.) */ void iDCT2(const double input[], double output[], size_t len) { unsigned int i, j; for (i = 0; i < len; i++) { double sum = 0; for (j = 0; j < len; j++) { sum += input[j] * cos(((M_PI * j) / len) * (0.5 + i)); } output[i] = (sum - (input[0] / 2.0)) / (len / 2); } } /* * No longer used here; code should be saved and used elsewhere, though. * Given a set of p-values, this function returns a p-value indicating the * probability of the most extreme p-value occuring. */ double evalMostExtreme(double *pvalue, unsigned int num) { double ext = 1.0; int sign = 1; unsigned int i; unsigned int pos = 0; for (i = 0; i < num; i++) { double p = pvalue[i]; int cursign = -1; if (p > 0.5) { p = 1-p; cursign = 1; } if (p < ext) { ext = p; sign = cursign; pos = i; } } ext = pow(1.0-ext, num); if (sign == 1) ext = 1.0-ext; return ext; } int main_dab_dct() { unsigned int input[] = { 4, 5, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8 }; double output1[16], output2[16], output3[16]; int i; fDCT2(input, output1, 16); iDCT2(output1, output2, 16); fDCT2_fft(input, output3, 16); for (i = 0; i < 16; i++) { printf("%d: %d %f %f %f\n", i, input[i], output1[i], output3[i], output2[i]); } return 0; } ./libdieharder/kstest.c0000664000175000017500000003115213707046103013371 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ /* *======================================================================== * This is the Kolmogorov-Smirnov test for uniformity on the interval * [0,1). p-values from a (large) number of independent trials should * be uniformly distributed on the interval [0,1) if the underlying * result is consistent with the hypothesis that the rng in use is * not correlated. Deviation from uniformity is a sign of the failure * of the hypothesis that the generator is "good". Here we simply * input a vector of p-values and a count, and output an overall * p-value for the set of tests. *======================================================================== */ #include #define KCOUNTMAX 4999 double p_ks_new(int n,double d); double kstest(double *pvalue,int count) { int i; double y,d,d1,d2,dmax,csqrt; double p,x; /* First, handle degenerate cases. */ if (count < 1) return -1.0; if (count == 1) return *pvalue; /* * We start by sorting the list of pvalues. */ gsl_sort(pvalue,1,count); /* * Here's the test. For each (sorted) pvalue, its index is the * number of values cumulated to the left of it. d is the distance * between that number and the straight line representing a uniform * accumulation. We save the maximum d across all cumulated samples * and transform it into a p-value at the end. */ dmax = 0.0; if(verbose == D_KSTEST || verbose == D_ALL){ printf(" p y d d1 d2 dmax\n"); } for(i=1;i<=count;i++){ y = (double) i/(count+1.0); /* * d = fabs(pvalue[i] - y); * * Correction by David Bauer, pulled from R code for KS. * Apparently the above line is right/left biased and this * handles the position more symmetrically. This fix is * CRUCIAL for small sample sizes, and can be validated with: * dieharder -d 204 -t 100 -p 10000 -D default -D histogram * * Note: Without the fabs, pvalue could be LESS than y * and be ignored by fmax. Also, I don't really like the end * points -- y[0] shouldn't be zero, y[count] shouldn't be one. This * sort of thing seems as thought it might matter at very high * precision. Let's try running from 1 to count and dividing by count * plus 1. */ d1 = pvalue[i-1] - y; d2 = fabs(1.0/(count+1.0) - d1); d1 = fabs(d1); d = fmax(d1,d2); if(d1 > dmax) dmax = d1; if(verbose == D_KSTEST || verbose == D_ALL){ printf("%11.6f %11.6f %11.6f %11.6f %11.6f %11.6f\n",pvalue[i-1],y,d,d1,d2,dmax); } } /* * Here's where we have to make a few choices: * * ks_test = 0 * Use the new algorithm when count is less than KCOUNTMAX, but * for large values of the count use the old q_ks(), valid for * asymptotically large counts and MUCH faster. This will * will introduce a SMALL error in the distribution of pvalues * for all of the tests together, but it will be negligible for * any given single test. * * ks_test = 1 * Use the new (mostly exact) algorithm exactly as is. This is * QUITE SLOW although it is "sped up" at the expense of some * precision. By slow I mean 220 seconds at -k 1, 2.5 seconds at * (default) -k 0. * * ks_test = 2 * Use the exact (7 digit accurate) version of the new code, but * be prepared for "long" runtimes. Empirically I only got 230 * seconds -- not enough to worry about, really. * */ /* * We only need this test here (and can adjust KCOUNTMAX to play * with accuracy vs speed, although I've verified that 5000 isn't * terrible). The ks_test = 1 or 2 option are fallthrough, with * 1 being "normal", 2 omitting the speedup step below to get FULL * precision. */ if(ks_test == 0 && count > KCOUNTMAX){ csqrt = sqrt(count); x = (csqrt + 0.12 + 0.11/csqrt)*dmax; p = q_ks(x); if(verbose == D_KSTEST || verbose == D_ALL){ printf("# kstest: returning p = %f\n",p); } return(p); } /* * This uses the new "exact" kolmogorov distribution, which appears to * work! It's moderately expensive computationally, but I think it will * be in bounds for typical dieharder test ranges, and I also expect that * it can be sped up pretty substantially. */ if(verbose == D_KSTEST || verbose == D_ALL){ printf("# kstest: calling p_ks_new(count = %d,dmax = %f)\n",count,dmax); } p = p_ks_new(count,dmax); if(verbose == D_KSTEST || verbose == D_ALL){ printf("# kstest: returning p = %f\n",p); } return(p); } double q_ks(double x) { int i,sign; double qsum; double kappa; kappa = -2.0*x*x; sign = -1; qsum = 0.0; for(i=1;i<100;i++){ sign *= -1; qsum += (double)sign*exp(kappa*(double)i*(double)i); if(verbose == D_KSTEST || verbose == D_ALL){ printf("Q_ks %d: %f\n",i,2.0*qsum); } } if(verbose == D_KSTEST || verbose == D_ALL){ printf("Q_ks returning %f\n",2.0*qsum); } return(2.0*qsum); } /* *======================================================================== * The following routines are from the paper "Evaluating Kolmogorov's * Distribution" by Marsaglia, Tsang and Wang. They should permit kstest * to return precise pvalues for more or less arbitrary numbers of samples * ranging from n = 10 out to n approaching the asymptotic form where * Kolmogorov's original result is valid. It contains some cutoffs * intended to prevent excessive runtimes in the rare cases where p being * returned is close to 1 and n is large (at which point the asymptotic * form is generally adequate anyway). * * This is so far a first pass -- I'm guessing that we can improve the * linear algebra using the GSL or otherwise. The code is therefore * more or less straight from the paper. *======================================================================== */ void mMultiply(double *A,double *B,double *C,int m) { int i,j,k; double s; for(i=0; i 1.0e140 ) { for(j=0;j7 digit accuracy in the right tail use ks_test = 2 * but be prepared for occasional long runtimes. */ s=d*d*n; if(ks_test != 2 && ( s>7.24 || ( s>3.76 && n>99 ))) { if(n == 10400) printf("Returning the easy way\n"); return 2.0*exp(-(2.000071+.331/sqrt(n)+1.409/n)*s); } /* * If ks_test = 2, we always execute the following code and work to * convergence. */ k=(int)(n*d)+1; m=2*k-1; h=k-n*d; /* printf("p_ks_new: n = %d k = %d m = %d h = %f\n",n,k,m,h); */ H=(double*)malloc((m*m)*sizeof(double)); Q=(double*)malloc((m*m)*sizeof(double)); for(i=0;i0?pow(2*h-1,m):0); for(i=0;i0){ for(g=1;g<=i-j+1;g++){ H[i*m+j]/=g; } } } } eH=0; mPower(H,eH,Q,&eQ,m,n); /* printf("p_ks_new eQ = %d\n",eQ); */ s=Q[(k-1)*m+k-1]; /* printf("s = %16.8e\n",s); */ for(i=1;i<=n;i++){ s=s*i/n; /* printf("i = %d: s = %16.8e\n",i,s); */ if(s<1e-140){ /* printf("Oops, starting to have underflow problems: s = %16.8e\n",s); */ s*=1e140; eQ-=140; } } /* printf("I'll bet this is it: s = %16.8e eQ = %d\n",s,eQ); */ s*=pow(10.,eQ); s = 1.0 - s; free(H); free(Q); return s; } /* *======================================================================== * This is the Kuiper variant of KS. It is symmetric, that is, * it isn't biased as to where the region tested is started or stopped * on a ring of values. However, we simply cannot evaluate the * CDF below to the same precision that we can for the KS test above. * For that reason this code is basically obsolete. We'll leave it * in for now in case somebody figures out how to evaluate the * q_ks_kuiper() to high precision for arbitrary count but we really * don't need it anymore unless it turns out to be faster AND precise. *======================================================================== */ double kstest_kuiper(double *pvalue,int count) { int i; double y,v,vmax,vmin,csqrt; double p,x; /* * We start by sorting the list of pvalues. */ if(verbose == D_KSTEST || verbose == D_ALL){ printf("# kstest_kuiper(): Computing Kuiper KS pvalue for:\n"); for(i=0;i vmax) { vmax = v; } else if(v < vmin) { vmin = v; } if(verbose == D_KSTEST || verbose == D_ALL){ printf("%8.3f %8.3f %16.6e %16.6e %16.6e\n",pvalue[i],y,v,vmin,vmax); } } v = fabs(vmax) + fabs(vmin); csqrt = sqrt(count); x = (csqrt + 0.155 + 0.24/csqrt)*v; if(verbose == D_KSTEST || verbose == D_ALL){ printf("Kuiper's V = %8.3f, evaluating q_ks_kuiper(%6.2f)\n",v,x); } p = q_ks_kuiper(x,count); if(verbose == D_KSTEST || verbose == D_ALL){ if(p < 0.0001){ printf("# kstest_kuiper(): Test Fails! Visually inspect p-values:\n"); for(i=0;i int diehard_opso(Test **test, int irun) { uint j0=0,k0=0,j,k,t; Xtest ptest; /* * Fixed test size for speed and as per diehard. */ char w[1024][1024]; /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; /* * p = 141909, with sigma 290, FOR test[0]->tsamples 2^21+1 2 letter words. * These cannot be varied unless one figures out the actual * expected "missing works" count as a function of sample size. SO: * * ptest.x = number of "missing words" given 2^21+1 trials * Recalculation by David Bauer, from the original Monkey Tests paper: * ptest.y = 141909.600361375512162724864. * This shouldn't matter, I don't think, at least at any reasonable scale * dieharder can yet reach (but we'll see!). If we start getting * unreasonable failures we may have to try switching this number around, * but given sigma and y, we'd need a LOT of rands to result the 0.3 diff. * * ptest.y = 141909.3299550069; * ptest.sigma = 290.4622634038; * */ ptest.y = 141909.3299550069; ptest.sigma = 290.4622634038; /* * We now make test[0]->tsamples measurements, as usual, to generate the * missing statistic. The easiest way to proceed, I think, will * be to generate a simple char matrix 1024x1024 in size and empty. * Each pair of "letters" generated become indices, and a (char) 1 * is inserted there. At the end we just loop the matrix and count * the zeros. * * Of course doing it THIS way it is pretty obvious that we could, * say, display the 2-color 1024x1024 bitmap this represented graphically. * Missing words are just pixels that are still in the background color. * Hmmm, sounds a whole lot like Knuth's test looking for hyperplanes * in 2 dimensions, hmmm. At the very least, any generator that produces * hyperplanar banding at 2 dimensions should fail this test, but it is * possible for it to find distributions that do NOT have banding but * STILL fail the test, I suppose. Projectively speaking, though, * I have some fairly serious doubts about this, though. */ memset(w,0,sizeof(char)*1024*1024); k = 0; for(t=0;ttsamples;t++){ /* * Let's do this the cheap/easy way first, sliding a 20 bit * window along each int for the 32 possible starting * positions a la birthdays, before trying to slide it all * the way down the whole random bitstring implicit in a * long sequence of random ints. That way we can exit * the test[0]->tsamples loop at test[0]->tsamples = 2^15... */ if(t%2 == 0) { j0 = gsl_rng_get(rng); k0 = gsl_rng_get(rng); j = j0 & 0x03ff; k = k0 & 0x03ff; } else { j = (j0 >> 10) & 0x03ff; k = (k0 >> 10) & 0x03ff; } /* * Get two "letters" (indices into w) */ /* printf("%u: %u %u %u\n",t,j,k,boffset); */ w[j][k] = 1; } /* * Now we count the holes, so to speak */ ptest.x = 0; for(j=0;j<1024;j++){ for(k=0;k<1024;k++){ if(w[j][k] == 0){ ptest.x += 1.0; /* printf("ptest.x = %f Hole: w[%u][%u] = %u\n",ptest.x,j,k,w[j][k]); */ } } } MYDEBUG(D_DIEHARD_OPSO) { printf("%f %f %f\n",ptest.y,ptest.x,ptest.x-ptest.y); } Xtest_eval(&ptest); test[0]->pvalues[irun] = ptest.pvalue; MYDEBUG(D_DIEHARD_OPSO) { printf("# diehard_opso(): ks_pvalue[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } return(0); } ./libdieharder/diehard_2dsphere.c0000664000175000017500000001377513707046103015263 0ustar eddedd/* * ======================================================================== * $Id: diehard_2dsphere.c 231 2006-08-22 16:18:05Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This is the Diehard minimum distance (2d sphere) test, rewritten from * the description in tests.txt on George Marsaglia's diehard site. * * THE MINIMUM DISTANCE TEST :: * It does this 100 times:: choose n=8000 random points in a :: * square of side 10000. Find d, the minimum distance between :: * the (n^2-n)/2 pairs of points. If the points are truly inde- :: * pendent uniform, then d^2, the square of the minimum distance :: * should be (very close to) exponentially distributed with mean :: * .995 . Thus 1-exp(-d^2/.995) should be uniform on [0,1) and :: * a KSTEST on the resulting 100 values serves as a test of uni- :: * formity for random points in the square. Test numbers=0 mod 5 :: * are printed but the KSTEST is based on the full set of 100 :: * random choices of 8000 points in the 10000x10000 square. :: * * Comment * Obviously the same test as 3d Spheres but in 2d, hence the * name. This test has a BUG in it -- the expression it uses to * evaluate p is not accurate enough to withstand the demands of * dieharder. M. Fischler pointed this out and derived the * required corrections (giving explicit forms useful out to d=5) * and they are incorporated in rgb_minimum_distance(). This test * is hence OBSOLETE and is left in so people can play with it and * convince themselves that this is so. * * I did make one set of changes to this test to make it considerably more * efficient at extracting the minimum distance. * ======================================================================== */ #include #define POINTS_2D 8000 #define DIM_2D 2 typedef struct { double x[DIM_2D]; } C3_2D; int compare_points(const dTuple *a,const dTuple *b); double distance(const dTuple a,const dTuple b,uint dim); int diehard_2dsphere(Test **test, int irun) { int i,j,d,t; /* * These are the vector of points and the current point being * considered. We may or may not need to restructure the vectors * to be able to do the sort. I'm going to TRY to implement * Fischler's suggested algorithm here that is NlogN instead of doing * the straightforward N^2 algorithm, but we'll see. */ dTuple *points; double dist,mindist; /* * for display only. */ test[0]->ntuple = ntuple; /* * Generate d-tuples of tsamples random coordinates in the range 0-10000 * (which we may have to scale with dimension). Determine the shortest * separation of any pair of points. From this generate p from the * Marsaglia form, and apply the usual KS test over psamples of * independent tests, per dimension. */ test[0]->ntuple = 2; /* 2 dimensional test, of course */ points = (dTuple *)malloc(test[0]->tsamples*sizeof(dTuple)); if(verbose == D_DIEHARD_2DSPHERE || verbose == D_ALL){ printf("Generating a list of %u points in %d dimensions\n",test[0]->tsamples,test[0]->ntuple); } for(t=0;ttsamples;t++){ /* * Generate a new d-dimensional point in the unit d-cube (with * periodic boundary conditions). */ if(verbose == D_DIEHARD_2DSPHERE || verbose == D_ALL){ printf("points[%u]: (",t); } for(d=0;d<2;d++) { points[t].c[d] = gsl_rng_uniform_pos(rng)*10000; if(verbose == D_DIEHARD_2DSPHERE || verbose == D_ALL){ printf("%6.4f",points[t].c[d]); if(d == 1){ printf(")\n"); } else { printf(","); } } } } /* * Now we sort the points using gsl_heapsort and a comparator * on the first coordinate only. Don't know how to get rid * of the gcc prototype warning. Probably need a cast of some * sort. */ gsl_heapsort(points,test[0]->tsamples,sizeof(dTuple), (gsl_comparison_fn_t) compare_points); if(verbose == D_DIEHARD_2DSPHERE || verbose == D_ALL){ printf("List of points sorted by first coordinate:\n"); for(t=0;ttsamples;t++){ printf("points[%u]: (",t); for(d=0;d<2;d++) { printf("%6.4f",points[t].c[d]); if(d == 1){ printf(")\n"); } else { printf(","); } } } } /* * Now we do the SINGLE PASS through to determine mindist */ mindist = 10000.0; for(i=0;itsamples;i++){ /* * One thing to experiment with here (very much) is * whether or not we need periodic wraparound. For * the moment we omit it, although distributing * the points on a euclidean d-torus seems more symmetric * than not and checks to be sure that points are correct * on or very near a boundary. */ for(j=i+1;jtsamples;j++){ if(points[j].c[0] - points[i].c[0] > mindist) break; dist = distance(points[j],points[i],2); MYDEBUG(D_DIEHARD_2DSPHERE) { printf("d(%d,%d) = %16.10e\n",i,j,dist); } if( dist < mindist) mindist = dist; } } MYDEBUG(D_DIEHARD_2DSPHERE) { printf("Found minimum distance = %16.10e\n",mindist); } /* * This form should be "bad", but I'm finding the badness * difficult to demonstrate for presumed good rngs. One * does wonder how large an effect Fischler's corrections * are for n = 8000. I'm guessing that they should be * more important for smaller n, but that will be difficult * to try without converting this further into a scale-free * form (that is, just like rgb_minimum_distance() but without * the qarg correction piece. Hmmm, I could do that by hacking * its value to 1.0 in rgb_minimum_distance now, couldn't I? */ test[0]->pvalues[irun] = 1.0 - exp(-mindist*mindist/0.995); free(points); MYDEBUG(D_DIEHARD_2DSPHERE) { printf("# diehard_2dsphere(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } return(0); } ./libdieharder/diehard_operm5.c0000664000175000017500000001577613707046103014761 0ustar eddedd/* * ======================================================================== * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* *======================================================================== * This is the Diehard OPERM5 test, rewritten from the description * in tests.txt on George Marsaglia's diehard site. * * THE OVERLAPPING 5-PERMUTATION TEST :: * This is the OPERM5 test. It looks at a sequence of one mill- :: * ion 32-bit random integers. Each set of five consecutive :: * integers can be in one of 120 states, for the 5! possible or- :: * derings of five numbers. Thus the 5th, 6th, 7th,...numbers :: * each provide a state. As many thousands of state transitions :: * are observed, cumulative counts are made of the number of :: * occurences of each state. Then the quadratic form in the :: * weak inverse of the 120x120 covariance matrix yields a test :: * equivalent to the likelihood ratio test that the 120 cell :: * counts came from the specified (asymptotically) normal dis- :: * tribution with the specified 120x120 covariance matrix (with :: * rank 99). This version uses 1,000,000 integers, twice. :: * * Note -- the original diehard test almost certainly had errors, * as did the documentation. For example, the actual rank is * 5!-4!=96, not 99. The original dieharder version validated * against the c port of dieharder to give the same answers from * the same data, but failed gold-standard generators such as AES * or the XOR supergenerator with AES and several other top rank * generators. Frustration with trying to fix the test with very * little useful documentation caused me to eventually write * the rgb permutations test, which uses non-overlapping samples * (and hence avoids the covariance problem altogether) and can * be used for permutations of other than 5 integers. I was able * to compute the covariance matrix for the problem, but was unable * break it down into the combination of R, S and map that Marsaglia * used, and I wanted to (if possible) use the GSL permutations * routines to count/index the permutations, which yield a different * permutation index from Marsaglia's (adding to the problem). * * Fortunately, Stephen Moenkehues (moenkehues@googlemail.com) was * bored and listless and annoyed all at the same time while using * dieharder to test his SWIFFTX rng, a SHA3-candidate and fixed * diehard_operm5. His fix avoids the R, S and map -- he too went * the route of directly computing the correlation matrix but he * figured out how to transform the correlation matrix plus the * counts from a run directly into the desired statistic (a thing * that frustrated me in my own previous attempts) and now it works! * He even made it work (correctly) in overlapping and non-overlapping * versions, so one can invoke dieharder with the -L 1 option and run * what should be the moral equivalent of the rgb permutation test at * -n 5! * * So >>thank you<< Stephen! Thank you Open Source development * process! Thank you Ifni, Goddess of Luck and Numbers! And anybody * who wants to tackle the remaining diehard "problem" tests, (sums in * particular) should feel free to play through... *======================================================================== */ #include static int tflag=0; static double tcount[120]; /* * kperm computes the permutation number of a vector of five integers * passed to it. */ int kperm(uint v[],uint voffset) { int i,j,k,max; int w[5]; int pindex,uret,tmp; /* * work on a copy of v, not v itself in case we are using * overlapping 5-patterns. */ for(i=0;i<5;i++){ j = (i+voffset)%5; w[i] = v[j]; } if(verbose == -1){ printf("==================================================================\n"); printf("%10u %10u %10u %10u %10u\n",w[0],w[1],w[2],w[3],w[4]); printf(" Permutations = \n"); } pindex = 0; for(i=4;i>0;i--){ max = w[0]; k = 0; for(j=1;j<=i;j++){ if(max <= w[j]){ max = w[j]; k = j; } } pindex = (i+1)*pindex + k; tmp = w[i]; w[i] = w[k]; w[k] = tmp; if(verbose == -1){ printf("%10u %10u %10u %10u %10u\n",w[0],w[1],w[2],w[3],w[4]); } } uret = pindex; if(verbose == -1){ printf(" => %u\n",pindex); } return uret; } int diehard_operm5(Test **test, int irun) { int i,j,kp,t,vind; uint v[5]; double count[120]; double av,norm,x[120],chisq,ndof; /* * Zero count vector, was t(120) in diehard.f90. */ for(i=0;i<120;i++) { count[i] = 0.0; if(tflag == 0){ tcount[i] = 0.0; tflag = 1; } } if(overlap){ for(i=0;i<5;i++){ v[i] = gsl_rng_get(rng); } vind = 0; } else { for(i=0;i<5;i++){ v[i] = gsl_rng_get(rng); } } for(t=0;ttsamples;t++){ /* * OK, now we are ready to generate a list of permutation indices. * Basically, we take a vector of 5 integers and transform it into a * number with the kperm function. We will use the overlap flag to * determine whether or not to refill the entire v vector or just * rotate bytes. */ if(overlap){ kp = kperm(v,vind); count[kp] += 1; v[vind] = gsl_rng_get(rng); vind = (vind+1)%5; } else { for(i=0;i<5;i++){ v[i] = gsl_rng_get(rng); } kp = kperm(v,0); count[kp] += 1; } } for(i=0;i<120;i++){ tcount[i] += count[i]; /* printf("%u: %f\n",i,tcount[i]); */ } chisq = 0.0; av = test[0]->tsamples/120.0; norm = test[0]->tsamples; // this belongs to the pseudoinverse /* * The pseudoinverse P of the covariancematrix C is computed for n = 1. * If n = 100 the new covariancematrix is C_100 = 100*C. Therefore the * new pseudoinverse is P_100 = (1/100)*P. You can see this from the * equation C*P*C = C */ if(overlap==0){ norm = av; } for(i=0;i<120;i++){ x[i] = count[i] - av; } if(overlap){ for(i=0;i<120;i++){ for(j=0;j<120;j++){ chisq = chisq + x[i]*pseudoInv[i][j]*x[j]; } } } if(overlap==0){ for(i=0;i<120;i++){ chisq = chisq + x[i]*x[i]; } } if(verbose == -2){ printf("norm = %10.2f, av = %10.2f",norm,av); for(i=0;i<120;i++){ printf("count[%u] = %4.0f; x[%u] = %3.2f ",i,count[i],i,x[i]); if((i%2)==0){printf("\n");} } if((chisq/norm) >= 0){ printf("\n\nchisq/norm: %10.5f :-) and chisq: %10.5f\n",(chisq/norm), chisq); } } if((chisq/norm) < 0){ printf("\n\nCHISQ NEG.! chisq/norm: %10.5f and chisq: %10.5f",(chisq/norm), chisq); } chisq = fabs(chisq / norm); ndof = 96; /* the rank of the covariancematrix and the pseudoinverse */ if(overlap == 0){ ndof = 120-1; } MYDEBUG(D_DIEHARD_OPERM5){ printf("# diehard_operm5(): chisq[%u] = %10.5f\n",kspi,chisq); } test[0]->pvalues[irun] = gsl_sf_gamma_inc_Q((double)(ndof)/2.0,chisq/2.0); MYDEBUG(D_DIEHARD_OPERM5){ printf("# diehard_operm5(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } kspi++; return(0); } ./libdieharder/diehard_rank_32x32.c0000664000175000017500000000663213707046103015335 0ustar eddedd/* * ======================================================================== * See copyright in copyright.h and the accompanying file COPYING * ======================================================================== */ /* * ======================================================================== * This is the Diehard BINARY RANK 31x31 test, rewritten from the * description in tests.txt on George Marsaglia's diehard site. * * This is the BINARY RANK TEST for 31x31 matrices. The leftmost :: * 31 bits of 31 random integers from the test sequence are used :: * to form a 31x31 binary matrix over the field {0,1}. The rank :: * is determined. That rank can be from 0 to 31, but ranks< 28 :: * are rare, and their counts are pooled with those for rank 28. :: * Ranks are found for 40,000 such random matrices and a chisqua-:: * re test is performed on counts for ranks 31,30,29 and <=28. :: * * Comments * ======================================================================== */ #include /* * Include inline uint generator */ #include "static_get_bits.c" int diehard_rank_32x32(Test **test, int irun) { int i,t,rank; uint bitstring; /* uint mtx[32][1]; */ uint **mtx; Vtest vtest; /* * for display only. 0 means "ignored". */ test[0]->ntuple = 0; mtx=(uint **)malloc(32*sizeof(uint*)); for(i=0;i<32;i++){ mtx[i] = (uint*)malloc(sizeof(uint)); } MYDEBUG(D_DIEHARD_RANK_32x32){ fprintf(stdout,"# diehard_rank_32x32(): Starting test\n"); } Vtest_create(&vtest,33); vtest.cutoff = 5.0; for(i=0;i<29;i++){ vtest.x[0] = 0.0; vtest.y[0] = 0.0; } /* * David Bauer contributes -- * From "On the Rank of Random Matrices": * 0.2887880951, 0.5775761902, 0.1283502645, * 0.0052387863, 0.0000465670, 0.0000000969 * * rgb continues -- * An interesting question is -- should we not bother to pool * and include all six of these terms? That would in principle * permit the number of tsamples to be cranked up without distorting * the final p distribution from the chisq... */ vtest.x[29] = 0.0; vtest.y[29] = test[0]->tsamples*0.0052854502e+00; vtest.x[30] = 0.0; vtest.y[30] = test[0]->tsamples*0.1283502644e+00; vtest.x[31] = 0.0; vtest.y[31] = test[0]->tsamples*0.5775761902e+00; vtest.x[32] = 0.0; vtest.y[32] = test[0]->tsamples*0.2887880952e+00; for(t=0;ttsamples;t++) { MYDEBUG(D_DIEHARD_RANK_32x32){ fprintf(stdout,"# diehard_rank_32x32(): Input random matrix = \n"); } for(i=0;i<32;i++){ MYDEBUG(D_DIEHARD_RANK_32x32){ fprintf(stdout,"# "); } bitstring = get_rand_bits_uint(32,0xffffffff,rng); mtx[i][0] = bitstring; MYDEBUG(D_DIEHARD_RANK_32x32){ dumpbits(mtx[i],32); fprintf(stdout,"\n"); } } /* * This is a silly thing to quiet gcc complaints about twin puns. */ rank = binary_rank(mtx,32,32); MYDEBUG(D_DIEHARD_RANK_32x32){ fprintf(stdout,"# binary rank = %d\n",rank); } if(rank <= 29){ vtest.x[29]++; } else { vtest.x[rank]++; } } /* for(i=0;i<33;i++) printf("vtest.x[%d] = %f\n",i,vtest.x[i]); */ Vtest_eval(&vtest); test[0]->pvalues[irun] = vtest.pvalue; MYDEBUG(D_DIEHARD_RANK_32x32) { printf("# diehard_rank_32x32(): test[0]->pvalues[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } Vtest_destroy(&vtest); for(i=0;i<32;i++){ free(mtx[i]); } free(mtx); return(0); } ./libdieharder/rgb_bitdist.cruft0000664000175000017500000002540413707046103015254 0ustar eddedd/* * $Id: rgb_bitdist.c 248 2006-10-09 17:59:54Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * */ /* *======================================================================== * This is a test that checks to see if the rng generates bit patterns * (n-tuples) that are distributed correctly (binomially). For example, * for 2-tuples (bit pairs) there are four possibilities: 00, 01, 10, 11. * Each should occur with a probability of 1/4, hence the count of (say) K * 00 bitpairs out of N trials should be distributed (over M samples) * according to the binomial probability p = binomial(N,K,0.25) -- that * is, the expected count for k 00's is M*p(N,K,0.25). * * This test should be more sensitive than just doing a large number of * trials and aggregating all the 00's over all the samples and comparing * the result to the expected mean, as there can be distributions that * have the expected mean of 0.25 that are >>not<< binomially distributed. * * By making a single program capable of doing any n-tuple, we gain * immediate benefit. Both STS and Diehard, for example, contain * tests that validate bit distribution frequencies; however, they typically * do so for specific n-tuples, e.g. 5 in several diehard tests. There * is nothing terribly special about 5, and no point in looking too * hard at e.g. intervals between patterns at 5, since testing pure * frequency at 6 bits simultaneously ensures that all 6 bit patterns have * the correct frequency (since they are sub-patterns of 6 bit patterns * that have the correct frequency, and if they had the INcorrect frequency * the six-bit patterns would as well by inheritance) and (less obviously, * but I'm pretty sure I can prove it) that intervals between the five * bit patterns must also be correct IF the test is satisfied robustly * for various arbitrary test string lengths and sampling counts. * * Anyway, I'm giving this one a shot as it may end up being a one-size * fits all tool for validating bitlevel randomness for any generator, * up to some n-tuple. I expect that 2004/2005 computers will easily * be able to validate through n=8 without really warming up or taking * terribly long (validating the frequency and distribution for e.g. * the entire ascii alphabet at the byte level) and MAY be able to do * actual frequency validation on 16-bit integers. Note that it only takes * a few seconds to generate millions of 32 bit integers with most of * the GSL routines. To get statistically valid results, one needs to * accumulate order of 100 trials per outcome, or test order of millions * of integers and accumulate the results in an outcome vector 64K long. * both of these are well within reach using at most hours of CPU time, * and partitioned on a beowulf might take only minutes or even seconds. * * The latest version of the actual test (below) tests only ONE ntuple, * the value set in the global variable rgb_bitdist_ntuple which must * be a positive integer. The calling program is responsible for e.g. * testing a range of ntuples. *======================================================================== */ #include void rgb_bitdist(Test **test,int irun) { uint bsize; /* number of bits in the sample buffer */ uint nb; /* number of bits in a tested ntuple */ uint value_max; /* 2^{nb}, basically (max size of nb bit word + 1) */ uint bsamples; /* The number of non-overlapping samples in buffer */ uint boffset; /* The offset of the current/next sample */ uint value; /* value of sampled ntuple (as a uint) */ uint randbuf[4]; /* A 128 bit space for rng samples */ /* Look for cruft below */ uint b,t,i; /* loop indices? */ uint ri; uint *count,ctotal; /* count of any ntuple per bitstring */ uint size; double pvalue,ntuple_prob,pbin; /* probabilities */ Vtest *vtest; /* A reusable vector of binomial test bins */ /* * This is the size of the allocated sample buffer, in bits. */ bsize = sizeof(randbuf)*CHAR_BIT; /* * Sample a bitstring of rgb_bitstring_ntuple in length (exactly). */ if(rgb_bitdist_ntuple>0){ nb = rgb_bitdist_ntuple; if(verbose == D_RGB_BITDIST || verbose == D_ALL){ printf("# rgb_bitdist: Buffer size is %d\n",bsize); printf("# rgb_bitdist: Testing ntuple = %u\n",nb); } } else { printf("Error: rgb_bitdist_ntuple must be a positive integer. Exiting.\n"); exit(0); } /* * The number of nb-bit numbers we can pull from a single sample * of bit length bsize, without overlap. */ bsamples = bsize/nb; /* * The largest integer for this ntuple is 2^nb-1 (they range from 0 to * 2^nb - 1). However, this is used to size count and limit loops, so * we use 2^nb and start indices from 0 as usual. */ value_max = (uint) pow(2,nb); if(verbose == D_RGB_BITDIST || verbose == D_ALL){ printf("# rgb_bitdist(): value_max = %u\n",value_max); } /* * Allocate memory for value_max vector of Vtest structs and counts, * PER TEST. Note that we must free both of these when we are done * or leak. */ vtest = (Vtest *)malloc(value_max*sizeof(Vtest)); count = (uint *)malloc(value_max*sizeof(uint)); /* * This is the probability of getting any given ntuple. For example, * for bit triples, value_max = 2^3 = 8 and each value should occur * with probability 1/8. */ ntuple_prob = 1.0/(double)value_max; if(verbose == D_RGB_BITDIST || verbose == D_ALL){ printf("# rgb_bitdist(): ntuple_prob = %f\n",ntuple_prob); printf("# rgb_bitdist(): Testing %u samples of %u bit strings\n",test[0]->tsamples,bits); printf("# rgb_bitdist():=====================================================\n"); printf("# rgb_bitdist(): vtest table\n"); printf("# rgb_bitdist(): Outcome bit x y sigma\n"); } for(i=0;itsamples*pbin; } else { vtest[i].x[b] = 0.0; vtest[i].y[b] = vtest[0].y[b]; } if(verbose == D_RGB_BITDIST || verbose == D_ALL){ printf("# rgb_bitdist(): %3u %3u %10.5f %10.5f\n", i,b,vtest[i].x[b],vtest[i].y[b]); } } if(verbose == D_RGB_BITDIST || verbose == D_ALL){ printf("# rgb_bitdist():=====================================================\n"); } } /* * Now (per ntuple) we check tsamples bitstrings of bits in length, * counting the 1's. At the end we increment the result histogram * with the bitcount as an index as a trial that generated that * bitcount. */ for(t=0;ttsamples;t++){ /* * This safely fills the buffer even if the generator returns * less than 32 bits. Note that fill_uint_buffer requires the * LENGTH of the uint vector in uints, not in bytes... fill_uint_buffer(randbuf,sizeof(randbuf)/sizeof(uint)); * * CRUFT. */ if(verbose == D_RGB_BITDIST || verbose == D_ALL){ printf("# rgb_bitdist(): randbuf = %10u = ",randbuf[0]); dumpbits(&randbuf[0],CHAR_BIT*sizeof(uint)); } /* * Clear the count vector for this sample. */ memset(count,0,value_max*sizeof(uint)); /* * Rotate starting offset with t, e.g. 0,1,2,0,1,2 for nb=3 */ boffset = t%nb; for(b=0;btsamples,bits); printf("# rgb_bitdist():=====================================================\n"); printf("# rgb_bitdist(): vtest table\n"); printf("# rgb_bitdist(): Outcome bit x y sigma\n"); } ri = gsl_rng_uniform_int(rng,value_max); for(i=0;ipvalues[irun] = vtest[i].pvalue; MYDEBUG(D_RGB_BITDIST) { printf("# rgb_bitdist(): test[%u]->pvalues[%u] = %10.5f\n", 0,irun,test[0]->pvalues[irun]); } } Vtest_destroy(&vtest[i]); } } ./NOTES0000664000175000017500000016437213707046103010120 0ustar eddeddThese are some simple design notes to document this program and to guide further work. This program is designed to do the following: a) Encapsulate every RNG known to humans for testing. We will use the GSL both for its rich supply of ready-to-test RNG's and for its relatively simple and consistent encapsulation of any new RNG's we add -- /dev/random is already encapsulated and can serve as a template for future work. [1/16/03 rgb] b) test speed of the available RNG's. Both: i) In "native/standard" subroutine calls (with the subroutine call overhead included). [This is done, 1/16/03, rgb] ii) In a custom "vector" form, where a whole block of dedicated memory is filled in one pass from a given algorithm, and subsequently accessed via a macro that only calls for a refill when the vector is exhausted. c) test quality of the available RNG's. There are at least three primary sources of tests that will be used in this tool. i) RGB tests. These are the tests I myself have implemented. To the best of my knowledge these are new, although of course my knowledge is far from complete. ii) DIEHARD, by Dr. George Marsaglia of FSU. This is a well-known and venerable "battery of tests" of RNG's. iii) NIST STS/FIPS (NIST special publication 800-22, revised 5/15/2001). This is also a suite of RNG tests, with some overlap with DIEHARD. I will probably implement only selected tests from this suite at least at first, as some of them appear to be relatively weak compared to e.g. rgb_binomial and to test basically the same thing. iv) Additional tests that are to be found on the web and in the literature, where they appear to test things not well-represented in tests already implemented in one suite or another. d) test quality of any input set of "random" data according to i-iv in c). This will let us test arbitrary RNG's via their data, including and especially hardware generators. Note that hardware generators available as "devices" will be interfaced via a). This step will only be implemented when enough tests to make it worthwhile are already implemented. Addendum and explanation of copyright issues. The STS was written by a variety of authors: Andrew Rukhin, Juan Soto, James Nechvatal, Miles Smid, Elaine Barker, Stefan Leigh, Mark Levenson, Mark Vangel, David Banks, Alan Heckert, James Dray, San Vo. None of the actual code in the STS suite has been used in this tool -- all testing routines have been written using only the STS published document as an excellent reference. GSL routines have been used throughout, where possible, for computing things such as erfc or Q. Since I am not using their code, I am omitting their copyright notice, but wish to acknowledge their documentation of the selected tests anyway. All the code in dieharder is GPL open source in any event, but academic credit matters. Similarly, DIEHARD is the work of George Marsaglia. Dr. Marsaglia doen't have any written copyright notice or license terms that I could find in the sources provided on the website where he openly distributes source for his own suite, but in keeping with a minor design goal of completely original GPL code, all the DIEHARD algorithms have also been completely rewritten without directly utilizing any of the actual diehard code. Fortunately, Dr. Marsaglia also provides clear documentation for his test suite, making it a fairly simple matter to implement the tests. Source code WAS examined (but not copied) to clarify places where the documentation of the tests was openly erroneous (as in the parking lot test) or unclear but dieharder code is completely original and its development thoroughly documented in CVS and (later) SVN tree form, checkin by checkin. The relatively few tests I have added are motivated by a desire to get a less ambiguous answer than many of these tests provide. In many cases it is not (or should not) be correct to say that one "accepts" a generator as being a good one just because a test run of the generator has a p-value significantly greater than 0. A few moment's experimentation, especially with relatively small data sets, should convince one that even "bad" RNG's can sometimes, or even frequently, return an "acceptable" p-value. Only when the size of the test is increased, or the test is repeatedly run with different seeds, does it become apparent that although it sometimes performs acceptably (the result of a run isn't inconsistent with the generator producing "real" random numbers) it sometimes performs so poorly that the result can >>never<< be explained or believed for a true random number generator. That is, while a really poor p-value allows us to reject the hypothesis that the tested generator is random, acceptable p-values, even a fair number of them in repeated tests, do not usually support accepting the hypothesis -- at best they don't support rejection. Running a test repeatedly to generate a full distribution of results and then directly comparing the entire distribution with theory appears to provide greater sensitivity and accuracy in the rejection process than "simple" tests that generate only a single quantity. This motivated the rgb_binomial test, which has proven very good at rejecting "bad" rng's. Similarily, it may prove useful to directly generate an empirical distribution of p-values themselves (repeating a test many times with different seeds and binning the p-values) and compare it to the expected distribution (which might work for erfc-based p-values, although not so well for Q-based p-values). This can replace running a test many times looking for an anomalous number of "poor" p-values mixed in with ones that are not so poor as to lead to immediate rejection. Contributions of rng's (consistently GSL-wrapped as e.g. dev_random.c demonstrates) and/or additional tests would be most welcome. rgb STS Critique, By Statistic The Monobit Statistic The monobit statistic checks to make sure that the raw number of 1's and 0's approximately balance in a given bitstring. This is actually a decent thing to test, but there is a better way to test it. Given a relatively short bitstring (e.g. n<=160 bits), the probability that it will have k bits according to the null hypothesis is p(n,k,1/2) (the binomial distribution of outcomes over n independent trials, each with p=1/2). If one runs m runs of n independent trials each, and accumulates X[k] (the count histogram for each possible value of output k in [0,n]) then one has X[k], the expected value histogram Y(k) = m*p(n,k,1/2), and sigma(k) = sqrt(m)*p(n,k,1/2). From this it is simple to compute a p-value from an incomplete gamma function for the >>details<< of the distribution of 1's. One can even do it two ways -- with an independent random number seed for each of the m samples, or by simply running the rng with its original seed long enough to produce m*n bits. This binomial test is stronger than the monobit test. Any result histogram that passes it necessarily passes the monobit test for the aggregate distribution with m*n bits (as I hope is obvious -- passing it means that the distribution is binomial in detail, not just uniformly balanced. However, it is simple enough to compute the monobit result more or less in passing in the binomial test by simply summing the count histogram at the end or aggregating a total 1-bit count as one goes. In that case one can generate two p-values -- a p-value for the monobit test and one for the binomial -- in one pass for the same data. I would predict that the binomial p-value is strictly less than the monobit p-value, and that there exist rng's that pass the monobit that explicitly fail the binomial, but we can determine that empirically. This chisq-based binomial test methodology can be used to improve nearly any single test statistic in sts. Instead of looking at the expected value of the statistic itself, frame its generation as a Bernoulli trial with a known percentage, compute the expected binomial distribution and its error, generate the result histogram as the test statistic, and use chisq and the complementary incomplete gamma function Q(a,x) to generate a p-value over many smaller "independent" trials instead of one long one. This suggests ways of improving e.g. the runs and other tests as well, see below. The Runs Statistic For n bits, count the test statistic X as the number of (overlapping) 01 and 10 pairs and add one. Compute p_1 = (# ones)/n, p_0 = (1 - p_1) (and ensure that they are close enough to p_0 = p_1 = 0.5). Compute the expected number of 01 and 10 pairs as Y = 2*n*p_1*p_0. Compute the expected error in the number of 01 and 10 pairs as sigma = 2*sqrt(2*n)*p_1*p_0. Finally, compute the p-value as erfc(|X - Y|/sigma). This methodology seems questionable, at least to me. First of all, it seems odd to use a p_0 and p_1 derived from the sample, given that the null hypothesis is p_0 = p_1 = 0.5 and independent. Ensuring that the sample passes monobit (in a slightly different formulation) to start means that one has conditionally >>accepted<< this null hypothesis for the rng before beginning the runs test, using different p's implies a different null hypothesis. In addition, given their prior assumption that p_1 = # ones/# bits, their computation of the probability of p_01 and p_10 (and hence Y) is erroneous. The probability of 01 in a finite string of n bits, subject to constrained numbers of 0's and 1's needs to be computed WITHOUT replacement, just as one does with a deck of cards. After shuffling a deck of cards known to contain four aces, the probability that the top two cards are aces is not (4/52)*(4/52), but rather (4/52)*(3/52) -- if the first card is an ace, it means there are fewer aces left in the deck for the second card. To be consistent, they should compute the expected number of 01 strings in a 10-bit sequence containing 6 1's as (4/10)(6/9) and not (4/10)(6/10). They need to choose between a null hypothesis of p_1 = p_0 = 0.5 (where they can presume successive bit probabilities to be independent) and a null hypothesis of p_1 = (# 1's)/(# bits) and use "probability for a 1, given that the first draw is a 0". This matters for short strings. Next, they don't wrap the n-value bitstring into a torus. Consequently, there are only n-1 bitpairs examined, and thus the expected value should be Y = 2*(n-1)*p_1*p_0 and not 2*n*p_1*p_0. For large n, of course, it won't matter (neither will the previous two problems, at least not much), but it is surprisingly sloppy mathematically. In addition there is no reason I can see to add a 1 to the test statistic of (# of 01 and 10 pairs in an overlapping scan of the string). This is very difficult to understand, as it clearly breaks the symmetry of this test statistic with the complementary view where the test statistic X is (# of 00 or 11 pairs in an overlapping scan of the string) but Y and sigma are the same -- the sum of the Y's necessarily equals n (or n-1, if that is the number of examined pairs). This leads to an obvious problem for short strings, e.g. n = 2, where the formula they give for the expected number of 01 or 10's measured is 2*2*(1/2)*(1/2) = 1, but the statistic can only take on the values 1 or 2, each with probability 1/2. There is something odd here. Finally, it is more than a bit crazy to view this assessment as somehow a measure of excessive sequential correlation, as a measure of "runs". Let us reframe the test statistic (count of 01 and 10's) in terms of our null hypothesis. Presuming random, equal probability 0's and 1's, we expect 25% each of 00 01 10 11. Given an exemplary bit string of e.g. 1001101011, it doesn't really matter if one examines disjoint bitpairs (10 01 10 10 11) (n/2 bitpairs for n even) or the overlapping bitpairs 10 00 01 11 10 01 10 01 11 11 (wrapping the last pair around periodically to ensure symmetry and n pairs of bits, EACH pair is expected to occur with a frequency, in the limit of many bitpairs, of #bitpairs*(1/4). Furthermore, in an ensemble of measurements of bitpair frequencies, each distinct possibility is (for lots of identical bitsets) to be binomially distributed with respect to the rest (as in p_01 = 1/4, p_!01 = 3/4) regardless of whether or not sequential overlapping bitpairs are counted. We can understand this by noting that our null hypothesis (a random generator producing pairs of bits) can be applied to any pair of bits in any string. Note also that in a given bitstring with periodic wraparound, the number of 01 (overlapping) pairs must equal the number of 10 pairs. This can be proven with ease. Every bit flipped can either change >>both<< the 01 and 10 count by one (flipping a bit with two neighbors that are both 0 or both 1) or it can leave them both the same (flipping a bit with a neighboring 0 AND a neighboring 1). This wreaks a certain measure of havoc on the notion that each sequentially overlapping pair examined is an independent measurement -- measuring any pair of (01 or 10 count) and (00 or 11 count) suffices to determine the counts for all four possible bit pairs. The only question remaining is whether measuring the counts using overlapping bitpairs is more or less rigorous a test than measuring the counts using non-overlapping pairs. That is, can a generator create a bitstring that is correctly pairwise distributed in both non-overlapping pair sequences but that is NOT correctly pairwise distributed in overlapping pair sequences or vice versa. The answer is not terribly obvious, but if we make the very weak presumption that our test measurments do not depend, on average, on whether we begin them systematically at bit 0 or bit 1 (so that if we have a bad generator we'll eventually fail for either starting point with roughly equal frequency for different starting seeds and/or first-bit displacements), then measuring both possibilities for each string should (on average) produce results that are conservatively related to measuring one possibility on twice as many strings. To put it another way, if a generator creates strings that >>fail<< the overlapping test, they would necessarily fail at least one of the two non-overlapping tests possible for the same bitstring, since the counts for the two non-overlapping tests add to produce the count for the non-overlapping test. For this addition to push values out of acceptable ranges one would require two deviations from the expected value in the same direction. If we only make the extremely weak assumption that failure of the non-overlapping tests is equally likely for both possible cyclic starting points, the 1/sqrt(2) scaling implicit in using both strings is thus conservative. However, we can easily average over this as well by simply randomly starting each non-overlapping run on bit 0 or bit 1. This might actually simplify the code and provides an ADDITIONAL measure of randomness as the two results should themselves be binomially distributed, independently. The final problem with runs is that it is not easy to see how to extend it to a higher order. For example, does 101 occur too often? How about 010? Again, each bit pattern should occur at a rigorously predicted rate for p_0 = p_1 = 0.5 and independent bits, e.g. p_000 = p_001 = p_010 = ... = 1/8 for any distinct three-bit combination, p_0000... = 1/16 for four-bit combinations, and so on. EACH of these outcomes should occur with binomially distributed frequencies when measured as a bernoulli trial with p_xyz, (1 - p_xyz), making it easy to compute both Y and sigma. This suggests that the correct generalization of monobit and runs (and probably more of the sts tests) is a test that (in one pass): a) presumes a valid bitlevel rng so that p_0 = p_1 = 0.5 exactly, all bits independent (null hypothesis). b) counts 1's (and infers 0's) for M sets of N bits, incrementing a histogram vector of the number of 1's observed accordingly. This is rigorously compared for EACH possible value of the count to the expected binomial distribution of counts. c) counts e.g. 00,01,10,11 overlapping pairs. We showed above that the count of 01's exactly equals the count of 10's. The count of 11 pairs equals the total number of pairs less the count of 00's, 01's and 10's (all known). Even though these are not all independent, there is no harm and a small ease of coding advantage in binning all four counts in four result histograms, each to be compared to its binomial expectation. d) counts e.g. 000, 001, 010... overlapping pairs. Here we IGNORE possible count relationships for sure (as we won't stop with three bits:-). Again, bin the outcome count frequencies and compare to their expected binomial distribution. This process can continue indefinitely, as long as we can accumulate enough counts in each pattern histogram to make aggregate statistics reliable. For example, at 8 bits, one is basically ensuring that the distribution of ascii characters is BOTH overall uniform (has the correct mean number of letters) AND that the actual distribution of those letters in samples is correct from the point of view of Bernoulli trials. I think that this process is strengthened significantly by conducting it simultaneously for all the sequences. The first measures "bit frequency and randomness". The second measures "pairwise sequential correlations". The third measure "three-bit sequential correlations" and so forth. A sequence might pass the first and fail the second, pass the first two and fail the third, pass the first seven and fail the eighth, pass the first eight and fail the 32nd (so that floats formed from the inverse are not uniformly distributed). =============== Addendum to previous note. The insight has struck me that all that this does is give one the actual DISTRIBUTION of outcomes for any given experiment. The distribution of sample means should be -- guess what -- normal -- provided that there are enough elements in the sample itself. For small numbers of elements in the sample, they should be binomial if the experiment is framed as a bernoulli trial. I'll bet that if I convert smoothly from binomial into normal as the number of outcome states exceeds the threshold where computing binomial probabilities is reasonably possible, I'll see no difference in an appropriately computed chisq! This is the solution to the problem of doing long strings. If I counted e.g. bitpair combinations across a string of length 8, (for many samples) binomial is appropriate. If I count bitpair combinations across a string of length 2^23 (8 million), I can't do binomial, but don't have to. Outcomes will be normally distributed about the expected means. SO, this is the answer to the bigger problem of why one should ever trust "p-value" for a single sample, or even a dozen samples, of a random process. Sure (to quote Marsaglia) "p happens", but it doesn't JUST happen, it happens according to a distribution. Instead of wondering if THIS occurrence of p = 0.02 from a single mean value is reasonable or not, compute the p of an entire distribution of mean values compared to the appropriate normal or binomial distribution, and get a p-value one can really trust! ======================= OK, so I'm stupid and I'm wrong. sts_monobit is, in fact, more sensitive than rgb_binomial although rgb_binomial might yet pick up a generator that passes sts_monobit and fail it -- one that preserves the symmetry of its 0/1 distribution about the midpoint (so the mean number of 0's and 1's is correct) but has the >>wrong<< distribution, e.g. is not binomial. As it turns out, most distributions that fail rgb_binomial do not have symmetry about their midpoint and consequently fail sts_monobit "before" failing rgb_binomial. If you like, rgb_binomial only becomes reliable when there is enough data to fill the primary non-zero bins near the middle, which takes a goodly chunk of data. sts_monobit, in the meantime, just adds up the number of 0's and 1's while steadily chopping down sigma -- by the time one has sampled a few thousand bits a lot of rng's are already 0/1 asymmetric enough to fail monobit, but the bin sigma's are still large enough to forgive a lot of slop in any given bin. Interestingly, binomial can be applied to very small bitstrings -- in fact, to bitstrings of length 1 (I think). At that point it should become equivalent to monobit, but in a somewhat different way, especially since rgb_binomial now evaluates monobit directly on the accumulated bit values. Looks like I >>do<< have some work to do to fully understand everything, I do I do...;-) ============== Whoo, dawgies! Out of a bit of insight, rgb_persist was born, and it explains why a LOT of rng's suck incredibly. Lots of rng's quite literally never change the contents of certain bits (usually lower order bits). One common symptom is for an rng to always return odd or even numbers. Another common symptom is for a rng to fail a distributional test when the repeated bits are measured (as repeated 1's cause an excess of 1's, repeated 0's an excess of 0's, even repeated 01's can cause runs/bitpair tests to fail). Worse, rgb_persist clearly shows that MOST rng's that exhibit the problem at all exhibit it STRONGLY (LOTS of repeated lower order bits) for at least some seeds. Using them, one runs a significant (indeed, a near "sure thing") risk of encountering seeds such that as many as 18 bits out of 32 are repeated, leaving one with only a fraction of the variation you thought you had. At this point, I'd have to say that rgb_persist is one of the first tests to run on ANY rng, and any rng that fails it should probably just be rejected out of hand -- even if only the last (least significant) bit is repeated, it seems dangerous to use an rng that produces only even or only odd numbers from any given seed, even for games. Writing the dumpbits and rgb_persist routines also gave me insight into how rgb_binomial and even the sts routines might be failing relative to their design goals. I've been processing bits least to most significant, and I've been ignoring random_max when doing so. This is a capital mistake, as of course an rng will fail when it only returns e.g. 16 bits in a 32 bit slot (and the other bits are necessarily repeated). I've probably been "passing" only rng's that return a full 32 "random bits" (and of course don't fail e.g. rgb_persist()). SO, I need to rewrite sts_monobit, sts_runs, and rgb_binomial (last first) so that they only check bits in the valid part of each returned word. This will be modestly annoying, but is of course absolutely necessary for the results to mean a damn thing. ==================== Note the new test rgb_bitdist, which is the BEST generalization of sts_monobit and perhaps better than rgb_binomial as well. We need to merge sts_monobit, rgb_persist, and rgb_bitdist into a single test that measures the total/average bit number, the per-bit-slot total/average number, and derives the cumulative bitmask of repeated bits. Two additional directions to take this: First: generate a set of Ntest variables for e.g. 1 bit 2 bit 3 bit 4 bit ... N bit combinations (one each). For number of bits and bitpattern, sweep the bitstring and accumulate the frequency histogram (for each possible bitpattern in each string location) ntest[no_of_bits].x[bit_pattern_slot] with periodic wraparound on the bitstring and so forth -- this is, in fact, sts_runs but for arbitrary numbers of bits and accumulating BOTH the totals AND the actual distribution, and check the chisq on the distribution and the pvalue of the total expected. Second: Here we look for subtle sequential bitlevel correlations. We do the same test as before, except that the frequency histogram is LATERAL -- doing each bit position in a sequential fashion. This test should see a clear failure for bits that don't change (strong sequential correlation, that) but should ALSO discover individual bits that do things like: 01010101 or 0011110000111100 or any other "balanced" repetition. In fact, we may eventually do a fft on the forward sequential bit sequences to see if there are even very weak sequential bit-level correlations like 001010100001100010 (where every sequential triplet has two 0's and one 1), even if the triplets themselves are "random". A good frequency test on all 3-way bit patterns should catch this, of course, and the lovely thing about binary is that I can always use a suitably masked integer conversion of the bit pattern itself as the histogram index! So it needn't be TOO horrible to encode. ===================================================== Note on diehard parking lot test. First of all, the documentation for the test is incorrect -- it tests for "crashes" (overlap) of SQUARE cars with sides of length 1, not ROUND cars of RADIUS one as Marsaglia's documentation and comments assert. If round cars ("helicopters", to borrow Marsaglia's term) are used a different distribution is obtained with mean over 4000. Actually to me, round cars seems very very similar to one of Knuth's tests for hyperplanar distribution of random coordinates, which has a much more solid theoretical foundation; I suspect the tests are more or less equivalent in sensitivity and will yield identical success/failure patterns in 99% of all cases (maybe even 100%). And the sensitivity of this test sucks -- it was very difficult for me to find a test that failed it out of the entire GSL collection (trying a half dozen known-weak generators or more in the process). The one that finally DID fail it really, really sucked and failed all sorts of other tests. I'd be interested to see if this test deserves to live, in the long run. I rather suspect that Knuth tests in variable dimensions will yield a much more systematic view of RNG failure, just as rgb_bitdist does compared to e.g. runs tests. ================================================================== 07/11/06 I've just finished testing Marsaglia's bitstream test, and it is (like rgb_bitdist) a test that nothing survives. In fact, it is a dead certainty that rgb_bitdist is a better version of the same basic test, and that generators that fail rgb_bitdist at (say) 6 bits are going to fail Marsaglia's less sensitive 20-bit test. What his test does that bitstream doesn't is use a single relatively coarse grained test statistic -- the expected number of missing 20 bit numbers out of 2 million trials -- instead of doing what rgb_bitdist does, which is do a chisq test on the fractional occupancy of the entire VECTOR of 20 bit numbers. Research question: Which is more sensitive AT 20 bits? It seems to me that the chisq vector test is clearly superior as it would catch many possible "bad" distributions that conserved the mean number of missing numbers at this sample size (however unlikely such special deviations might be in practice) but then there is the question of sensitivity given a fixed sample size. SO FAR, however, rgb_bitdist continues to be the premier test for revealing failure, with nothing getting out alive past 6 bits, ASSUMING that I'm computing the vector chisq and p-value per run correctly and not just revealing that I'm using the wrong form as the number of bits goes up. Oh, and nothing survives diehard_bitdist EITHER, at least when one cranks the test up past Marsaglia's wimply 20 iterations to (say) 200. At that point the non-uniformity of the p-distribution is absolutely apparent -- it even has structure. That is, some seeds lead to biased results that are TOO CLOSE to the mean value and not properly distributed... an interesting observation all by itself. rgb ================================================================== 07/11/06 later that day... diehard_count_1s_stream() now WORKS! What a PITA! And (I suspect) how unnecessary all the complexity! This test (as it turns out) computes chisq on what amounts to a strangely remapped rgb_bitdist test (precisely!) on four and five digit base 5 integers obtained by remapping bytes based on the number of 1's therein. That is, 256 possibilities are reduced to 5, each with a trivial-to-compute frequency/probability, the base 5 integer is left shifted (base 5!) and added to the next one to cumulate 4 or 5 digit numbers, those numbers are then counted, and the counts compared to the EXPECTED counts given the number of samples and turned into chisq (one each, for 4 and for 5 digit numbers). Sigh. OK then, we COULD just print the p-value of those chisq's -- an absolutely straightforward process. Alternatively, we could do what Marsaglia does -- compute the DIFFERENCE of the chisq's themselves, which of course are supposedly distributed around the number of degrees of freedom of each one separately, that is 3125 - 625 = 2500! This is the mean value of the difference, with stddev = sqrt(2*2500). This final result is turned into a p-value. This of course is wierd and wrong in so many ways. For one, it is entirely possible for chisq_4 and chisq_5 to differ systematically from their expected values, and it is perfectly possible and likely that those deviations would occur in the same direction -- e.g. down -- so that the 4 byte and 5 byte streams BOTH have fewer degrees of freedom than expected. Of course in this case part of the individual deviations CANCEL and is not visible in the final p-value! Honestly, I can think of pretty much "no" reasonable ways that this final pvalue can fail where any/all of the p-values for the 4 or 5 (or 2 or 3 or 1 or 17) digit distributions would not also fail, but I can (and just did) think of a way that the final p-value might MARGINALLY pass while the individual p-values fail. Although the general approach is a good one, what is clearly needed is a new test -- one that extends rgb_bitdist to multidigit strings of smaller base. For example, right now rgb_bitdist tests the FREQUENCY of the occurrence of all 5 digit strings but not all 5 digit strings taken two at a time (32 x 32 = 1K possbilities). Of course one REASON that I don't do that is that I >>already<< do e.g. 10 bit strings -- the DIRECT frequency distribution of those 1K possibilities, which obviously samples all the 5 bit combos taken two at a time!. And besides, every rng I have tested fails at the level of what amounts to two digit octal numbers -- six bit strings. So I'm cynical about this. I also don't think that this really counts 1's. How is this one iota different from simply evaluating the distribution of bytes (8 bit randoms)? If the complete distribution of 8 bit bytes (rgb_bitdist at 8 bits) is random, ALL DERIVED DISTRIBUTIONS are random, with the only catchy part being temporal/sequential correlations that might be revealed from taking the strings four or five bytes at a time (at the expense of compressing the information tremendously). Once again, this test seems reduceable to but not as sensitive as rgb_bitdist at a given level, unfortunately a level far beyond where all known rng's fail anyway. It is a MEASURE of the lack of sensitivity that this does does NOT fail for many of those rng's where rgb_bitdist does... rgb ================================================================== 08/16/06 OK, lots has happened. First of all, I've discovered what I believe to be at least one, maybe two diehard data errors -- rngs consistently fail operm5 and bitstream that I (and everybody else) believe to be "good" ones insofar as such a thing exists. Not surprising -- the data being used to compute the test statistics was simulated between 10 and 20 years ago and this test routinely uses more random numbers from better generators in any given test than were likely used to simulate them in the first place. Second, dieharder is already in the process of developing quite a user base. People have ported it to Windows, for example, and Dirk Eddelbuettel is interested in adding a native R interface to the tests (to be able to take advantage of several of the other facilities that R provides, a la octave/matlab/maple/mathematica as a programming UI). To facilitate both this latter project and the eventual creation of a true GTK-based GUI for dieharder, I've begun the fairly monumental task of splitting off all the tests, the add-on rng's that are intended to be part of the basic package, and all the intrinsic support functions into a standalone link library and associated set of include files. I know from experience writing libwulf to support wulfware apps that this is a bit tricky, and I expect there to be deep bugs and places where the API and separation are not clean for quite some time now. However, when I'm DONE it should be REALLY EASY to replace the front end UI. In fact, if I clean up the UI itself while I'm at it to make it even more modular than it is, I should be able to add a GTK basic interface in a very short period of time. I'm also stripping down the actual source part of dieharder (the tty interface version) and putting most of the documentation and so on in with the LIBRARY, since that is where it will be needed. Eventually I should need something like man pages and/or a manual for the libdieharder library, in addition to a much smaller set of toplevel dieharder documentation. The application (in any UI version) should REALLY be fairly self-documenting as a design goal. To mark the advent of a version that appears to build on top of completely separated libdieharder.a, largely decrufted on both sides, I'm bumping the major number of dieharder even though this wasn't an original design goal. It clearly merits a major version bump anyway. The minor.minor numbers will retain their original meaning (bugfix advances and number of tests supported) except that now I should probably reset bugfix to 0 in both libdieharder and dieharder. I don't know what I'll do about synchronicity between the two -- really I should extract numbers from libdieharder to set dieharder version numbers, but parsing out all the screen-scraping macros gives me a headache so I'll await inspiration or need before messing with it. Note finally that doing this has put adding more e.g. marsaglia_tsang tests on hold. I do have an extensive agenda here -- fixing up a "super" version of sts_serial, adding sts_serial itself (which should be more or less equivalent to rgb_bitdist, only the latter doesn't compute the correct statistic for a chisq, alas), figuring out what the RIGHT data is for diehard_operm5 and diehard_bitstream, completing the installation of 10^11 to 10^12 sample-based target data of my OWN for marsaglia_tsang_gcd, and so on. However, clearly this needs to wait until the development environment is stable again, which could be days yet, or even longer depending on what else I have to do for Duke etc. I also haven't even looked at the WinXX patches -- I'll have to figure them out all over again after splitting off the library, I expect. Still, progress is being made. I think that the application is definitely out there to where a) it could be announced more publically on e.g. the stats lists -- maybe when the libdieharder split has been in "alpha" for at least a while...;-) and b) it is time to look for grant support for this project to accomplish certain specific goals -- supporting testing on a cluster (by the time we're done the sts_series/rgb_bitdist/rgb_lmn tests are going to be BIG CPU consumers:-), finishing off all the desired/required tests, re-simulating key target data for the brave new world of unlimited rands to test, and "getting the word out" via publication, travelling to learned meetings and presenting, and so on. I'd guess that this will require a fairly serious grant for at least 3-5 years to do all that needs to be done that I know of already, and may need even more if (as I suspect) things are discovered that require significant new work to be done on testing algorithms themselves, e.g. "moment expansion" type tests, a connection between high-dimensional test failure and bit distribution tests. I have high hopes for the lmn test, although it may prove only the first step in lmnop, lmnopqr, lmnopqrst, etc... -- sampling lagged correlation between l-bit number, m-bit gap, n-bit number, o-bit gap, p-bit number...etc. MANY tests seem to be fancy ways of doing just this and nothing more, interestingly enough -- in some cases ways of examining only a projective subspace of the failures one might occur from a truly systematic test of this sort. For example, a Knuth test that reveals hyperplanar clustering of rand triplets viewed as spatial coordinates is effectively observing non-uniformity of the random integers represented by the conjunction of the three bitstrings... but without attempting to validate true randomness on 96-bit integers! ================================================================== 10/10/06 Well, many many more bugs were discovered (mostly by Charles Karney) and fixed and the tests are much improved as a result. At this point "good" generators pass all but the operm5 and bitstream tests. operm5 I STRONGLY suspect of containing a significant error. bitstream the jury is still out on -- the whole series of n-bit monkey tests bothers me as they seem inevitably related to rgb_bitdist but less specific and sensitive. They are, however, more asymptotic and I've got to really think about it before passing final judgement (hopefully buttressed by very specific examples of correlated failure according to specific patterns). I added a whole selection of bit manipulation tools. I can now grab GUARANTEED sequential bits from the bitstream produced by any of the supported rngs (independent of rmax_bits). I can easily generate a string of (precisely) uints with 32 supposedly random bits from this sequential stream. I can rotate this uint in place and mask/select any of its bits. I can grab arbitrary bit windows within a block of memory, and can grab arbitrary ntuples within a block of memory with periodic boundary conditions. These routines (only) should be used to access the rngs in nearly all tests as they eliminate spurious effects from a rng returning only 31 bits on a test that de facto presumes 32, or 22 bits, or 16 bits. They also permit true overlapping samples to be generated absolutely trivially on a given fixed buffer for overlapping sample tests in dieharder (where it is by no means obvious that overlapping matters in any significant way). It is time to create two new tests. One of them generalizes rgb_bitdist so that the ntuples it samples can be created by more or less arbitrary sample patterns, e.g. stream: 0101010001111101010110101110100010101110101001011001110110110... -------|(repeat) Get sequential 8-tuples e.g. 01010100 -- existing rgb_bitdist test for nbits = 8. stream: 0101010001111101010110101110100010101110101001011001110110110... ----....---|(repeat) Get 4 bits, skip 4 bits, get 4 bits to make the 8-tuple 01010111, test stream of 8-tuples created with this repeating pattern with rgb_bitdist. This should reveal fourier-like correlations of certain kinds within 12 bits, but is LESS sensitive than properly testing 12 bits directly. stream: 0101010001111101010110101110100010101110101001011001110110110... --........--........--........-|(repeat) Get 2 bits, skip 8 bits, get 2 bits, skip 8, get 2, skip 8, get 2 to make the 8-tuple 01111000, test stream of 8-tuples created with this repeating pattern with rgb_bitdist. Note that this test looks for relatively LONG range ntuplet correlations -- a fourier-like correlation over 32 bit cycles and embedded 8 bit cycles at the same time. stream: 0101010001111101010110101110100010101110101001011001110110110... .....................................---|(repeat) Skip 37 bits, get 4, run rgb_bitdist on the stream of 4-tuplets produced e.g. 1101 etc. Note well that 37 bits is odd and prime, as is 41! This approach can look for trouble in difficult places that might well be missed by a binary-happy sampling of sequential uints. This method of sampling can also be run on a single large buffer with overlap. In principle, one can construct a lagged test series that should reveal e.g. hyperplanar distributions very precisely. However, it is still likely limited by the number of bits one can practically run rgb_bitdist on, which appears to be somewhere in the ballpark of 12 to 16. Nevertheless, it also allows one to sample and discover at least a large class of problems across a much larger number of bits. Note well that in principle ALL the tests in dieharder could run on random numbers (uints or whatever) that are generated by using a patterned, lagged selection of bits such as this. We can therefore accomplish a huge amount of flexibility if we build still more routines into bits.c, e.g. uint get_rand_pattern((void)*result,int rsize,int *pattern,gsl_rng *gsl_rng){} where pattern is a variable length vector such as: pattern[0] = 2; pattern[1] = -8; pattern[2] = 2; pattern[3] = -8; pattern[4] = 2; pattern[5] = -8; pattern[6] = 2; pattern[7] = 0; which can be parsed to build an arbitrary sized return very easily. Another routine might use pattern and a varying offset to generate the ten distinct samplings of the bitstream that use one or more of the skipped bits, or even the full 32 corresponding to all overlapping samples with an offset that runs from 0 to 31, pulled either from primary bitstream or from a large cyclic buffer. I'm moderately tempted to write the Master Bit Selector in this way, but the damnable bit selection routines are actually a real pain in the ass to write and especially debug, so I think I'll start with get_rand_pattern (an obvious generalization of get_rand_bits()) and go from there. Then the entire decision on what to run and test is on the calling program. If I make int *pattern a global variable that can be allocated, set, used, and freed by the caller before calling any test and use only get_rand_pattern() to get ints for testing, ALL tests can be run on selected patterns. Dieharder can then sweep over patterns and really test the hell out of rngs... There is a second kind of test that we must implement -- one that I'm very well qualified to write on the basis of published research. The CLT is a very powerful thing. It predicts BOTH the mean AND the variance of any normal sampling process (and probably higher order moments as well -- there should be a series of cumulants, really, that describe the distribution of means). This gives us the ability to write a very subtle and sensitive test for global autocorrelation over arbitrary internal scales. This is a research question (for me, anyway) but it seems that if a system has internal correlations that prevent samples from being truly iid, this will show up as a variance that does not scale correctly with the number of samples. By comparing the VARIANCES, not the means, one should be able to directly observe that a statistic has e.g. fewer samples in it than you think that it does because of correlations between samples, even correlations over a very long time scale. A classic example is a sample stream with true periodicity -- you think that you've accumulated M samples with a variance that scales like 1/sqrt{M} but really you've gotten the same P samples (each with variance that scales like 1/sqrt{P}). The observed variance is therefore going to be much smaller than the expected variance for M samples, off by a factor of sqrt{M/P}. Similar considerations hold for e.g. overlapping bit pattern selection where there is an "autocorrelation time" associated with the overlap. Here we might have a string like: 11010111010101000101010... generating: 11 01 01 11 01 01 01 00 01 01 01 0... and .1 10 10 11 10 10 10 10 00 10 10 10... EACH of these strings can be tested with e.g. rgb_bitdist to see if the patterns are correctly distributed to yield a p-value. If the generator passes two bit tests independent of the offset, the distribution of p will of course be correct for either sequence. What of the "mixed" (interleaved) sequence: 11 01 01 11 01 01 01 ... + 10 10 11 10 10 10 10 ... = 11 10 01 10 01 11 11 10 01 10 01 10 01 10 ... ? Well, it is pretty much guaranteed to have the right number of 00's, 01's, 10's and 11's overall. However, we can make an even stronger statement. Suppose that we know that the original bit sequence passes the >>3<<-tuple rgb_bitdist test. Then in fact we know that it has the right mean distribution of 000 001 010 011 100 101 110 111's. In that case as we parse these combinations into the two overlapping duplets, we get: P(000) = 1/8 => 00 00 P(001) = 1/8 => 00 01 P(010) = 1/8 => 01 10 P(011) = 1/8 => 01 11 P(100) = 1/8 => 10 00 P(101) = 1/8 => 10 01 P(110) = 1/8 => 11 10 P(111) = 1/8 => 11 11 If we see 00, then (as we will with probability 1/4, inherited from the triplet probability table and validated by the passing of rgb_bitdist for the two independent bit sequences separately), we know that it must be followed by 00 or 01. Suppose there were a surplus of 00s relative to 01s. Then there would be more than 1/8 000s and less than 1/8 001s and we could not have passed the rgb_bitdist test for triplets. This idea is obviously extensible for arbitrary ntuplets -- if one passes rgb_bitdist without overlap for n bits, one is guaranteed to pass with overlap at n-1 bits. Consequently there is really >>no point<< in running rgb_bitdist on a series of ntuplets. If one observes the correct (binomial) probability distribution for the duplets 00, 01, 10, 11 over many samples, then one cannot help but have the correct probability distribution for the monets 0 and 1 separately. If one has the the correct binomial distribution of triplets, one cannot help but have the right distribution of duplets and monets, and so on, whether or not overlapping samples are used. This last example is an excellent case of conditional probability at work. If we shift our sample window by one bit from a window that yields a valid distribution, {\em all that matters} is whether or not that additional bit is a 0 or 1 with the correct frequency. There are always only {\em two} possibilities: bbbb0 -> bbbb and bbb0 bbbb1 -> bbbb and bbb1 If that bit is random with probability 0.5, then we should be able to use Bayes theorem to generate very simple proofs that everything stated above is correct. ================================================================== 01/29/07 OK, just finished repackaging dieharder to use subpackages and a single source tree to build both libraries and the dieharder ui. This will TREMENDOUSLY simplify both the semiseparate maintenance of the R UI as an RPM and the soon-come GUI built with Gtk/glade or the like. In fact, any number of UI's can be added to this source tree, including ones under separate subversion trees. I rather expect that even if I maintain a separate svn tree and a standalone RPM build/specfile for gdieharder, I'll probably keep the gdieharder development node here for convenience if nothing else. It's either that or develop only on platforms where libdieharder is stable and installed. I've added a directory point for R, there is already a separate directory point for the manual (which will eventually get its own RPM). I'm wondering if I need to create a mailman list for dieharder. Probably really close. Anyway, on to future plans, which is one thing the NOTES are for. I still have several new RNGs to add, several tests to debug or re-engineer (they consistently fail "good" generators, suggesting "bad" tests). I need to create a "standard dataset" and run the old fortran diehard against it to create a test reference, then see if I can reproduce the reference test values (within spitting distance) using the dieharder replacements. That would help me resolve this question -- if I get the same numbers on a reference dataset then the new code is "good", so if that same code fails "good" rngs, the old code is probably bad. Or something like that. I also need to add a still further improved reporting facility, especially for e.g the bitlevel tests. One doesn't ONLY want to know if the rgb_bitdist 1's test fails, one wants to know if the sample had an excess of 0's or 1's, and by how many sigma, per run, in a table. Ditto the per run distribution of 00 01 10 11 in the 2's test, 000 001 010... for the 3's test, at least out to maybe 8 bits (a table with 256 entries is BARELY displayable, at least on a pixelized panel of lights display in a GUI). Improved visualization is also important, for example to see hyperplane development for certain generators. I still need to work on the bits.c routines and at the very least get to where I can pack uints with arbitrary blocks of bits and holes. This will permit me to work on fourier and lagged sample tests, ones that look for bitlevel correlations in samples pulled with (say) 23-bit holes between the end of one uint bitset and the next in an imagined continuous stream of random bits. I need to upload the new 2.x release to the website, and probably clean up the website. Sigh. LOTS to do, and so little time and competition... ================================================================== 02/27/07 dieharder now builds with the usual ./configure;make sequence. Gnu Build Tools Suck. However, they are standard and expected, if infinitely painful. Hopefully this will facilitate the debian build, though, and make rpm still works. May have fixed a minor bug in operm5, where it has been claimed that the correct number of degrees of freedom is 5!-4! = 96, not 99. This makes at least some sense, so I implemented the change, but operm5 has MORE errors in either code or data, and I don't have time or knowledge to fix them... On to the next step -- putting the code on a truly public svn repo --- code.google.com. This will take one little bit of work, as the svnsync didn't work the first times I tried it... ========================================================================== 03/09/08 OK, so GBT don't suck, they are merely difficult. I'm about to release a fairly major set of fixes and a new test or three, and one of the main focuses of this round of changes has been to make libtool and the GBT truly happy and dieharder perhaps more portable as a consequence. This is still a process not without pain -- documentation is mediocre, undocumented features abound, rpath evil must be hand-repaired in order to facilitate rpm builds -- but it does look as if the GBT CAN be used to run major projects and automate a lot of the same stuff my original build automated, once you figure out how. As far as tests go, I've implemented a number of fixes and "new" tests since the last time around, and am about to get truly serious about a certain class of tests. The most important new test is sts_serial. IMO this may prove to be the most useful of all rng tests save -- perhaps -- rgb_bitdist, which tests very much the same thing a very slightly different way. The most important planned addition is a "shuffler" that can be used to access the rng stream with lag, with or without loss. In particular, I'd like to be able to generate a stream to sample with an adjustable lag in between samples, at the bit level, to be able to detect weakly correlated cycles in the bitstream. Most of the tests in dieharder are really only strongly sensitive to what I might call "first order" departure from randomness, first order decorrelation. They measure statistics generated from sampling the rng stream in order, with each sample presumed to be independent. They do not, for the most part (with certain exceptions, that is) detect whether any given rand is correlated with the rand that immediate follows it, or the one two rands downstream, or the one fifty rands downstream -- those are "second order" correlations. Amazingly, there seems to be no test that simply and directly evaluates A(d) = <(1.0-2.0*x_i) *(1.0-2.0*x_{i+d})>, the average autocorrelation of the floating point random number stream shifted so that the expected autocorrelation is zero for all displacements d. However, this test really needs to be run in a variety of ways, as one can imagine bitlevel correlations that will show up strongly on bitlevel tests but weakly on floating point tests. Naturally, one can imagine looking at higher order moments as well. To facilitate tests of all of these sorts, I want to wrap the gsl generator in such a way that one can request: n bits, skip m bits (throwing them away), to facilitate "direct" searches for and returning the n bits, or a uint composed of the upper n bits, skip m uints, lower 32-n bits or vice versa. Nothing is thrown away. Or a bit stream returnable as n-bit window or uints made up of any reasonable shuffling or displacements of components, with or without interleaving (lossless) or loss. With such an interface, one could use ALL of the dieharder tests to check for the (mostly) first order randomness of streams generated from various interleaved displacements of any generator. They would then all "magically" become second order (or higher order) tests! rgb ========================================================================== 09/04/08 I've made many changes and bugfixes -- one of which is to fix the run_test() routines so that they create, run, and destroy the tests, one at a time (which suggests that it may well be time to alter the way results are passed back or futher encapsulate tests to simplify dieharder's logic, even at the expense of having tests that "function like diehard's" did. As in some diehard tests generate two statistics in one run; it may be time to separate them into two tests and run them independently with their own names and their own pvalue returns, even at the expense of efficiency. However, I'm writing to post this as my current design goal for -T(able) output with an optional flat to control just what is included in the table and header. Here's the proposed "standard" table output: #======================================================================== # Generator Tested: mt19937 # Test Name | n-bits | p-samples | t-samples | p-value(s) #======================================================================== RGB Bit Distribution Test| 1 | 100 | 100000 | 0.55579848 RGB Bit Distribution Test| 2 | 100 | 100000 | 0.69322169 ... Each field's presence or absence will be able to be turned on or off by means of a flag bit. The presence of the header, and whether or not it contains e.g. the rng descriptors (name and/or filename) will be flag bit controlled as well, with -q basically setting the bits to suppress headers altogether. In this way, with suitable flag settings, one can "just" output pvalues, can output names and pvalues, can output just names and assessments, etc. I'm guessing that the following are all fields we want to be able to control with their own flag bits: THEADER TGEN TNAME TSNAME TNBITS TPSAMPLES TTSAMPLES TPVALUE TASSESSMENT Anyway, let's do it... 9/19/08 That worked really well. However, I now have to handle some way of managing the tests that take ntuple as an argument for e.g. lag or ntuple size. I >>think<< that the only correct way to manage this will be to move the loops to the run_all_tests() function, since that is ONLY a CLI feature, and call the execute_test within it as per usual. That way run_test WITH a setting of ntuple will be entirely API driven and consistent. The other thing(s) I have to implement include: Some sort of CLI flags or control variables to tell dieharder when and how to set a random number seed. We have several possible seed strategies, you see: a) Dieharder reseeds from /dev/random or clock one time at the time the rng is initialized, and then left alone (CLI) until the rng is freed (UI) or the program is ended (CLI). The Rdh UI could in principle permit the seed to be interactively reset by the user at any time; that's up to Dirk. When dieharder outputs results, one of the output flags will indicate whether or not the rng seed should appear. In general it probably should, but only the one seed randomly picked at the beginning. b) Dieharder uses a seed entered by the user one time at the beginning. This should clearly be able to perfectly reproduce any identical sequence of tests (including dieharder -a results) that began with just that seed, so this specific thing should be a possibility. c) Dieharder uses a seed entered by the user at the beginning to set the seed at the beginning of each test. This usage is primarily for validation purposes, since doing this makes results from "series" tests that run closely related tests on various ntuples or lags not independent. For example, rgb_bitstream for an ntuple of 4 is obviously going to be strongly correlated with the results for an ntuple of 8 STARTED FROM THE SAME SEED; the two half-bytes that make up each 8 were previously tested and the results of that test will clearly affect the results for 8. The same problem exists for the closely related sts_serial, but it keeps track and attempts to correct for it. Still, entering a seed and having it used to reseed EACH test run means that dieharder -a -S 1 can EASILY generate an entire set of reference/validation results that can then be generated and compared one at a time in Rdh (which doesn't "do" a -a test). If we seeded only at the beginning, any tiny variation in e.g. the number of rands called or test order would produce different downstream numbers and a failure to validate. Obviously this mode should not be used for testing, as one expects "failures" to cluster in linked tests because of the aforementioned non-independent of the results. If 4 bit numbers lead to a "weak" pvalue, testing 8 bit numbers should also lead to a weak pvalue and/or vice versa. Our current difficulty is that we have THREE possibilities but only TWO CLI control states -- with -S whatever or without. Without is fine -- that can and should select random seeding. With, however, requires a second CLI switch option to select between the two seeding strategies. There really isn't anything wrong with providing the fourth combination of two separate toggles as follows: Strategy \ Seed| 0 | 1 ------------------------------------------------------------------ beginning| random at beginning | from Seed at beginning per test | random per test | from Seed per test SO, it looks like we need to introduce TWO variables. -s sets the strategy. -S sets the seed to the selected value, or left alone at 0, sets seed to a "random" choice. This works because -s is liberated now that we don't need to select sts tests that way. So is -r and -d. We should probably keep -d and use it for -d(ieharder test name/test number) the same way -g allows or will allow one to pick either one. -r, well, we'll have to think about what to do with it, eventually. This is enough for now. ./dieharder.html.in0000664000175000017500000010065213707046103012516 0ustar eddedd

Dieharder: A Random Number Test Suite

Version @VERSION@

Robert G. Brown (rgb)

Dirk Eddelbuettel

David Bauer

Welcome to the dieharder distribution website.

Version @VERSION@ is the current snapshot. Some of the documentation below may not quite be caught up to it, but it should be close.

Dieharder is a random number generator (rng) testing suite. It is intended to test generators, not files of possibly random numbers as the latter is a fallacious view of what it means to be random. Is the number 7 random? If it is generated by a random process, it might be. If it is made up to serve the purpose of some argument (like this one) it is not. Perfect random number generators produce "unlikely" sequences of random numbers -- at exactly the right average rate. Testing a rng is therefore quite subtle.

dieharder is a tool designed to permit one to push a weak generator to unambiguous failure (at the e.g. 0.0001% level), not leave one in the "limbo" of 1% or 5% maybe-failure. It also contains many tests and is extensible so that eventually it will contain many more tests than it already does.

If you are using dieharder for testing rngs either in one of its prebuilt versions (rpm or apt) or built from source (which gives you the ability to e.g. add more tests or integrate your rng directly with dieharder for ease of use) you may want to join either or both of the dieharder-announce or the dieharder-devel mailing lists here. The former should be very low traffic -- basically announcing when a snapshot makes it through development to where I'm proud of it. The latter will be a bit more active, and is a good place to post bug reports, patches, suggestions, fixes, complaints and generally participate in the development process.

About Dieharder

At the suggestion of Linas Vepstas on the Gnu Scientific Library (GSL) list this GPL'd suite of random number tests will be named "Dieharder". Using a movie sequel pun for the name is a double tribute to George Marsaglia, whose "Diehard battery of tests" of random number generators has enjoyed years of enduring usefulness as a test suite.

The dieharder suite is more than just the diehard tests cleaned up and given a pretty GPL'd source face in native C. Tests from the Statistical Test Suite (STS) developed by the National Institute for Standards and Technology (NIST) are being incorporated, as are new tests developed by rgb. Where possible or appropriate, all tests that can be parameterized ("cranked up") to where failure, at least, is unambiguous are so parameterized and controllable from the command line.

A further design goal is to provide some indication of why a generator fails a test, where such information can be extracted during the test process and placed in usable form. For example, the bit-distribution tests should (eventually) be able to display the actual histogram for the different bit ntuplets.

Dieharder is by design extensible. It is intended to be the "Swiss army knife of random number test suites", or if you prefer, "the last suite you'll ever ware" for testing random numbers.


Dieharder Download Area

Dieharder can be freely downloaded from the Dieharder download site. On this page there should be a long list of previous versions of dieharder, and it should tell you what is the current snapshot. The version numbers have the following specific meaning which is a bit different than usual:

  • First number (major). Bumped only when major goals in the design roadmap are reached (for example, finishing all the diehard tests). Version 1.x.x, for example, means that ALL of diehard (and more) is now incorporated in the program. Version 2.x.x means that the tests themselves have been split off into the libdieharder library, so that they can be linked into scripting languages such as R, new UIs, or user code. 3.x.x would be expected to indicate that the entire STS suite is incorporated, and so on.
  • Second number (first minor). This number indicates the number of tests currently supported. When it bumps, it means new tests have been added from e.g. STS, Knuth, Marsaglia and Tsang, rgb, or elsewhere.
  • Third number (second minor). This number is bumped when significant features are added or altered. Bug fixes bump this number, usually after a few bumps of the release number for testing snapshots. This number and the release are reset to 0 when the major is bumped or a new test is added to maintain the strictly increasing numerical value on which e.g. yum upgrades rely.

The single-tree dieharder sources (.tgz and .src.rpm) files can be downloaded from this directory. In addition, binary rpm's built on top of Fedora Core whatever (for either i386 or both of x86_64) may be present. Be warned: the GSL is a build requirement. The current packaging builds both the library and the dieharder UI from a single source rpm, or from running "make" in the toplevel directory of the source tarball. With a bit of effort (making a private rpm building tree), "make rpm" should work for you as well in this toplevel directory.

This project is under very active development. Considerable effort is being expended so that the suite will "run out of the box" to produce a reasonably understandable report for any given random number generator it supports via the "-a" flag, in addition to the ability to considerably vary most specific tests as applied to the generator. A brief synopsis of command options to get you started is presented below. In general, though, documentation (including this page, the man page, and built-in documentation) may lag the bleeding edge snapshot by a few days or more.

An rpm installation note from Court Shrock:

I was reading about your work on dieharder.  First, some info
about getting dieharder working in Gentoo:

cd ~
emerge rpm gsl
wget
http://www.phy.duke.edu/~rgb/General/dieharder/dieharder-0.6.11-1.i386.rpm
rpm -i --nodeps dieharder-0.6.11-1.i386.rpm

Rebuilding from tarball source should always work as well, and if you are planning to play a lot with the tool may be a desireable way to proceed as there are some documentation goodies in the ./doc subdirectory and the ./manual subdirectory of the source tarball (such as the original diehard test descriptions and the STS white paper).

George Marsaglia retired from FSU in 1996. For a brief time diehard appeared to have finally disappeared from FSU webspace, but what had really happened is google's favorite path to it had disappeared when his personal home directory was removed. Diehard is still there, at the URL http://www.stat.fsu.edu/pub/diehard as well as at a Hong Kong website. The source code of diehard itself is (of course) Copyright George Marsaglia but Marsaglia did not incorporate an explicit license into his code which muddles the issue of how and when it can be distributed, freely or otherwise. Existing diehard sources are not directly incorporated into dieharder in source form for that reason, to keep authorship and GPL licensing issues clear.

Note that the same is not true about data. Several of the diehard tests require that one use precomputed numbers as e.g. target mean, sigma for some test statistic. Obviously in these cases we use the same numbers as diehard so we get the same, or comparable, results. These numbers were all developed with support from Federal grants and have all been published in the literature, though, and should therefore be in the public domain as far as reuse in a program is concerned.

Note also that most of the diehard tests are modified in dieharder, usually in a way that should improve them. There are three improvements that were basically always made if possible.

  • The number of test sample p-value that contribute to the final Kolmogorov-Smirnov test for the uniformity of the distribution of p-values of the test statistic is a variable with default 100, which is much larger than most diehard default values. This change alone causes many generators that are asserted to "pass diehard" to in fact fail -- any given test run generates a p-value that is acceptable, but the distribution of p-values is not uniform.
  • The number of actual samples within a test that contribute to the single-run test statistic was made a variable when possible. This was generally possible when the target was an easily computable function of the number of samples, but a number of the tests have pre-computed targets for specific numbers of samples and that number cannot be varied because no general function is known relating the target value to the number of samples.
  • Many of diehard's tests investigated overlapping bit sequences. Overlapping sequences are not independent and one has to account for covariance between the samples (or a gradually vanishing degree of autocorrelation between sequential samples with gradually decreasing overlap). This was generally done at least in part because it used file-based input of random numbers and the size of files that could reasonably be generated and tested in the mid-90's contained on the order of a million random deviates.

    Unfortunately, some of the diehard tests that rely on weak inverses of the covariance matrices associated with overlapping samples seem to have errors in their implementation, whether in the original diehard (covariance) data or in dieharder-specific code it is difficult to say. Fortunately, it is no longer necessary to limit the number of random numbers drawn from a generator when running an integrated test, and non-overlapping versions of these same tests do not require any treatment of covariance. For that reason non-overlapping versions of the questionable tests have been provided where possible (in particular testing permutations and sums) and the overlapping versions of those tests are deprecated pending a resolution of the apparent errors.

In a few cases other variations are possible for specific tests. This should be noted in the built-in test documentation for that test where appropriate.

Aside from these major differences, note that the algorithms were independently written more or less from the test descriptions alone (sometimes illuminated by a look at the code implementations, but only to clear up just what was meant by the description). They may well do things in a different (but equally valid) order or using different (but ultimately equivalent) algorithms altogether and hence produce slightly different (but equally valid) results even when run on the same data with the same basic parameters. Then, there may be bugs in the code, which might have the same general effect. Finally, it is always possible that diehard implementations have bugs and can be in error. Your Mileage May Vary. Be Warned.


About Dieharder

The primary point of dieharder (like diehard before it) is to make it easy to time and test (pseudo)random number generators, both software and hardware, for a variety of purposes in research and cryptography. The tool is built entirely on top of the GSL's random number generator interface and uses a variety of other GSL tools (e.g. sort, erfc, incomplete gamma, distribution generators) in its operation.

Dieharder differs significantly from diehard in many ways. For example, diehard uses file based sources of random numbers exclusively and by default works with only roughly ten million random numbers in such a file. However, modern random number generators in a typical simulation application can easily need to generate 10^18 or more random numbers, generated from hundreds, thousands, millions of different seeds in independent (parallelized) simulation threads, as the application runs over a period of months to years. Those applications can easily be sensitive to rng weaknesses that might not be revealed by sequences as short as 10^7 uints in length even with excellent and sensitive tests. One of dieharder's primary design goals was to permit tests to be run on very long sequences.

To facilitate this, dieharder prefers to test generators that have been wrapped up in a GSL-compatible interface so that they can return an unbounded stream of random numbers -- as many as any single test or the entire suite of tests might require. Numerous examples are provided of how one can wrap one's own random number generator so that it is can be called via the GSL interface.

Dieharder also supports file-based input three distinct ways. The simplest is to use the (raw binary) stdin interface to pipe a bit stream from any rng, hardware or software, through dieharder for testing. In addition, one can use "direct" file input of either raw binary or ascii formatted (usually uint) random numbers. The man page contains examples of how to do all three of these things, and dieharder itself can generate sample files to use as templates for the appropriate formatting.

Note Well! Dieharder can consume a lot of random numbers in the course of running all the tests! To facilitate this, dieharder should (as of 2.27.11 and beyond) support large file (> 2GB) input, although this is still experimental. Large files are clunky and relatively slow, and the LFS (large file system) in linux/gcc is still relatively new and may have portability issues if dieharder is built with a non-gcc compiler. It is therefore strongly recommended that both hardware and software generators be tested by being wrapped within the GSL interface by emulating the source code examples or that the pipe/stdin interface be used so that they can return an essentially unbounded rng stream.

Dieharder also goes beyond diehard in that it is deliberately extensible. In addition to implementing all of the diehard tests it is expected that dieharder will eventually contain all of the NIST STS and a variety of tests contributed by users, invented by the dieharder authors, or implemented from descriptions in the literature. As a true open source project, dieharder can eventually contain all rng tests that prove useful in one place with a consistent interface that permits one to apply those tests to many generators for purposes of comparison and validation of the tests themselves as much as the generators. In other words, it is intended to be a vehicle for the computer science of random number generation testing as well as a practical test harness for random number generators.

To expand on this, the development of dieharder was motivated by the following, in rough order of importance:

  • To provide a readily available, rpm- or apt- installable toolset so that "consumers" of random numbers (who typically use large numbers of random numbers in e.g. simulation or other research) can test the generator(s) they are using to verify their quality or lack thereof.
  • To provide a very simple user interface for that toolset for random number consumers. At the moment, this means a command line interface (CLI) that can easily be embedded in scripts or run repeatedly with different parameters. A graphical user interface (GUI) is on the list of things to do, although it adds little to the practical utility of the tool.
  • To provide lots of knobs and dials and low level control for statistical researchers that want to study particular generators with particular tests in more detail. This includes full access to test sources -- no parameter or aspect of the test algorithms is "hidden" and needs to be taken on faith.
  • To have the entire test code and documentation be fully Gnu Public Licensed and hence openly available for adaptation, testing, comment, and modification so that the testing suite itself becomes (over time) reliable.
  • To be extensible. Dieharder provides a fairly simple API for adding new tests with a common set of low-level testing tools and a common test structure that leads (one hopes) to an unambiguous decision to accept or reject any given random number generator on the basis of any given test for a suitable choice of controllable test parameters.
  • To allow all researchers to be able to directly test, in particular, the random number generators interfaced with the GSL. This is a deliberate design decision justified by the extremely large and growing number of random number generators prebuilt into the GSL and the ease of adding new ones (either contributing them to the project or for the sole purpose of local testing).
  • To allow researchers that use e.g. distributions directly generated by GSL routines (which can in principle fail two ways, due to the failure of the underlying random number generator or due to a failure of the generating algorithm) to be able to directly validate their particular generator/distribution combination at the cost of implementing a suitable test in dieharder (using the code of existing tests as a template).
  • To allow dieharder to be directly interfaced with other tools and interfaces. For example, dieharder can be directly called within the R interface, permitting its rngs to be tested and R-based graphics and tools to be used to analyze test results. Note well, however, that because it uses the GSL (which is GPL viral) dieharder itself is GPL viral and cannot be embedded directly into a non-GPL tool such as matlab. It can, of course, be used to generate p-value data that is passed on to matlab (or any other graphing or analysis tool)

Although this tool is being developed on Linux/GCC-based platforms, it should port with no particular difficulty to other Unix-like environments (at least ones that also support the GSL), with the further warning that certain features (in particular large file support) may require tweaking and that the dieharder authors may not be able to help you perform that tweaking.

Essential Usage Synopsis

If you compile the test or install the provided binary rpm's and run it as:

dieharder -a

it should run -a(ll) tests on the default GSL generator.

Choose alternative tests with -g number where:

dieharder -g -1

will list all possible numbers known to the current snapshot of the dieharder.

dieharder -l

should list all the tests implemented in the current snapshop of DieHarder. Finally, the venerable and time tested:

dieharder -h

provides a Usage synopsis (which can quite long) and

man dieharder

is the (installed) man page, which may or many not be completely up to date as the suite is under active development. For developers, additional documentation is available in the toplevel directory or doc subdirectory of the source tree. Eventually, a complete DieHard manual in printable PDF form will be available both on this website and in /usr/share/doc/dieharder-*/.

List of Random Number Generators and Tests Available

List of GSL and user-defined random number generators that can be tested by dieharder:

#=============================================================================#
#          dieharder version 3.29.4beta Copyright 2003 Robert G. Brown        #
#=============================================================================#
#    Id Test Name           | Id Test Name           | Id Test Name           #
#=============================================================================#
|   000 borosh13            |001 cmrg                |002 coveyou             |
|   003 fishman18           |004 fishman20           |005 fishman2x           |
|   006 gfsr4               |007 knuthran            |008 knuthran2           |
|   009 knuthran2002        |010 lecuyer21           |011 minstd              |
|   012 mrg                 |013 mt19937             |014 mt19937_1999        |
|   015 mt19937_1998        |016 r250                |017 ran0                |
|   018 ran1                |019 ran2                |020 ran3                |
|   021 rand                |022 rand48              |023 random128-bsd       |
|   024 random128-glibc2    |025 random128-libc5     |026 random256-bsd       |
|   027 random256-glibc2    |028 random256-libc5     |029 random32-bsd        |
|   030 random32-glibc2     |031 random32-libc5      |032 random64-bsd        |
|   033 random64-glibc2     |034 random64-libc5      |035 random8-bsd         |
|   036 random8-glibc2      |037 random8-libc5       |038 random-bsd          |
|   039 random-glibc2       |040 random-libc5        |041 randu               |
|   042 ranf                |043 ranlux              |044 ranlux389           |
|   045 ranlxd1             |046 ranlxd2             |047 ranlxs0             |
|   048 ranlxs1             |049 ranlxs2             |050 ranmar              |
|   051 slatec              |052 taus                |053 taus2               |
|   054 taus113             |055 transputer          |056 tt800               |
|   057 uni                 |058 uni32               |059 vax                 |
|   060 waterman14          |061 zuf                 |                        |
#=============================================================================#
|   200 stdin_input_raw     |201 file_input_raw      |202 file_input          |
|   203 ca                  |204 uvag                |205 AES_OFB             |
|   206 Threefish_OFB       |                        |                        |
#=============================================================================#
|   400 R_wichmann_hill     |401 R_marsaglia_multic. |402 R_super_duper       |
|   403 R_mersenne_twister  |404 R_knuth_taocp       |405 R_knuth_taocp2      |
#=============================================================================#
|   500 /dev/random         |501 /dev/urandom        |                        |
#=============================================================================#
|   600 empty               |                        |                        |
#=============================================================================#

Two "gold standard" generators in particular are provided to "test the test" -- AES_OFB and Threefish_OFB are both cryptographic generators and should be quite random. gfsr4, mt19937, and taus (and several others) are very good generators in the GSL, as well. If you are developing a new rng, it should compare decently with these generators on dieharder test runs.

Note that the stdin_input_raw interface (-g 200) is a "universal" interface. Any generator that can produce a (continuous) stream of presumably random bits can be tested with dieharder. The easiest way to demonstrate this is by running:

dieharder -S 1 -o -B -t 100000000 | dieharder -g 200 -d 0

where the first invocation of dieharder generates a stream of binary bits drawn from the default generator with seed 1 and the second reads those bits from stdin and tests them with the diehard birthdaytest on two bit sequences. Compare the output to:

dieharder -S 1 -d 0

which runs the same test on the same generator with the same seed internally. They should be the same.

Similarly the file_input generator requires a file of "cooked" (ascii readable) random numbers, one per line, with a header that describes the format to dieharder. Note Well! File or stream input rands (with any of the three methods for input) are delivered to the tests on demand, but if the test needs more than are available dieharder either fails (in the case of a stdin stream) or rewinds the file and cycles through it again, and again, and again as needed. Obviously this significantly reduces the sample space and can lead to completely incorrect results for the p-value histograms unless there are enough rands to run EACH test without repetition (it is harmless to reuse the sequence for different tests). Let the user beware!

List of the CURRENT fully implemented tests (as of the 08/18/08 snapshot):

#=============================================================================#
#          dieharder version 3.29.4beta Copyright 2003 Robert G. Brown        #
#=============================================================================#
Installed dieharder tests:
 Test Number                         Test Name                Test Reliability
===============================================================================
  -d 0                            Diehard Birthdays Test              Good
  -d 1                               Diehard OPERM5 Test           Suspect
  -d 2                    Diehard 32x32 Binary Rank Test              Good
  -d 3                      Diehard 6x8 Binary Rank Test              Good
  -d 4                            Diehard Bitstream Test              Good
  -d 5                                      Diehard OPSO              Good
  -d 6                                 Diehard OQSO Test              Good
  -d 7                                  Diehard DNA Test              Good
  -d 8                Diehard Count the 1s (stream) Test              Good
  -d 9                  Diehard Count the 1s Test (byte)              Good
  -d 10                         Diehard Parking Lot Test              Good
  -d 11         Diehard Minimum Distance (2d Circle) Test             Good
  -d 12         Diehard 3d Sphere (Minimum Distance) Test             Good
  -d 13                             Diehard Squeeze Test              Good
  -d 14                                Diehard Sums Test        Do Not Use
  -d 15                                Diehard Runs Test              Good
  -d 16                               Diehard Craps Test              Good
  -d 17                     Marsaglia and Tsang GCD Test              Good
  -d 100                                STS Monobit Test              Good
  -d 101                                   STS Runs Test              Good
  -d 102                   STS Serial Test (Generalized)              Good
  -d 200                       RGB Bit Distribution Test              Good
  -d 201           RGB Generalized Minimum Distance Test              Good
  -d 202                           RGB Permutations Test              Good
  -d 203                             RGB Lagged Sum Test              Good
  -d 204                RGB Kolmogorov-Smirnov Test Test              Good

Full descriptions of the tests are available from within the tool. For example, enter:

rgb@lilith|B:1003>./dieharder -d 203 -h
OK, what is dtest_num = 203
#==================================================================
#                     RGB Lagged Sums Test
# This package contains many very lovely tests.  Very few of them,
# however, test for lagged correlations -- the possibility that
# the random number generator has a bitlevel correlation after
# some fixed number of intervening bits.
#
# The lagged sums test is therefore very simple.   One simply adds up
# uniform deviates sampled from the rng, skipping lag samples in between
# each rand used.  The mean of tsamples samples thus summed should be
# 0.5*tsamples.  The standard deviation should be sqrt(tsamples/12).
# The experimental values of the sum are thus converted into a
# p-value (using the erf()) and a ks-test applied to psamples of them.
#==================================================================

Note that all tests have been independently rewritten from their description, and may be functionally modified or extended relative to the original source code published in the originating suite(s). This has proven to be absolutely necessary; dieharder stresses random number generator tests as much as it stresses random number generators, and tests with imprecise target statistics can return "failure" when the fault is with the test, not the generator.

The author (rgb) bears complete responsibility for these changes, subject to the standard GPL code disclaimer that the code has no warranty. In essence, yes it may be my fault if they don't work but using the tool is at your own risk and you can fix it if it bothers you and/or I don't fix it first.

Development Notes

All tests are encapsulated to be as standard as possible in the way they compute p-values from single statistics or from vectors of statistics, and in the way they implement the underlying KS and chisq tests. Diehard is now complete in dieharder (although two tests are badly broken and should not be used), and attention will turn towards implementing more selected tests from the STS and many other sources. A road map of sorts (with full supporting documentation) is available on request if volunteers wish to work on adding more GPL tests.

Note that a few tests appear to have stubborn bugs. In particular, the diehard operm5 test seems to fail all generators in dieharder. Several users have attempted to help debug this problem, and it tentatively appears that the problem is in the original diehard code and not just dieharder. There is extensive literature on overlapping tests, which are highly non-trivial to implement and involve things like forming the weak inverse of covariance matrices in order to correct for overlapping (non-independent) statistics.

A revised version of overlapping permutations is underway (as an rgb test), but is still buggy. A non-overlapping (rgb) permutations test is provided now that should test much the same thing at the expense of requiring more samples to do it.

Similarly, the diehard sums test appears to produce a systematically non-flat distribution of p-values for all rngs tested, in particular for the "gold standard" cryptographic generators aes and threefish, as well as for the "good" generators in the GSL (mt19937, taus, gfsr4). It seems very unlikely that all of these generators would be flawed in the same way, so this test also should not be used to test your rng.

Thoughts for the Future/Wish List/To Do

  • Tests of GSL random distribution (as opposed to number) generators, as indirect tests of the generators that feed them.
  • New tests, compressions of existing ones that are "different" but really the same. Hyperplane tests. Spectral tests. Especially the bit distribution test with user defineable lag or lag pattern (to look for subtle, long period correlations in the bit patterns produced).
  • Collaborators. Co-developers welcome, as are contributions or suggestions from users. Note well that users have already provided critical help debugging the early code! Part of the point of a GPL project is that you are NOT at the mercy of a black box piece of code. If you are using dieharder and are moderately expert at statistics and random numbers and observe something odd, please help out!

Conclusions

I hope that even during its development, you find dieharder useful. Remember, it is fully open source, so you can freely modify and redistribute the code according to the rules laid out in the Gnu Public License (version 2b), which might cost you as much as a beer one day. In particular, you can easily add random number generators using the provided examples as templates, or you can add tests of your own by copying the general layout of the existing tests (working toward a p-value per run, cumulating (say) 100 runs, and turning the resulting KS test into an overall p-value). Best of all, you can look inside the code and see how the tests work, which may inspire you to create a new test -- or a new generator that can pass a test.

To conclude, if you have any interest in participating in the development of dieharder, be sure to let me know, especially if you have decent C coding skills (including familiarity with Subversion and the GSL) and a basic knowledge of statistics. I even have documents to help with the latter, if you have the programming skills and want to LEARN statistics. Bug reports or suggestions are also welcome.

Submit bug reports, etc. to

rgb at phy dot duke dot edu
./NEWS0000664000175000017500000000000013707046103007755 0ustar eddedd./README0000664000175000017500000002130413707046103010150 0ustar eddedd Building Dieharder ======================================================================== You MUST run ./autogen.sh FIRST. Then ./configure, make and so on should work. Sorry, if I distribute it any other way some aspect of the Gnu Build Tools breaks for some system. See INSTALL for more details. ======================================================================== Author Contact Information: Robert G. Brown Duke University Dept. of Physics, Box 90305 Durham, N.C. 27708-0305 Phone: 1-919-660-2567 Fax: 919-660-2525 Email: rgb@phy.duke.edu URL: http://www.phy.duke.edu/~rgb ======================================================================== Versioning Versioning in dieharder has a very specific meaning. The major number is bumped when a major project milestone is reached OR when a major fundamental redesign takes place (something that happens roughly 3-5 times over the lifetime of any given project). The first minor is the number of tests built into the current snapshot. The second minor is bumped when e.g. a major change occurs within a release -- a bug is fixed, a new feature (but not a new test) is added. Release is used to track micro/testing releases in the development cycle. Basically, proposed bugfixes that will eventually become bumps in the second minor number. In this way one can always see if dieharder is likely to have major new features or bugfixes in it relative to your current version. Notes About the Tests in Dieharder Dieharder is original code written by and Copyright Robert G. Brown (with different code modules written over the period 2003-present). The tests included (or expected to be included in the future) in dieharder, are, however, derived from descriptions from several places. * Diehard, a famous suite of random number tests written over many years by George Marsaglia. The original Diehard sources (written in Fortran) are (of course) Copyright George Marsaglia according to the Berne convention, where authors retain copyright with or without a notice in any original work. The original Diehard code written by Marsaglia did not include a copyright notice or an explicit license in or with the sources that have been made publically available on the web for many years. When contacted, Dr. Marsaglia has indicated his wish to restrict commercial usage of his code and permit only academic/research related use. For this reason the the algorithms are fully re-implemented, in original code, in dieharder to keep authorship and GPL licensing issues clear. However, all diehard-equivalent tests are clearly labelled as such and academically attributed to Dr. Marsaglia. * The National Institute of Standards and Technology (NIST) Statistical Test Suite (STS) as described in publication SP800-22b. Although this test suite was developed with government support and is explicitly in the public domain, and is available in C source. There is some overlap between STS and Diehard -- for example, both have binary matrix rank tests -- but the STS focusses primarily on bitlevel randomness and the suitability of a random number generator for use in cryptographic applications. The tests described in SP800-22b that are implemented in dieharder are completely rewritten in original C by Robert G. Brown to keep copyright and GPL issues clear. All STS-derived tests are clearly labelled as such and are academically attributed to the various authors of the suite (Andrew Rukhin, Juan Soto, James Nechvatal, Miles Smid, Elaine Barker, Stefan Leigh, Mark Levenson, Mark Vangel, David Banks, Alan Heckert, James Dray, San Vo). * Original tests or timing operations inserted by Robert G. Brown. Almost any distribution that can be computed on the basis of a source of random numbers with a derived statistic with known or reliably measurable statistical properties can serve as a test of random numbers using the general approach implemented in Diehard, the STS, Dieharder, and elsewhere. * Tests described in Knuth's The Art of Computer Programming. * User-contributed tests. * Tests described elsewhere in the literature. In all cases some effort has been made to correctly attribute the originator of a test algorithm, and if there are any errors in this regard they will be happily corrected once they are brought to the attention of the author. ======================================================================== To Build Dieharder See the file INSTALL that should have come with the tarball to get fairly explicit building instructions. You may have to experiment a bit to figure out the dynamic linking thing mentioned there and below in order to be able to hack the library and the front end at the same time. Development and Experimentation Dieharder is an open source project for a reason -- it simply is not possible to trust a test suite of this sort without access to the source because even a subtle error in the sources or data used to perform a test will cause the test to return incorrect answers, conceivably to the detriment of all concerned. With the source readily available, any user is free to examine or modify the source for any test and determine whether or not the test is working and participate in the critical process whereby academia arrives at a consensus truth. Also, many individuals may wish to use the general dieharder library to test their own (software) rngs. This may well involve adding tests or modifying individual tests already there, or dieharder defaults. dieharder is built using the familiar, if somewhat evil, Gnu Build Tools. Unpack tarball, run autogen.sh, ./configure, make. If you wish to install, be sure to set the prefix. Be aware that this program builds a DYNAMICALLY LINKED version of the program. If you want a statically linked version or to be able to work on it in the build directory either add the libdieharder directory to your LOAD_LIBRARY_PATH or hack the Makefile.am to build and use a static library (the commands are there, commented out). RPM Dieharder is developed on RPM-based systems (FCX) and one should be able to build an RPM by using the make target: "make rpm" (after setting up a private RPM build tree). No root privileges are needed to build the rpms in this way. Debian / Ubuntu Dieharder has been in Debian since February 2007. Therefore, on most current Debian or Ubuntu systems a simple sudo apt-get install dieharder installs the command-line (which itself also install the shared library package it depends upon). In order develop against the Dieharder API, run sudo apt-get install libdieharder-dev ======================================================================== Licensing and Revision Control Dieharder is (as noted) Copyright Robert G. Brown, 2003-2006. It has been kept under revision control (first CVS, more recently Subversion) since the inception of the process in 2003 and all incremental changes to the code as it was developed are carefully documented. Dieharder was deliberately developed to be a GPL project, since alternative random number test suites were either incomplete with regard to the span of test possibilities of interest to the author, restricted or unclear about their licensing restrictions, or both. In addition, by integrating from the beginning with the Gnu Scientific Library (which is a full GPL project with the viral version of the license) it becomes itself a GPL project in any event. It is strongly suggested that prospective users of this test read the terms of the license included with this source distribution in the file COPYING. In summary, permission is granted to freely use and modify the sources and distribute the result or any binary objects derived therefrom as long as the terms of the GPL are abided by. These terms require the preservation of all copyright and license information in the sources and that the source of any and all revisions to the original dieharder code be made available upon request to any receivers of a dieharder binary, among other things. 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. If any user of the dieharder program should revise the program in a way that is likely to be of use to others, they are encouraged to at least offer to contribute the revision back to the project (subject to the "editorial" approval of the primary author). Contact Robert G. Brown to arrange for such a contribution. ======================================================================== ./AUTHORS0000664000175000017500000000173513707046103010346 0ustar eddeddRobert G. Brown Primary author and maintainer of RPM versions and original sources. Dirk Eddelbuettel Maintainer of Debian versions and contributor of the R interface. David Bauer Debugger and fixer extraordinaire, contributor of the aes and threefish "gold standard" rngs and major factor in the fixing of kstest so that it is now "exact". Many other individuals have contributed to dieharder at this point by pointing out bugs or probable errors, by contributing improved statistical targets or fragments of code or random number generators to add. I do not include a full list of their names here to protect them from the responsibilities of maintaining the code and their privacy, but I do try to acknowledge them in the actual code source that they've most affected. Please feel free to join the dieharder development mailing list at https://lists.phy.duke.edu/mailman/listinfo/dieharder-devel and participate. ./missing0000755000175000017500000001533613707046265010706 0ustar eddedd#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ./depcomp0000755000175000017500000005602013707046265010657 0ustar eddedd#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 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" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # 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. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -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 -ne 0; then 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 ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # 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 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ./mkinstalldirs0000755000175000017500000000672313707046265012115 0ustar eddedd#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2018-03-07.03; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec 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. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ./dieharder/0000775000175000017500000000000014350422742011221 5ustar eddedd./dieharder/run_all_tests.c0000664000175000017500000001534613707046103014252 0ustar eddedd/* *======================================================================== * $Id: run_all_tests.c 529 2011-04-01 17:49:31Z rgbatduke $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * This should be a nice, big case switch where we add EACH test * we might want to do and either just configure and do it or * prompt for input (if absolutely necessary) and then do it. *======================================================================== */ #include "dieharder.h" void run_all_tests() { /* * The nt variables control ntuple loops for the -a(ll) display only. */ int ntmin,ntmax,ntsave; /* * This isn't QUITE a simple loop because -a is a dieharder-only function, * so that all running of ntuples etc has to be mediated here, per very * specific test. Only certain tests are run over an ntuple range. */ /* * No special ntuple tests in diehard */ for(dtest_num=0;dtest_num 5){ ntsave = ntuple; ntuple = 5; /* This is the hardest test anyway */ execute_test(dtest_num); ntuple = ntsave; } else { execute_test(dtest_num); } } else { /* * Default is to 2 through 5 dimensions, all that are supported by * the test. */ ntmin = 2; ntmax = 5; /* printf("Setting ntmin = %d ntmax = %d\n",ntmin,ntmax); */ for(ntuple = ntmin;ntuple <= ntmax;ntuple++){ execute_test(dtest_num); } /* * This RESTORES ntuple = 0, which is the only way we could have * gotten here in the first place! */ ntuple = 0; } } break; /* * Test 202 is rgb_permutations, and needs an ntuple set/loop. */ case 202: if(dh_test_types[dtest_num]){ if(ntuple){ /* * If ntuple is set to be nonzero, just use that value in "all", * but only if it is in bounds. */ if(ntuple < 2){ ntsave = ntuple; ntuple = 5; /* This is the default operm5 value */ execute_test(dtest_num); ntuple = ntsave; } else { execute_test(dtest_num); } } else { /* * Default is to 2 through 5 permutations. Longer than 5 takes * a LONG TIME and must be done by hand. */ ntmin = 2; ntmax = 5; /* printf("Setting ntmin = %d ntmax = %d\n",ntmin,ntmax); */ for(ntuple = ntmin;ntuple <= ntmax;ntuple++){ execute_test(dtest_num); } /* * This RESTORES ntuple = 0, which is the only way we could have * gotten here in the first place! */ ntuple = 0; } } break; /* * Test 203 is rgb_lagged_sums, and needs an ntuple set/loop. */ case 203: if(dh_test_types[dtest_num]){ if(ntuple){ /* * If ntuple is set to be nonzero, just use that value in "all". */ execute_test(dtest_num); } else { /* * Do all lags from 0 to 32. */ ntmin = 0; ntmax = 32; /* printf("Setting ntmin = %d ntmax = %d\n",ntmin,ntmax); */ for(ntuple = ntmin;ntuple <= ntmax;ntuple++){ execute_test(dtest_num); } /* * This RESTORES ntuple = 0, which is the only way we could have * gotten here in the first place! */ ntuple = 0; } } break; /* * Test 204 is rgb_kstest_test. */ case 204: if(dh_test_types[dtest_num]){ execute_test(dtest_num); } break; /* * Test 205 is dab_bytedistrib. */ case 205: if(dh_test_types[dtest_num]){ execute_test(dtest_num); } break; /* * Test 206 is dab_dct. */ case 206: if(dh_test_types[dtest_num]){ execute_test(dtest_num); } break; default: printf("Preparing to run test %d. ntuple = %d\n",dtest_num,ntuple); if(dh_test_types[dtest_num]){ /* This is the fallback to normal tests */ execute_test(dtest_num); } break; } } /* * Future expansion in -a tests... for(dtest_num=600;dtest_num<600+dh_num_user_tests;dtest_num++){ if(dh_test_types[dtest_num]){ execute_test(dtest_num); } } */ } ./dieharder/validate.dat0000664000175000017500000002267613707046103013517 0ustar eddedd#=============================================================================# # dieharder version 3.31.1 Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| Threefish_OFB| 6.36e+07 | #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment| Seed #=============================================================================# diehard_birthdays| 0| 100| 1000|0.27820914| PASSED | 1 diehard_operm5| 0| 1000000| 1000|0.11465595| PASSED | 1 diehard_rank_32x32| 0| 40000| 1000|0.31914085| PASSED | 1 diehard_rank_6x8| 0| 100000| 1000|0.45818704| PASSED | 1 diehard_bitstream| 0| 2097152| 1000|0.61069024| PASSED | 1 diehard_opso| 0| 2097152| 1000|0.40297020| PASSED | 1 diehard_oqso| 0| 2097152| 1000|0.19002291| PASSED | 1 diehard_dna| 0| 2097152| 1000|0.01074845| PASSED | 1 diehard_count_1s_str| 0| 256000| 1000|0.76060421| PASSED | 1 diehard_count_1s_byt| 0| 256000| 1000|0.25085345| PASSED | 1 diehard_parking_lot| 0| 12000| 1000|0.16919556| PASSED | 1 diehard_2dsphere| 2| 8000| 1000|0.99233512| PASSED | 1 diehard_3dsphere| 3| 4000| 1000|0.00173004| WEAK | 1 diehard_squeeze| 0| 100000| 1000|0.90584472| PASSED | 1 diehard_sums| 0| 100| 1000|0.00014072| WEAK | 1 diehard_runs| 0| 100000| 1000|0.48122841| PASSED | 1 diehard_runs| 0| 100000| 1000|0.66482699| PASSED | 1 diehard_craps| 0| 200000| 1000|0.00192738| WEAK | 1 diehard_craps| 0| 200000| 1000|0.72646047| PASSED | 1 marsaglia_tsang_gcd| 0| 10000000| 1000|0.73801078| PASSED | 1 marsaglia_tsang_gcd| 0| 10000000| 1000|0.76439803| PASSED | 1 sts_monobit| 1| 100000| 1000|0.59628035| PASSED | 1 sts_runs| 2| 100000| 1000|0.03875331| PASSED | 1 sts_serial| 1| 100000| 1000|0.59628035| PASSED | 1 sts_serial| 2| 100000| 1000|0.73281229| PASSED | 1 sts_serial| 3| 100000| 1000|0.15827818| PASSED | 1 sts_serial| 3| 100000| 1000|0.02015582| PASSED | 1 sts_serial| 4| 100000| 1000|0.00305566| WEAK | 1 sts_serial| 4| 100000| 1000|0.13973207| PASSED | 1 sts_serial| 5| 100000| 1000|0.00085103| WEAK | 1 sts_serial| 5| 100000| 1000|0.23316345| PASSED | 1 sts_serial| 6| 100000| 1000|0.00349069| WEAK | 1 sts_serial| 6| 100000| 1000|0.39436531| PASSED | 1 sts_serial| 7| 100000| 1000|0.14597267| PASSED | 1 sts_serial| 7| 100000| 1000|0.78628350| PASSED | 1 sts_serial| 8| 100000| 1000|0.99940688| WEAK | 1 sts_serial| 8| 100000| 1000|0.12603377| PASSED | 1 sts_serial| 9| 100000| 1000|0.77687090| PASSED | 1 sts_serial| 9| 100000| 1000|0.68676193| PASSED | 1 sts_serial| 10| 100000| 1000|0.17570582| PASSED | 1 sts_serial| 10| 100000| 1000|0.46112719| PASSED | 1 sts_serial| 11| 100000| 1000|0.16689382| PASSED | 1 sts_serial| 11| 100000| 1000|0.03779226| PASSED | 1 sts_serial| 12| 100000| 1000|0.15265445| PASSED | 1 sts_serial| 12| 100000| 1000|0.22654975| PASSED | 1 sts_serial| 13| 100000| 1000|0.16152310| PASSED | 1 sts_serial| 13| 100000| 1000|0.49168954| PASSED | 1 sts_serial| 14| 100000| 1000|0.11390164| PASSED | 1 sts_serial| 14| 100000| 1000|0.32883987| PASSED | 1 sts_serial| 15| 100000| 1000|0.03372353| PASSED | 1 sts_serial| 15| 100000| 1000|0.24693908| PASSED | 1 sts_serial| 16| 100000| 1000|0.11940350| PASSED | 1 sts_serial| 16| 100000| 1000|0.34344937| PASSED | 1 rgb_bitdist| 1| 100000| 1000|0.91440530| PASSED | 1 rgb_bitdist| 2| 100000| 1000|0.11036137| PASSED | 1 rgb_bitdist| 3| 100000| 1000|0.82436731| PASSED | 1 rgb_bitdist| 4| 100000| 1000|0.56338959| PASSED | 1 rgb_bitdist| 5| 100000| 1000|0.67725657| PASSED | 1 rgb_bitdist| 6| 100000| 1000|0.97923825| PASSED | 1 rgb_bitdist| 7| 100000| 1000|0.79937944| PASSED | 1 rgb_bitdist| 8| 100000| 1000|0.73581661| PASSED | 1 rgb_bitdist| 9| 100000| 1000|0.80712872| PASSED | 1 rgb_bitdist| 10| 100000| 1000|0.14405521| PASSED | 1 rgb_bitdist| 11| 100000| 1000|0.89121005| PASSED | 1 rgb_bitdist| 12| 100000| 1000|0.73648512| PASSED | 1 rgb_minimum_distance| 2| 10000| 10000|0.60672099| PASSED | 1 rgb_minimum_distance| 3| 10000| 10000|0.22508714| PASSED | 1 rgb_minimum_distance| 4| 10000| 10000|0.01697039| PASSED | 1 rgb_minimum_distance| 5| 10000| 10000|0.01700890| PASSED | 1 rgb_permutations| 2| 100000| 1000|0.69418227| PASSED | 1 rgb_permutations| 3| 100000| 1000|0.34647425| PASSED | 1 rgb_permutations| 4| 100000| 1000|0.15472959| PASSED | 1 rgb_permutations| 5| 100000| 1000|0.26234715| PASSED | 1 rgb_lagged_sum| 0| 1000000| 1000|0.41434844| PASSED | 1 rgb_lagged_sum| 1| 1000000| 1000|0.27668645| PASSED | 1 rgb_lagged_sum| 2| 1000000| 1000|0.57503901| PASSED | 1 rgb_lagged_sum| 3| 1000000| 1000|0.46309998| PASSED | 1 rgb_lagged_sum| 4| 1000000| 1000|0.90267378| PASSED | 1 rgb_lagged_sum| 5| 1000000| 1000|0.74699873| PASSED | 1 rgb_lagged_sum| 6| 1000000| 1000|0.00205046| WEAK | 1 rgb_lagged_sum| 7| 1000000| 1000|0.44475935| PASSED | 1 rgb_lagged_sum| 8| 1000000| 1000|0.25028292| PASSED | 1 rgb_lagged_sum| 9| 1000000| 1000|0.79029938| PASSED | 1 rgb_lagged_sum| 10| 1000000| 1000|0.24617498| PASSED | 1 rgb_lagged_sum| 11| 1000000| 1000|0.96454030| PASSED | 1 rgb_lagged_sum| 12| 1000000| 1000|0.80131447| PASSED | 1 rgb_lagged_sum| 13| 1000000| 1000|0.13024539| PASSED | 1 rgb_lagged_sum| 14| 1000000| 1000|0.64854730| PASSED | 1 rgb_lagged_sum| 15| 1000000| 1000|0.71462986| PASSED | 1 rgb_lagged_sum| 16| 1000000| 1000|0.61438070| PASSED | 1 rgb_lagged_sum| 17| 1000000| 1000|0.60875818| PASSED | 1 rgb_lagged_sum| 18| 1000000| 1000|0.99278800| PASSED | 1 rgb_lagged_sum| 19| 1000000| 1000|0.81860340| PASSED | 1 rgb_lagged_sum| 20| 1000000| 1000|0.17022313| PASSED | 1 rgb_lagged_sum| 21| 1000000| 1000|0.91030319| PASSED | 1 rgb_lagged_sum| 22| 1000000| 1000|0.76849439| PASSED | 1 rgb_lagged_sum| 23| 1000000| 1000|0.40457828| PASSED | 1 rgb_lagged_sum| 24| 1000000| 1000|0.51496147| PASSED | 1 rgb_lagged_sum| 25| 1000000| 1000|0.56213773| PASSED | 1 rgb_lagged_sum| 26| 1000000| 1000|0.56362731| PASSED | 1 rgb_lagged_sum| 27| 1000000| 1000|0.84540798| PASSED | 1 rgb_lagged_sum| 28| 1000000| 1000|0.04658867| PASSED | 1 rgb_lagged_sum| 29| 1000000| 1000|0.52726812| PASSED | 1 rgb_lagged_sum| 30| 1000000| 1000|0.57043453| PASSED | 1 rgb_lagged_sum| 31| 1000000| 1000|0.91330883| PASSED | 1 rgb_lagged_sum| 32| 1000000| 1000|0.07013423| PASSED | 1 rgb_kstest_test| 0| 10000| 10000|0.08029198| PASSED | 1 dab_bytedistrib| 0| 51200000| 10|0.86692907| PASSED | 1 dab_dct| 256| 50000| 10|0.50387195| PASSED | 1 Preparing to run test 207. ntuple = 0 dab_filltree| 32| 15000000| 10|0.13368828| PASSED | 1 dab_filltree| 32| 15000000| 10|0.71583972| PASSED | 1 Preparing to run test 208. ntuple = 0 dab_filltree2| 0| 5000000| 10|0.99633217| WEAK | 1 dab_filltree2| 1| 5000000| 10|0.99958266| WEAK | 1 Preparing to run test 209. ntuple = 0 dab_monobit2| 12| 65000000| 10|0.88511509| PASSED | 1 ./dieharder/validate_1000.sh0000775000175000017500000000571213707046103014014 0ustar eddedd#! /bin/sh # This script runs all the tests the hard way, with more psamples. Ones # that fail are probably BAD TESTS given that it is difficult to conclude # that this is likely to be a bad generator. It passes all tests with their # default number of psamples (usually 100). # Diehard tests cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 0 -D default -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 1 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 2 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 3 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 4 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 5 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 6 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 7 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 8 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 9 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 10 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 11 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 12 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 13 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 14 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 15 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 16 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 17 -D default -D -5 -D histogram # STS tests. Several of these require runs over ntuples cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 100 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 101 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 102 -D default -D -5 -D histogram # rgb tests. Several of these require runs over ntuples or other additional # arguments. cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 200 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 201 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 202 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -p 1000 -d 203 -D default -D -5 -D histogram cat /dev/zero | aespipe -P aeskey | ./dieharder -g 200 -t 1000 -p 1000 -d 204 -D default -D -5 -D histogram ./dieharder/d_g205_a_Y2.out0000664000175000017500000016460213707046103013613 0ustar eddedd#=============================================================================# # dieharder version 3.29.5beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| Seed | AES_OFB| 2.71e+07 |2814800335| #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 100|0.43455890| PASSED diehard_birthdays| 0| 100| 200|0.78583766| PASSED diehard_birthdays| 0| 100| 300|0.97495528| PASSED diehard_birthdays| 0| 100| 400|0.62611044| PASSED diehard_birthdays| 0| 100| 500|0.64836957| PASSED diehard_birthdays| 0| 100| 600|0.65699322| PASSED diehard_birthdays| 0| 100| 700|0.65537546| PASSED diehard_birthdays| 0| 100| 800|0.64803448| PASSED diehard_birthdays| 0| 100| 900|0.61058813| PASSED diehard_birthdays| 0| 100| 1000|0.46655437| PASSED diehard_birthdays| 0| 100| 1100|0.84027583| PASSED diehard_birthdays| 0| 100| 1200|0.91056950| PASSED diehard_birthdays| 0| 100| 1300|0.68049671| PASSED diehard_birthdays| 0| 100| 1400|0.44370866| PASSED diehard_birthdays| 0| 100| 1500|0.83713492| PASSED diehard_birthdays| 0| 100| 1600|0.78327145| PASSED diehard_birthdays| 0| 100| 1700|0.59693203| PASSED diehard_birthdays| 0| 100| 1800|0.77241754| PASSED diehard_birthdays| 0| 100| 1900|0.84603240| PASSED diehard_birthdays| 0| 100| 2000|0.92717176| PASSED diehard_birthdays| 0| 100| 2100|0.93875289| PASSED diehard_birthdays| 0| 100| 2200|0.93602691| PASSED diehard_birthdays| 0| 100| 2300|0.84698715| PASSED diehard_birthdays| 0| 100| 2400|0.90175049| PASSED diehard_birthdays| 0| 100| 2500|0.93366286| PASSED diehard_birthdays| 0| 100| 2600|0.80615635| PASSED diehard_birthdays| 0| 100| 2700|0.58407204| PASSED diehard_birthdays| 0| 100| 2800|0.38442284| PASSED diehard_birthdays| 0| 100| 2900|0.31800243| PASSED diehard_birthdays| 0| 100| 3000|0.32345746| PASSED diehard_birthdays| 0| 100| 3100|0.39923776| PASSED diehard_birthdays| 0| 100| 3200|0.35551776| PASSED diehard_birthdays| 0| 100| 3300|0.27614281| PASSED diehard_birthdays| 0| 100| 3400|0.21196355| PASSED diehard_birthdays| 0| 100| 3500|0.10868234| PASSED diehard_birthdays| 0| 100| 3600|0.14147466| PASSED diehard_birthdays| 0| 100| 3700|0.12457635| PASSED diehard_birthdays| 0| 100| 3800|0.14838382| PASSED diehard_birthdays| 0| 100| 3900|0.13166320| PASSED diehard_birthdays| 0| 100| 4000|0.17779210| PASSED diehard_birthdays| 0| 100| 4100|0.23546604| PASSED diehard_birthdays| 0| 100| 4200|0.26956770| PASSED diehard_birthdays| 0| 100| 4300|0.17374222| PASSED diehard_birthdays| 0| 100| 4400|0.15393525| PASSED diehard_birthdays| 0| 100| 4500|0.15616645| PASSED diehard_birthdays| 0| 100| 4600|0.11235890| PASSED diehard_birthdays| 0| 100| 4700|0.10654978| PASSED diehard_birthdays| 0| 100| 4800|0.10837566| PASSED diehard_birthdays| 0| 100| 4900|0.11012013| PASSED diehard_birthdays| 0| 100| 5000|0.11977774| PASSED diehard_birthdays| 0| 100| 5100|0.13838609| PASSED diehard_birthdays| 0| 100| 5200|0.20251335| PASSED diehard_birthdays| 0| 100| 5300|0.21595838| PASSED diehard_birthdays| 0| 100| 5400|0.36677099| PASSED diehard_birthdays| 0| 100| 5500|0.27173319| PASSED diehard_birthdays| 0| 100| 5600|0.40550449| PASSED diehard_birthdays| 0| 100| 5700|0.40074815| PASSED diehard_birthdays| 0| 100| 5800|0.45020551| PASSED diehard_birthdays| 0| 100| 5900|0.51797003| PASSED diehard_birthdays| 0| 100| 6000|0.53361305| PASSED diehard_birthdays| 0| 100| 6100|0.44455529| PASSED diehard_birthdays| 0| 100| 6200|0.51430518| PASSED diehard_birthdays| 0| 100| 6300|0.60801906| PASSED diehard_birthdays| 0| 100| 6400|0.43845995| PASSED diehard_birthdays| 0| 100| 6500|0.58670026| PASSED diehard_birthdays| 0| 100| 6600|0.61740300| PASSED diehard_birthdays| 0| 100| 6700|0.64800687| PASSED diehard_birthdays| 0| 100| 6800|0.53967857| PASSED diehard_birthdays| 0| 100| 6900|0.58536858| PASSED diehard_birthdays| 0| 100| 7000|0.59484735| PASSED diehard_birthdays| 0| 100| 7100|0.61867885| PASSED diehard_birthdays| 0| 100| 7200|0.74954843| PASSED diehard_birthdays| 0| 100| 7300|0.58474847| PASSED diehard_birthdays| 0| 100| 7400|0.51591837| PASSED diehard_birthdays| 0| 100| 7500|0.54355709| PASSED diehard_birthdays| 0| 100| 7600|0.53370713| PASSED diehard_birthdays| 0| 100| 7700|0.48793109| PASSED diehard_birthdays| 0| 100| 7800|0.41165879| PASSED diehard_birthdays| 0| 100| 7900|0.43624035| PASSED diehard_birthdays| 0| 100| 8000|0.33708455| PASSED diehard_birthdays| 0| 100| 8100|0.31710071| PASSED diehard_birthdays| 0| 100| 8200|0.38132802| PASSED diehard_birthdays| 0| 100| 8300|0.28015668| PASSED diehard_birthdays| 0| 100| 8400|0.32523361| PASSED diehard_birthdays| 0| 100| 8500|0.43534335| PASSED diehard_birthdays| 0| 100| 8600|0.32593797| PASSED diehard_birthdays| 0| 100| 8700|0.27071262| PASSED diehard_birthdays| 0| 100| 8800|0.27700827| PASSED diehard_birthdays| 0| 100| 8900|0.22873362| PASSED diehard_birthdays| 0| 100| 9000|0.23439473| PASSED diehard_birthdays| 0| 100| 9100|0.28402499| PASSED diehard_birthdays| 0| 100| 9200|0.13611080| PASSED diehard_birthdays| 0| 100| 9300|0.12119853| PASSED diehard_birthdays| 0| 100| 9400|0.09261075| PASSED diehard_birthdays| 0| 100| 9500|0.10581931| PASSED diehard_birthdays| 0| 100| 9600|0.08934189| PASSED diehard_birthdays| 0| 100| 9700|0.11254976| PASSED diehard_birthdays| 0| 100| 9800|0.10521104| PASSED diehard_birthdays| 0| 100| 9900|0.08044020| PASSED diehard_birthdays| 0| 100| 10000|0.07900515| PASSED diehard_birthdays| 0| 100| 10100|0.05680418| PASSED diehard_birthdays| 0| 100| 10200|0.03814367| PASSED diehard_birthdays| 0| 100| 10300|0.06419092| PASSED diehard_birthdays| 0| 100| 10400|0.06986353| PASSED diehard_birthdays| 0| 100| 10500|0.06194495| PASSED diehard_birthdays| 0| 100| 10600|0.09068797| PASSED diehard_birthdays| 0| 100| 10700|0.08075792| PASSED diehard_birthdays| 0| 100| 10800|0.10078792| PASSED diehard_birthdays| 0| 100| 10900|0.11900889| PASSED diehard_birthdays| 0| 100| 11000|0.10652157| PASSED diehard_birthdays| 0| 100| 11100|0.09977852| PASSED diehard_birthdays| 0| 100| 11200|0.10253675| PASSED diehard_birthdays| 0| 100| 11300|0.17756714| PASSED diehard_birthdays| 0| 100| 11400|0.17413371| PASSED diehard_birthdays| 0| 100| 11500|0.12675069| PASSED diehard_birthdays| 0| 100| 11600|0.14770203| PASSED diehard_birthdays| 0| 100| 11700|0.16422391| PASSED diehard_birthdays| 0| 100| 11800|0.17479383| PASSED diehard_birthdays| 0| 100| 11900|0.17140918| PASSED diehard_birthdays| 0| 100| 12000|0.12015848| PASSED diehard_birthdays| 0| 100| 12100|0.11283599| PASSED diehard_birthdays| 0| 100| 12200|0.10593067| PASSED diehard_birthdays| 0| 100| 12300|0.10389891| PASSED diehard_birthdays| 0| 100| 12400|0.13741840| PASSED diehard_birthdays| 0| 100| 12500|0.15242727| PASSED diehard_birthdays| 0| 100| 12600|0.12675437| PASSED diehard_birthdays| 0| 100| 12700|0.10948096| PASSED diehard_birthdays| 0| 100| 12800|0.12189936| PASSED diehard_birthdays| 0| 100| 12900|0.08470100| PASSED diehard_birthdays| 0| 100| 13000|0.11241295| PASSED diehard_birthdays| 0| 100| 13100|0.13553931| PASSED diehard_birthdays| 0| 100| 13200|0.13323940| PASSED diehard_birthdays| 0| 100| 13300|0.13570623| PASSED diehard_birthdays| 0| 100| 13400|0.14413622| PASSED diehard_birthdays| 0| 100| 13500|0.13049415| PASSED diehard_birthdays| 0| 100| 13600|0.16201533| PASSED diehard_birthdays| 0| 100| 13700|0.20640055| PASSED diehard_birthdays| 0| 100| 13800|0.25915196| PASSED diehard_birthdays| 0| 100| 13900|0.20586372| PASSED diehard_birthdays| 0| 100| 14000|0.21690313| PASSED diehard_birthdays| 0| 100| 14100|0.22829202| PASSED diehard_birthdays| 0| 100| 14200|0.20134821| PASSED diehard_birthdays| 0| 100| 14300|0.19048893| PASSED diehard_birthdays| 0| 100| 14400|0.19369121| PASSED diehard_birthdays| 0| 100| 14500|0.29250328| PASSED diehard_birthdays| 0| 100| 14600|0.28314427| PASSED diehard_birthdays| 0| 100| 14700|0.27703730| PASSED diehard_birthdays| 0| 100| 14800|0.26956197| PASSED diehard_birthdays| 0| 100| 14900|0.34166034| PASSED diehard_birthdays| 0| 100| 15000|0.23673732| PASSED diehard_birthdays| 0| 100| 15100|0.24922176| PASSED diehard_birthdays| 0| 100| 15200|0.26208818| PASSED diehard_birthdays| 0| 100| 15300|0.23385059| PASSED diehard_birthdays| 0| 100| 15400|0.21532296| PASSED diehard_birthdays| 0| 100| 15500|0.17836501| PASSED diehard_birthdays| 0| 100| 15600|0.19502993| PASSED diehard_birthdays| 0| 100| 15700|0.20567483| PASSED diehard_birthdays| 0| 100| 15800|0.20952591| PASSED diehard_birthdays| 0| 100| 15900|0.15625561| PASSED diehard_birthdays| 0| 100| 16000|0.12357400| PASSED diehard_birthdays| 0| 100| 16100|0.17450967| PASSED diehard_birthdays| 0| 100| 16200|0.13389356| PASSED diehard_birthdays| 0| 100| 16300|0.18134489| PASSED diehard_birthdays| 0| 100| 16400|0.19116833| PASSED diehard_birthdays| 0| 100| 16500|0.28588575| PASSED diehard_birthdays| 0| 100| 16600|0.21886266| PASSED diehard_birthdays| 0| 100| 16700|0.24405066| PASSED diehard_birthdays| 0| 100| 16800|0.23725556| PASSED diehard_birthdays| 0| 100| 16900|0.20236133| PASSED diehard_birthdays| 0| 100| 17000|0.24167188| PASSED diehard_birthdays| 0| 100| 17100|0.23804648| PASSED diehard_birthdays| 0| 100| 17200|0.22718937| PASSED diehard_birthdays| 0| 100| 17300|0.26451072| PASSED diehard_birthdays| 0| 100| 17400|0.23473580| PASSED diehard_birthdays| 0| 100| 17500|0.24067344| PASSED diehard_birthdays| 0| 100| 17600|0.23602052| PASSED diehard_birthdays| 0| 100| 17700|0.30083090| PASSED diehard_birthdays| 0| 100| 17800|0.35376747| PASSED diehard_birthdays| 0| 100| 17900|0.36722648| PASSED diehard_birthdays| 0| 100| 18000|0.37772529| PASSED diehard_birthdays| 0| 100| 18100|0.33607413| PASSED diehard_birthdays| 0| 100| 18200|0.28702976| PASSED diehard_birthdays| 0| 100| 18300|0.26351354| PASSED diehard_birthdays| 0| 100| 18400|0.24154519| PASSED diehard_birthdays| 0| 100| 18500|0.25708276| PASSED diehard_birthdays| 0| 100| 18600|0.26539279| PASSED diehard_birthdays| 0| 100| 18700|0.22923326| PASSED diehard_birthdays| 0| 100| 18800|0.27047400| PASSED diehard_birthdays| 0| 100| 18900|0.25201997| PASSED diehard_birthdays| 0| 100| 19000|0.27957095| PASSED diehard_birthdays| 0| 100| 19100|0.30058765| PASSED diehard_birthdays| 0| 100| 19200|0.30533266| PASSED diehard_birthdays| 0| 100| 19300|0.31009682| PASSED diehard_birthdays| 0| 100| 19400|0.30637129| PASSED diehard_birthdays| 0| 100| 19500|0.31968007| PASSED diehard_birthdays| 0| 100| 19600|0.36066037| PASSED diehard_birthdays| 0| 100| 19700|0.33819994| PASSED diehard_birthdays| 0| 100| 19800|0.37084672| PASSED diehard_birthdays| 0| 100| 19900|0.48952241| PASSED diehard_birthdays| 0| 100| 20000|0.48411908| PASSED diehard_birthdays| 0| 100| 20100|0.46045451| PASSED diehard_birthdays| 0| 100| 20200|0.39467152| PASSED diehard_birthdays| 0| 100| 20300|0.41012452| PASSED diehard_birthdays| 0| 100| 20400|0.40164756| PASSED diehard_birthdays| 0| 100| 20500|0.33668425| PASSED diehard_birthdays| 0| 100| 20600|0.40711010| PASSED diehard_birthdays| 0| 100| 20700|0.39751692| PASSED diehard_birthdays| 0| 100| 20800|0.43839827| PASSED diehard_birthdays| 0| 100| 20900|0.38491926| PASSED diehard_birthdays| 0| 100| 21000|0.39985547| PASSED diehard_birthdays| 0| 100| 21100|0.41505416| PASSED diehard_birthdays| 0| 100| 21200|0.44058333| PASSED diehard_birthdays| 0| 100| 21300|0.43605808| PASSED diehard_birthdays| 0| 100| 21400|0.44161984| PASSED diehard_birthdays| 0| 100| 21500|0.46774180| PASSED diehard_birthdays| 0| 100| 21600|0.46301780| PASSED diehard_birthdays| 0| 100| 21700|0.44541218| PASSED diehard_birthdays| 0| 100| 21800|0.39852994| PASSED diehard_birthdays| 0| 100| 21900|0.38184598| PASSED diehard_birthdays| 0| 100| 22000|0.40240665| PASSED diehard_birthdays| 0| 100| 22100|0.40433042| PASSED diehard_birthdays| 0| 100| 22200|0.36945040| PASSED diehard_birthdays| 0| 100| 22300|0.40814894| PASSED diehard_birthdays| 0| 100| 22400|0.41958250| PASSED diehard_birthdays| 0| 100| 22500|0.41192898| PASSED diehard_birthdays| 0| 100| 22600|0.40438520| PASSED diehard_birthdays| 0| 100| 22700|0.37875035| PASSED diehard_birthdays| 0| 100| 22800|0.33738034| PASSED diehard_birthdays| 0| 100| 22900|0.32280650| PASSED diehard_birthdays| 0| 100| 23000|0.34093395| PASSED diehard_birthdays| 0| 100| 23100|0.33443274| PASSED diehard_birthdays| 0| 100| 23200|0.34445878| PASSED diehard_birthdays| 0| 100| 23300|0.35463167| PASSED diehard_birthdays| 0| 100| 23400|0.40049239| PASSED diehard_birthdays| 0| 100| 23500|0.38423302| PASSED diehard_birthdays| 0| 100| 23600|0.39495743| PASSED diehard_birthdays| 0| 100| 23700|0.40580942| PASSED diehard_birthdays| 0| 100| 23800|0.34652468| PASSED diehard_birthdays| 0| 100| 23900|0.37364648| PASSED diehard_birthdays| 0| 100| 24000|0.36675387| PASSED diehard_birthdays| 0| 100| 24100|0.32728660| PASSED diehard_birthdays| 0| 100| 24200|0.31335087| PASSED diehard_birthdays| 0| 100| 24300|0.31497300| PASSED diehard_birthdays| 0| 100| 24400|0.34022507| PASSED diehard_birthdays| 0| 100| 24500|0.31056629| PASSED diehard_birthdays| 0| 100| 24600|0.31980460| PASSED diehard_birthdays| 0| 100| 24700|0.30621905| PASSED diehard_birthdays| 0| 100| 24800|0.27889090| PASSED diehard_birthdays| 0| 100| 24900|0.24702575| PASSED diehard_birthdays| 0| 100| 25000|0.21232348| PASSED diehard_birthdays| 0| 100| 25100|0.18666012| PASSED diehard_birthdays| 0| 100| 25200|0.16822930| PASSED diehard_birthdays| 0| 100| 25300|0.17420216| PASSED diehard_birthdays| 0| 100| 25400|0.19044047| PASSED diehard_birthdays| 0| 100| 25500|0.17180332| PASSED diehard_birthdays| 0| 100| 25600|0.17782224| PASSED diehard_birthdays| 0| 100| 25700|0.15581977| PASSED diehard_birthdays| 0| 100| 25800|0.15258339| PASSED diehard_birthdays| 0| 100| 25900|0.15805818| PASSED diehard_birthdays| 0| 100| 26000|0.13427567| PASSED diehard_birthdays| 0| 100| 26100|0.12770085| PASSED diehard_birthdays| 0| 100| 26200|0.12500628| PASSED diehard_birthdays| 0| 100| 26300|0.14129521| PASSED diehard_birthdays| 0| 100| 26400|0.12331954| PASSED diehard_birthdays| 0| 100| 26500|0.11385343| PASSED diehard_birthdays| 0| 100| 26600|0.10819052| PASSED diehard_birthdays| 0| 100| 26700|0.10278040| PASSED diehard_birthdays| 0| 100| 26800|0.09761377| PASSED diehard_birthdays| 0| 100| 26900|0.08991426| PASSED diehard_birthdays| 0| 100| 27000|0.08275424| PASSED diehard_birthdays| 0| 100| 27100|0.07149489| PASSED diehard_birthdays| 0| 100| 27200|0.06776172| PASSED diehard_birthdays| 0| 100| 27300|0.06420723| PASSED diehard_birthdays| 0| 100| 27400|0.08831368| PASSED diehard_birthdays| 0| 100| 27500|0.07886641| PASSED diehard_birthdays| 0| 100| 27600|0.07715740| PASSED diehard_birthdays| 0| 100| 27700|0.07319083| PASSED diehard_birthdays| 0| 100| 27800|0.06941049| PASSED diehard_birthdays| 0| 100| 27900|0.06377584| PASSED diehard_birthdays| 0| 100| 28000|0.06851578| PASSED diehard_birthdays| 0| 100| 28100|0.07581810| PASSED diehard_birthdays| 0| 100| 28200|0.06354552| PASSED diehard_birthdays| 0| 100| 28300|0.06023385| PASSED diehard_birthdays| 0| 100| 28400|0.05529742| PASSED diehard_birthdays| 0| 100| 28500|0.05407986| PASSED diehard_birthdays| 0| 100| 28600|0.04960583| PASSED diehard_birthdays| 0| 100| 28700|0.04401141| PASSED diehard_birthdays| 0| 100| 28800|0.04445832| PASSED diehard_birthdays| 0| 100| 28900|0.04638396| PASSED diehard_birthdays| 0| 100| 29000|0.03980837| PASSED diehard_birthdays| 0| 100| 29100|0.03523667| PASSED diehard_birthdays| 0| 100| 29200|0.03221250| PASSED diehard_birthdays| 0| 100| 29300|0.03044185| PASSED diehard_birthdays| 0| 100| 29400|0.02779905| PASSED diehard_birthdays| 0| 100| 29500|0.02625535| PASSED diehard_birthdays| 0| 100| 29600|0.03592809| PASSED diehard_birthdays| 0| 100| 29700|0.02972949| PASSED diehard_birthdays| 0| 100| 29800|0.02536490| PASSED diehard_birthdays| 0| 100| 29900|0.02478994| PASSED diehard_birthdays| 0| 100| 30000|0.02507233| PASSED diehard_birthdays| 0| 100| 30100|0.02287694| PASSED diehard_birthdays| 0| 100| 30200|0.02564091| PASSED diehard_birthdays| 0| 100| 30300|0.02868520| PASSED diehard_birthdays| 0| 100| 30400|0.03310435| PASSED diehard_birthdays| 0| 100| 30500|0.03570304| PASSED diehard_birthdays| 0| 100| 30600|0.02961731| PASSED diehard_birthdays| 0| 100| 30700|0.03093613| PASSED diehard_birthdays| 0| 100| 30800|0.02647529| PASSED diehard_birthdays| 0| 100| 30900|0.02260429| PASSED diehard_birthdays| 0| 100| 31000|0.02529759| PASSED diehard_birthdays| 0| 100| 31100|0.02921049| PASSED diehard_birthdays| 0| 100| 31200|0.02672526| PASSED diehard_birthdays| 0| 100| 31300|0.02208120| PASSED diehard_birthdays| 0| 100| 31400|0.02232710| PASSED diehard_birthdays| 0| 100| 31500|0.01903670| PASSED diehard_birthdays| 0| 100| 31600|0.01860457| PASSED diehard_birthdays| 0| 100| 31700|0.02084863| PASSED diehard_birthdays| 0| 100| 31800|0.01903351| PASSED diehard_birthdays| 0| 100| 31900|0.01511034| PASSED diehard_birthdays| 0| 100| 32000|0.01376207| PASSED diehard_birthdays| 0| 100| 32100|0.01716746| PASSED diehard_birthdays| 0| 100| 32200|0.01736518| PASSED diehard_birthdays| 0| 100| 32300|0.01756392| PASSED diehard_birthdays| 0| 100| 32400|0.01547872| PASSED diehard_birthdays| 0| 100| 32500|0.01565953| PASSED diehard_birthdays| 0| 100| 32600|0.01584130| PASSED diehard_birthdays| 0| 100| 32700|0.01836885| PASSED diehard_birthdays| 0| 100| 32800|0.01677215| PASSED diehard_birthdays| 0| 100| 32900|0.01428252| PASSED diehard_birthdays| 0| 100| 33000|0.01301802| PASSED diehard_birthdays| 0| 100| 33100|0.01066325| PASSED diehard_birthdays| 0| 100| 33200|0.00870582| PASSED diehard_birthdays| 0| 100| 33300|0.01092869| PASSED diehard_birthdays| 0| 100| 33400|0.01272842| PASSED diehard_birthdays| 0| 100| 33500|0.01380183| PASSED diehard_birthdays| 0| 100| 33600|0.01215468| PASSED diehard_birthdays| 0| 100| 33700|0.01318171| PASSED diehard_birthdays| 0| 100| 33800|0.01120740| PASSED diehard_birthdays| 0| 100| 33900|0.01348812| PASSED diehard_birthdays| 0| 100| 34000|0.01230279| PASSED diehard_birthdays| 0| 100| 34100|0.01121504| PASSED diehard_birthdays| 0| 100| 34200|0.01134804| PASSED diehard_birthdays| 0| 100| 34300|0.01148182| PASSED diehard_birthdays| 0| 100| 34400|0.01010453| PASSED diehard_birthdays| 0| 100| 34500|0.01135210| PASSED diehard_birthdays| 0| 100| 34600|0.01230369| PASSED diehard_birthdays| 0| 100| 34700|0.01378344| PASSED diehard_birthdays| 0| 100| 34800|0.01302209| PASSED diehard_birthdays| 0| 100| 34900|0.01035317| PASSED diehard_birthdays| 0| 100| 35000|0.01047485| PASSED diehard_birthdays| 0| 100| 35100|0.01059724| PASSED diehard_birthdays| 0| 100| 35200|0.01072034| PASSED diehard_birthdays| 0| 100| 35300|0.01201720| PASSED diehard_birthdays| 0| 100| 35400|0.01174538| PASSED diehard_birthdays| 0| 100| 35500|0.01187744| PASSED diehard_birthdays| 0| 100| 35600|0.01329021| PASSED diehard_birthdays| 0| 100| 35700|0.01343455| PASSED diehard_birthdays| 0| 100| 35800|0.01313253| PASSED diehard_birthdays| 0| 100| 35900|0.01241282| PASSED diehard_birthdays| 0| 100| 36000|0.01133982| PASSED diehard_birthdays| 0| 100| 36100|0.01108371| PASSED diehard_birthdays| 0| 100| 36200|0.01159259| PASSED diehard_birthdays| 0| 100| 36300|0.01171999| PASSED diehard_birthdays| 0| 100| 36400|0.00966600| PASSED diehard_birthdays| 0| 100| 36500|0.01046505| PASSED diehard_birthdays| 0| 100| 36600|0.00988636| PASSED diehard_birthdays| 0| 100| 36700|0.01034274| PASSED diehard_birthdays| 0| 100| 36800|0.01118678| PASSED diehard_birthdays| 0| 100| 36900|0.01169320| PASSED diehard_birthdays| 0| 100| 37000|0.01263058| PASSED diehard_birthdays| 0| 100| 37100|0.01363211| PASSED diehard_birthdays| 0| 100| 37200|0.01332810| PASSED diehard_birthdays| 0| 100| 37300|0.01533840| PASSED diehard_birthdays| 0| 100| 37400|0.01232690| PASSED diehard_birthdays| 0| 100| 37500|0.01330083| PASSED diehard_birthdays| 0| 100| 37600|0.01178188| PASSED diehard_birthdays| 0| 100| 37700|0.01313781| PASSED diehard_birthdays| 0| 100| 37800|0.01327170| PASSED diehard_birthdays| 0| 100| 37900|0.01215416| PASSED diehard_birthdays| 0| 100| 38000|0.01112463| PASSED diehard_birthdays| 0| 100| 38100|0.01124129| PASSED diehard_birthdays| 0| 100| 38200|0.01063239| PASSED diehard_birthdays| 0| 100| 38300|0.01005477| PASSED diehard_birthdays| 0| 100| 38400|0.00950693| PASSED diehard_birthdays| 0| 100| 38500|0.00898746| PASSED diehard_birthdays| 0| 100| 38600|0.00971140| PASSED diehard_birthdays| 0| 100| 38700|0.00949373| PASSED diehard_birthdays| 0| 100| 38800|0.00839450| PASSED diehard_birthdays| 0| 100| 38900|0.00741443| PASSED diehard_birthdays| 0| 100| 39000|0.00700449| PASSED diehard_birthdays| 0| 100| 39100|0.00639337| PASSED diehard_birthdays| 0| 100| 39200|0.00544217| PASSED diehard_birthdays| 0| 100| 39300|0.00430907| WEAK diehard_birthdays| 0| 100| 39400|0.00339849| WEAK diehard_birthdays| 0| 100| 39500|0.00332020| WEAK diehard_birthdays| 0| 100| 39600|0.00361249| WEAK diehard_birthdays| 0| 100| 39700|0.00436629| WEAK diehard_birthdays| 0| 100| 39800|0.00469701| WEAK diehard_birthdays| 0| 100| 39900|0.00414156| WEAK diehard_birthdays| 0| 100| 40000|0.00327777| WEAK diehard_birthdays| 0| 100| 40100|0.00344833| WEAK diehard_birthdays| 0| 100| 40200|0.00314185| WEAK diehard_birthdays| 0| 100| 40300|0.00275503| WEAK diehard_birthdays| 0| 100| 40400|0.00259564| WEAK diehard_birthdays| 0| 100| 40500|0.00235757| WEAK diehard_birthdays| 0| 100| 40600|0.00193762| WEAK diehard_birthdays| 0| 100| 40700|0.00204291| WEAK diehard_birthdays| 0| 100| 40800|0.00179063| WEAK diehard_birthdays| 0| 100| 40900|0.00181980| WEAK diehard_birthdays| 0| 100| 41000|0.00230413| WEAK diehard_birthdays| 0| 100| 41100|0.00225661| WEAK diehard_birthdays| 0| 100| 41200|0.00246385| WEAK diehard_birthdays| 0| 100| 41300|0.00250170| WEAK diehard_birthdays| 0| 100| 41400|0.00219832| WEAK diehard_birthdays| 0| 100| 41500|0.00179332| WEAK diehard_birthdays| 0| 100| 41600|0.00151462| WEAK diehard_birthdays| 0| 100| 41700|0.00148325| WEAK diehard_birthdays| 0| 100| 41800|0.00181279| WEAK diehard_birthdays| 0| 100| 41900|0.00171138| WEAK diehard_birthdays| 0| 100| 42000|0.00167601| WEAK diehard_birthdays| 0| 100| 42100|0.00176628| WEAK diehard_birthdays| 0| 100| 42200|0.00179418| WEAK diehard_birthdays| 0| 100| 42300|0.00234595| WEAK diehard_birthdays| 0| 100| 42400|0.00199001| WEAK diehard_birthdays| 0| 100| 42500|0.00181275| WEAK diehard_birthdays| 0| 100| 42600|0.00159129| WEAK diehard_birthdays| 0| 100| 42700|0.00161650| WEAK diehard_birthdays| 0| 100| 42800|0.00158313| WEAK diehard_birthdays| 0| 100| 42900|0.00230514| WEAK diehard_birthdays| 0| 100| 43000|0.00233944| WEAK diehard_birthdays| 0| 100| 43100|0.00314147| WEAK diehard_birthdays| 0| 100| 43200|0.00249555| WEAK diehard_birthdays| 0| 100| 43300|0.00219842| WEAK diehard_birthdays| 0| 100| 43400|0.00215333| WEAK diehard_birthdays| 0| 100| 43500|0.00218532| WEAK diehard_birthdays| 0| 100| 43600|0.00221765| WEAK diehard_birthdays| 0| 100| 43700|0.00204001| WEAK diehard_birthdays| 0| 100| 43800|0.00208319| WEAK diehard_birthdays| 0| 100| 43900|0.00198156| WEAK diehard_birthdays| 0| 100| 44000|0.00169307| WEAK diehard_birthdays| 0| 100| 44100|0.00185755| WEAK diehard_birthdays| 0| 100| 44200|0.00189702| WEAK diehard_birthdays| 0| 100| 44300|0.00156372| WEAK diehard_birthdays| 0| 100| 44400|0.00165581| WEAK diehard_birthdays| 0| 100| 44500|0.00141332| WEAK diehard_birthdays| 0| 100| 44600|0.00139297| WEAK diehard_birthdays| 0| 100| 44700|0.00142334| WEAK diehard_birthdays| 0| 100| 44800|0.00135313| WEAK diehard_birthdays| 0| 100| 44900|0.00119621| WEAK diehard_birthdays| 0| 100| 45000|0.00113682| WEAK diehard_birthdays| 0| 100| 45100|0.00134307| WEAK diehard_birthdays| 0| 100| 45200|0.00137220| WEAK diehard_birthdays| 0| 100| 45300|0.00150572| WEAK diehard_birthdays| 0| 100| 45400|0.00165088| WEAK diehard_birthdays| 0| 100| 45500|0.00126732| WEAK diehard_birthdays| 0| 100| 45600|0.00100483| WEAK diehard_birthdays| 0| 100| 45700|0.00102717| WEAK diehard_birthdays| 0| 100| 45800|0.00117038| WEAK diehard_birthdays| 0| 100| 45900|0.00115352| WEAK diehard_birthdays| 0| 100| 46000|0.00146033| WEAK diehard_birthdays| 0| 100| 46100|0.00138906| WEAK diehard_birthdays| 0| 100| 46200|0.00127486| WEAK diehard_birthdays| 0| 100| 46300|0.00116966| WEAK diehard_birthdays| 0| 100| 46400|0.00096244| WEAK diehard_birthdays| 0| 100| 46500|0.00101986| WEAK diehard_birthdays| 0| 100| 46600|0.00093493| WEAK diehard_birthdays| 0| 100| 46700|0.00118555| WEAK diehard_birthdays| 0| 100| 46800|0.00108776| WEAK diehard_birthdays| 0| 100| 46900|0.00123660| WEAK diehard_birthdays| 0| 100| 47000|0.00117618| WEAK diehard_birthdays| 0| 100| 47100|0.00111862| WEAK diehard_birthdays| 0| 100| 47200|0.00092137| WEAK diehard_birthdays| 0| 100| 47300|0.00112601| WEAK diehard_birthdays| 0| 100| 47400|0.00119144| WEAK diehard_birthdays| 0| 100| 47500|0.00150154| WEAK diehard_birthdays| 0| 100| 47600|0.00169991| WEAK diehard_birthdays| 0| 100| 47700|0.00185728| WEAK diehard_birthdays| 0| 100| 47800|0.00209769| WEAK diehard_birthdays| 0| 100| 47900|0.00193152| WEAK diehard_birthdays| 0| 100| 48000|0.00183976| WEAK diehard_birthdays| 0| 100| 48100|0.00181317| WEAK diehard_birthdays| 0| 100| 48200|0.00161234| WEAK diehard_birthdays| 0| 100| 48300|0.00153524| WEAK diehard_birthdays| 0| 100| 48400|0.00110563| WEAK diehard_birthdays| 0| 100| 48500|0.00101537| WEAK diehard_birthdays| 0| 100| 48600|0.00107394| WEAK diehard_birthdays| 0| 100| 48700|0.00088661| WEAK diehard_birthdays| 0| 100| 48800|0.00081359| WEAK diehard_birthdays| 0| 100| 48900|0.00110294| WEAK diehard_birthdays| 0| 100| 49000|0.00112574| WEAK diehard_birthdays| 0| 100| 49100|0.00107131| WEAK diehard_birthdays| 0| 100| 49200|0.00109346| WEAK diehard_birthdays| 0| 100| 49300|0.00119642| WEAK diehard_birthdays| 0| 100| 49400|0.00102557| WEAK diehard_birthdays| 0| 100| 49500|0.00090956| WEAK diehard_birthdays| 0| 100| 49600|0.00103164| WEAK diehard_birthdays| 0| 100| 49700|0.00112876| WEAK diehard_birthdays| 0| 100| 49800|0.00111245| WEAK diehard_birthdays| 0| 100| 49900|0.00098759| WEAK diehard_birthdays| 0| 100| 50000|0.00078804| WEAK diehard_birthdays| 0| 100| 50100|0.00099335| WEAK diehard_birthdays| 0| 100| 50200|0.00082154| WEAK diehard_birthdays| 0| 100| 50300|0.00075441| WEAK diehard_birthdays| 0| 100| 50400|0.00085617| WEAK diehard_birthdays| 0| 100| 50500|0.00087392| WEAK diehard_birthdays| 0| 100| 50600|0.00086130| WEAK diehard_birthdays| 0| 100| 50700|0.00091030| WEAK diehard_birthdays| 0| 100| 50800|0.00092895| WEAK diehard_birthdays| 0| 100| 50900|0.00082452| WEAK diehard_birthdays| 0| 100| 51000|0.00063474| WEAK diehard_birthdays| 0| 100| 51100|0.00058254| WEAK diehard_birthdays| 0| 100| 51200|0.00057414| WEAK diehard_birthdays| 0| 100| 51300|0.00060766| WEAK diehard_birthdays| 0| 100| 51400|0.00062055| WEAK diehard_birthdays| 0| 100| 51500|0.00063365| WEAK diehard_birthdays| 0| 100| 51600|0.00060277| WEAK diehard_birthdays| 0| 100| 51700|0.00055330| WEAK diehard_birthdays| 0| 100| 51800|0.00052622| WEAK diehard_birthdays| 0| 100| 51900|0.00050042| WEAK diehard_birthdays| 0| 100| 52000|0.00045909| WEAK diehard_birthdays| 0| 100| 52100|0.00037772| WEAK diehard_birthdays| 0| 100| 52200|0.00035900| WEAK diehard_birthdays| 0| 100| 52300|0.00032896| WEAK diehard_birthdays| 0| 100| 52400|0.00032423| WEAK diehard_birthdays| 0| 100| 52500|0.00039730| WEAK diehard_birthdays| 0| 100| 52600|0.00040594| WEAK diehard_birthdays| 0| 100| 52700|0.00034625| WEAK diehard_birthdays| 0| 100| 52800|0.00034127| WEAK diehard_birthdays| 0| 100| 52900|0.00033636| WEAK diehard_birthdays| 0| 100| 53000|0.00031969| WEAK diehard_birthdays| 0| 100| 53100|0.00036417| WEAK diehard_birthdays| 0| 100| 53200|0.00034621| WEAK diehard_birthdays| 0| 100| 53300|0.00034122| WEAK diehard_birthdays| 0| 100| 53400|0.00034866| WEAK diehard_birthdays| 0| 100| 53500|0.00030833| WEAK diehard_birthdays| 0| 100| 53600|0.00033388| WEAK diehard_birthdays| 0| 100| 53700|0.00033312| WEAK diehard_birthdays| 0| 100| 53800|0.00027735| WEAK diehard_birthdays| 0| 100| 53900|0.00027675| WEAK diehard_birthdays| 0| 100| 54000|0.00029690| WEAK diehard_birthdays| 0| 100| 54100|0.00028570| WEAK diehard_birthdays| 0| 100| 54200|0.00027493| WEAK diehard_birthdays| 0| 100| 54300|0.00027431| WEAK diehard_birthdays| 0| 100| 54400|0.00024546| WEAK diehard_birthdays| 0| 100| 54500|0.00018265| WEAK diehard_birthdays| 0| 100| 54600|0.00020359| WEAK diehard_birthdays| 0| 100| 54700|0.00022675| WEAK diehard_birthdays| 0| 100| 54800|0.00021033| WEAK diehard_birthdays| 0| 100| 54900|0.00018123| WEAK diehard_birthdays| 0| 100| 55000|0.00022529| WEAK diehard_birthdays| 0| 100| 55100|0.00017398| WEAK diehard_birthdays| 0| 100| 55200|0.00016735| WEAK diehard_birthdays| 0| 100| 55300|0.00012407| WEAK diehard_birthdays| 0| 100| 55400|0.00009514| WEAK diehard_birthdays| 0| 100| 55500|0.00008158| WEAK diehard_birthdays| 0| 100| 55600|0.00009850| WEAK diehard_birthdays| 0| 100| 55700|0.00010605| WEAK diehard_birthdays| 0| 100| 55800|0.00009819| WEAK diehard_birthdays| 0| 100| 55900|0.00007808| WEAK diehard_birthdays| 0| 100| 56000|0.00007224| WEAK diehard_birthdays| 0| 100| 56100|0.00007214| WEAK diehard_birthdays| 0| 100| 56200|0.00005094| WEAK diehard_birthdays| 0| 100| 56300|0.00004528| WEAK diehard_birthdays| 0| 100| 56400|0.00005082| WEAK diehard_birthdays| 0| 100| 56500|0.00004019| WEAK diehard_birthdays| 0| 100| 56600|0.00005070| WEAK diehard_birthdays| 0| 100| 56700|0.00004336| WEAK diehard_birthdays| 0| 100| 56800|0.00005257| WEAK diehard_birthdays| 0| 100| 56900|0.00005457| WEAK diehard_birthdays| 0| 100| 57000|0.00004493| WEAK diehard_birthdays| 0| 100| 57100|0.00003994| WEAK diehard_birthdays| 0| 100| 57200|0.00004148| WEAK diehard_birthdays| 0| 100| 57300|0.00003030| WEAK diehard_birthdays| 0| 100| 57400|0.00002295| WEAK diehard_birthdays| 0| 100| 57500|0.00002293| WEAK diehard_birthdays| 0| 100| 57600|0.00002481| WEAK diehard_birthdays| 0| 100| 57700|0.00002903| WEAK diehard_birthdays| 0| 100| 57800|0.00003017| WEAK diehard_birthdays| 0| 100| 57900|0.00002475| WEAK diehard_birthdays| 0| 100| 58000|0.00002028| WEAK diehard_birthdays| 0| 100| 58100|0.00002781| WEAK diehard_birthdays| 0| 100| 58200|0.00003650| WEAK diehard_birthdays| 0| 100| 58300|0.00003939| WEAK diehard_birthdays| 0| 100| 58400|0.00003934| WEAK diehard_birthdays| 0| 100| 58500|0.00003238| WEAK diehard_birthdays| 0| 100| 58600|0.00003633| WEAK diehard_birthdays| 0| 100| 58700|0.00003629| WEAK diehard_birthdays| 0| 100| 58800|0.00003767| WEAK diehard_birthdays| 0| 100| 58900|0.00004556| WEAK diehard_birthdays| 0| 100| 59000|0.00005098| WEAK diehard_birthdays| 0| 100| 59100|0.00004718| WEAK diehard_birthdays| 0| 100| 59200|0.00005691| WEAK diehard_birthdays| 0| 100| 59300|0.00004886| WEAK diehard_birthdays| 0| 100| 59400|0.00005066| WEAK diehard_birthdays| 0| 100| 59500|0.00005879| WEAK diehard_birthdays| 0| 100| 59600|0.00006565| WEAK diehard_birthdays| 0| 100| 59700|0.00006553| WEAK diehard_birthdays| 0| 100| 59800|0.00007311| WEAK diehard_birthdays| 0| 100| 59900|0.00005417| WEAK diehard_birthdays| 0| 100| 60000|0.00006050| WEAK diehard_birthdays| 0| 100| 60100|0.00005818| WEAK diehard_birthdays| 0| 100| 60200|0.00005389| WEAK diehard_birthdays| 0| 100| 60300|0.00005585| WEAK diehard_birthdays| 0| 100| 60400|0.00004128| WEAK diehard_birthdays| 0| 100| 60500|0.00004121| WEAK diehard_birthdays| 0| 100| 60600|0.00004783| WEAK diehard_birthdays| 0| 100| 60700|0.00004430| WEAK diehard_birthdays| 0| 100| 60800|0.00005332| WEAK diehard_birthdays| 0| 100| 60900|0.00004584| WEAK diehard_birthdays| 0| 100| 61000|0.00005118| WEAK diehard_birthdays| 0| 100| 61100|0.00005926| WEAK diehard_birthdays| 0| 100| 61200|0.00005915| WEAK diehard_birthdays| 0| 100| 61300|0.00005903| WEAK diehard_birthdays| 0| 100| 61400|0.00004377| WEAK diehard_birthdays| 0| 100| 61500|0.00004054| WEAK diehard_birthdays| 0| 100| 61600|0.00003228| WEAK diehard_birthdays| 0| 100| 61700|0.00003223| WEAK diehard_birthdays| 0| 100| 61800|0.00003471| WEAK diehard_birthdays| 0| 100| 61900|0.00004026| WEAK diehard_birthdays| 0| 100| 62000|0.00004331| WEAK diehard_birthdays| 0| 100| 62100|0.00003454| WEAK diehard_birthdays| 0| 100| 62200|0.00003858| WEAK diehard_birthdays| 0| 100| 62300|0.00003442| WEAK diehard_birthdays| 0| 100| 62400|0.00002846| WEAK diehard_birthdays| 0| 100| 62500|0.00003182| WEAK diehard_birthdays| 0| 100| 62600|0.00003298| WEAK diehard_birthdays| 0| 100| 62700|0.00003293| WEAK diehard_birthdays| 0| 100| 62800|0.00003543| WEAK diehard_birthdays| 0| 100| 62900|0.00003407| WEAK diehard_birthdays| 0| 100| 63000|0.00002927| WEAK diehard_birthdays| 0| 100| 63100|0.00002922| WEAK diehard_birthdays| 0| 100| 63200|0.00003789| WEAK diehard_birthdays| 0| 100| 63300|0.00002912| WEAK diehard_birthdays| 0| 100| 63400|0.00002597| WEAK diehard_birthdays| 0| 100| 63500|0.00002315| WEAK diehard_birthdays| 0| 100| 63600|0.00002493| WEAK diehard_birthdays| 0| 100| 63700|0.00002140| WEAK diehard_birthdays| 0| 100| 63800|0.00002219| WEAK diehard_birthdays| 0| 100| 63900|0.00001832| WEAK diehard_birthdays| 0| 100| 64000|0.00001570| WEAK diehard_birthdays| 0| 100| 64100|0.00001971| WEAK diehard_birthdays| 0| 100| 64200|0.00002044| WEAK diehard_birthdays| 0| 100| 64300|0.00002201| WEAK diehard_birthdays| 0| 100| 64400|0.00002038| WEAK diehard_birthdays| 0| 100| 64500|0.00001749| WEAK diehard_birthdays| 0| 100| 64600|0.00002452| WEAK diehard_birthdays| 0| 100| 64700|0.00002737| WEAK diehard_birthdays| 0| 100| 64800|0.00003540| WEAK diehard_birthdays| 0| 100| 64900|0.00003163| WEAK diehard_birthdays| 0| 100| 65000|0.00002825| WEAK diehard_birthdays| 0| 100| 65100|0.00002618| WEAK diehard_birthdays| 0| 100| 65200|0.00002426| WEAK diehard_birthdays| 0| 100| 65300|0.00002608| WEAK diehard_birthdays| 0| 100| 65400|0.00002417| WEAK diehard_birthdays| 0| 100| 65500|0.00002157| WEAK diehard_birthdays| 0| 100| 65600|0.00001477| WEAK diehard_birthdays| 0| 100| 65700|0.00001420| WEAK diehard_birthdays| 0| 100| 65800|0.00001418| WEAK diehard_birthdays| 0| 100| 65900|0.00001170| WEAK diehard_birthdays| 0| 100| 66000|0.00001361| WEAK diehard_birthdays| 0| 100| 66100|0.00001466| WEAK diehard_birthdays| 0| 100| 66200|0.00001357| WEAK diehard_birthdays| 0| 100| 66300|0.00001355| WEAK diehard_birthdays| 0| 100| 66400|0.00001574| WEAK diehard_birthdays| 0| 100| 66500|0.00001571| WEAK diehard_birthdays| 0| 100| 66600|0.00001510| WEAK diehard_birthdays| 0| 100| 66700|0.00001398| WEAK diehard_birthdays| 0| 100| 66800|0.00001816| WEAK diehard_birthdays| 0| 100| 66900|0.00001746| WEAK diehard_birthdays| 0| 100| 67000|0.00002022| WEAK diehard_birthdays| 0| 100| 67100|0.00001555| WEAK diehard_birthdays| 0| 100| 67200|0.00001193| WEAK diehard_birthdays| 0| 100| 67300|0.00000985| WEAK diehard_birthdays| 0| 100| 67400|0.00000911| WEAK diehard_birthdays| 0| 100| 67500|0.00000751| WEAK diehard_birthdays| 0| 100| 67600|0.00000643| WEAK diehard_birthdays| 0| 100| 67700|0.00000694| WEAK diehard_birthdays| 0| 100| 67800|0.00000641| WEAK diehard_birthdays| 0| 100| 67900|0.00000616| WEAK diehard_birthdays| 0| 100| 68000|0.00000548| WEAK diehard_birthdays| 0| 100| 68100|0.00000506| WEAK diehard_birthdays| 0| 100| 68200|0.00000468| WEAK diehard_birthdays| 0| 100| 68300|0.00000416| WEAK diehard_birthdays| 0| 100| 68400|0.00000467| WEAK diehard_birthdays| 0| 100| 68500|0.00000589| WEAK diehard_birthdays| 0| 100| 68600|0.00000660| WEAK diehard_birthdays| 0| 100| 68700|0.00000739| WEAK diehard_birthdays| 0| 100| 68800|0.00000963| WEAK diehard_birthdays| 0| 100| 68900|0.00001160| WEAK diehard_birthdays| 0| 100| 69000|0.00001074| WEAK diehard_birthdays| 0| 100| 69100|0.00000995| WEAK diehard_birthdays| 0| 100| 69200|0.00001290| WEAK diehard_birthdays| 0| 100| 69300|0.00001109| WEAK diehard_birthdays| 0| 100| 69400|0.00001108| WEAK diehard_birthdays| 0| 100| 69500|0.00001106| WEAK diehard_birthdays| 0| 100| 69600|0.00001024| WEAK diehard_birthdays| 0| 100| 69700|0.00000914| WEAK diehard_birthdays| 0| 100| 69800|0.00001021| WEAK diehard_birthdays| 0| 100| 69900|0.00001182| WEAK diehard_birthdays| 0| 100| 70000|0.00001137| WEAK diehard_birthdays| 0| 100| 70100|0.00001269| WEAK diehard_birthdays| 0| 100| 70200|0.00001013| WEAK diehard_birthdays| 0| 100| 70300|0.00001218| WEAK diehard_birthdays| 0| 100| 70400|0.00001010| WEAK diehard_birthdays| 0| 100| 70500|0.00001213| WEAK diehard_birthdays| 0| 100| 70600|0.00001167| WEAK diehard_birthdays| 0| 100| 70700|0.00001349| WEAK diehard_birthdays| 0| 100| 70800|0.00001120| WEAK diehard_birthdays| 0| 100| 70900|0.00001000| WEAK diehard_birthdays| 0| 100| 71000|0.00000893| WEAK diehard_birthdays| 0| 100| 71100|0.00001073| WEAK diehard_birthdays| 0| 100| 71200|0.00001071| WEAK diehard_birthdays| 0| 100| 71300|0.00000993| WEAK diehard_birthdays| 0| 100| 71400|0.00000991| WEAK diehard_birthdays| 0| 100| 71500|0.00001105| WEAK diehard_birthdays| 0| 100| 71600|0.00001478| WEAK diehard_birthdays| 0| 100| 71700|0.00001229| WEAK diehard_birthdays| 0| 100| 71800|0.00001182| WEAK diehard_birthdays| 0| 100| 71900|0.00001416| WEAK diehard_birthdays| 0| 100| 72000|0.00001362| WEAK diehard_birthdays| 0| 100| 72100|0.00001409| WEAK diehard_birthdays| 0| 100| 72200|0.00001172| WEAK diehard_birthdays| 0| 100| 72300|0.00001128| WEAK diehard_birthdays| 0| 100| 72400|0.00001085| WEAK diehard_birthdays| 0| 100| 72500|0.00001083| WEAK diehard_birthdays| 0| 100| 72600|0.00001042| WEAK diehard_birthdays| 0| 100| 72700|0.00000897| WEAK diehard_birthdays| 0| 100| 72800|0.00000863| WEAK diehard_birthdays| 0| 100| 72900|0.00000862| WEAK diehard_birthdays| 0| 100| 73000|0.00000829| WEAK diehard_birthdays| 0| 100| 73100|0.00000662| WEAK diehard_birthdays| 0| 100| 73200|0.00000570| WEAK diehard_birthdays| 0| 100| 73300|0.00000548| WEAK diehard_birthdays| 0| 100| 73400|0.00000507| WEAK diehard_birthdays| 0| 100| 73500|0.00000347| WEAK diehard_birthdays| 0| 100| 73600|0.00000374| WEAK diehard_birthdays| 0| 100| 73700|0.00000297| WEAK diehard_birthdays| 0| 100| 73800|0.00000333| WEAK diehard_birthdays| 0| 100| 73900|0.00000320| WEAK diehard_birthdays| 0| 100| 74000|0.00000401| WEAK diehard_birthdays| 0| 100| 74100|0.00000416| WEAK diehard_birthdays| 0| 100| 74200|0.00000385| WEAK diehard_birthdays| 0| 100| 74300|0.00000244| WEAK diehard_birthdays| 0| 100| 74400|0.00000193| WEAK diehard_birthdays| 0| 100| 74500|0.00000216| WEAK diehard_birthdays| 0| 100| 74600|0.00000153| WEAK diehard_birthdays| 0| 100| 74700|0.00000116| WEAK diehard_birthdays| 0| 100| 74800|0.00000116| WEAK diehard_birthdays| 0| 100| 74900|0.00000088| FAILED diehard_operm5| 5| 1000000| 100|0.34982051| PASSED diehard_operm5| 5| 1000000| 200|0.11886916| PASSED diehard_operm5| 5| 1000000| 300|0.00869538| PASSED diehard_operm5| 5| 1000000| 400|0.00014955| WEAK diehard_operm5| 5| 1000000| 500|0.00015284| WEAK diehard_operm5| 5| 1000000| 600|0.00001372| WEAK diehard_operm5| 5| 1000000| 700|0.00000010| FAILED diehard_rank_32x32| 0| 40000| 100|0.44405493| PASSED diehard_rank_32x32| 0| 40000| 200|0.49238071| PASSED diehard_rank_32x32| 0| 40000| 300|0.75929386| PASSED diehard_rank_32x32| 0| 40000| 400|0.59248578| PASSED diehard_rank_32x32| 0| 40000| 500|0.72620652| PASSED diehard_rank_32x32| 0| 40000| 600|0.79009437| PASSED diehard_rank_32x32| 0| 40000| 700|0.75800808| PASSED diehard_rank_32x32| 0| 40000| 800|0.91478289| PASSED diehard_rank_32x32| 0| 40000| 900|0.71306957| PASSED diehard_rank_32x32| 0| 40000| 1000|0.76441771| PASSED diehard_rank_32x32| 0| 40000| 1100|0.69013285| PASSED diehard_rank_32x32| 0| 40000| 1200|0.41358611| PASSED diehard_rank_32x32| 0| 40000| 1300|0.41040474| PASSED diehard_rank_32x32| 0| 40000| 1400|0.55544769| PASSED diehard_rank_32x32| 0| 40000| 1500|0.44433929| PASSED diehard_rank_32x32| 0| 40000| 1600|0.32260321| PASSED diehard_rank_32x32| 0| 40000| 1700|0.55706654| PASSED diehard_rank_32x32| 0| 40000| 1800|0.45895439| PASSED diehard_rank_32x32| 0| 40000| 1900|0.47197983| PASSED diehard_rank_32x32| 0| 40000| 2000|0.39774702| PASSED diehard_rank_32x32| 0| 40000| 2100|0.37099583| PASSED diehard_rank_32x32| 0| 40000| 2200|0.49493993| PASSED diehard_rank_32x32| 0| 40000| 2300|0.42190464| PASSED diehard_rank_32x32| 0| 40000| 2400|0.32692465| PASSED diehard_rank_32x32| 0| 40000| 2500|0.27097688| PASSED diehard_rank_32x32| 0| 40000| 2600|0.13312993| PASSED diehard_rank_32x32| 0| 40000| 2700|0.18410806| PASSED diehard_rank_32x32| 0| 40000| 2800|0.22781451| PASSED diehard_rank_32x32| 0| 40000| 2900|0.20397599| PASSED diehard_rank_32x32| 0| 40000| 3000|0.07687743| PASSED diehard_rank_32x32| 0| 40000| 3100|0.07523009| PASSED diehard_rank_32x32| 0| 40000| 3200|0.08048467| PASSED diehard_rank_32x32| 0| 40000| 3300|0.12648230| PASSED diehard_rank_32x32| 0| 40000| 3400|0.16066270| PASSED diehard_rank_32x32| 0| 40000| 3500|0.17101767| PASSED diehard_rank_32x32| 0| 40000| 3600|0.15631523| PASSED diehard_rank_32x32| 0| 40000| 3700|0.08516646| PASSED diehard_rank_32x32| 0| 40000| 3800|0.11912012| PASSED diehard_rank_32x32| 0| 40000| 3900|0.22056697| PASSED diehard_rank_32x32| 0| 40000| 4000|0.19939734| PASSED diehard_rank_32x32| 0| 40000| 4100|0.19282076| PASSED diehard_rank_32x32| 0| 40000| 4200|0.14146430| PASSED diehard_rank_32x32| 0| 40000| 4300|0.10250139| PASSED diehard_rank_32x32| 0| 40000| 4400|0.19864229| PASSED diehard_rank_32x32| 0| 40000| 4500|0.27767730| PASSED diehard_rank_32x32| 0| 40000| 4600|0.19758286| PASSED diehard_rank_32x32| 0| 40000| 4700|0.19081925| PASSED diehard_rank_32x32| 0| 40000| 4800|0.16221975| PASSED diehard_rank_32x32| 0| 40000| 4900|0.13423544| PASSED diehard_rank_32x32| 0| 40000| 5000|0.24224148| PASSED diehard_rank_32x32| 0| 40000| 5100|0.17361849| PASSED diehard_rank_32x32| 0| 40000| 5200|0.22640113| PASSED diehard_rank_32x32| 0| 40000| 5300|0.28904742| PASSED diehard_rank_32x32| 0| 40000| 5400|0.23701653| PASSED diehard_rank_32x32| 0| 40000| 5500|0.24217835| PASSED diehard_rank_32x32| 0| 40000| 5600|0.22854467| PASSED diehard_rank_32x32| 0| 40000| 5700|0.22166655| PASSED diehard_rank_32x32| 0| 40000| 5800|0.20237474| PASSED diehard_rank_32x32| 0| 40000| 5900|0.22676286| PASSED diehard_rank_32x32| 0| 40000| 6000|0.21540594| PASSED diehard_rank_32x32| 0| 40000| 6100|0.17317005| PASSED diehard_rank_32x32| 0| 40000| 6200|0.18028845| PASSED diehard_rank_32x32| 0| 40000| 6300|0.23642317| PASSED diehard_rank_32x32| 0| 40000| 6400|0.20216637| PASSED diehard_rank_32x32| 0| 40000| 6500|0.24380750| PASSED diehard_rank_32x32| 0| 40000| 6600|0.16986476| PASSED diehard_rank_32x32| 0| 40000| 6700|0.11538366| PASSED diehard_rank_32x32| 0| 40000| 6800|0.13833117| PASSED diehard_rank_32x32| 0| 40000| 6900|0.17318002| PASSED diehard_rank_32x32| 0| 40000| 7000|0.20348859| PASSED diehard_rank_32x32| 0| 40000| 7100|0.23629195| PASSED diehard_rank_32x32| 0| 40000| 7200|0.25979592| PASSED diehard_rank_32x32| 0| 40000| 7300|0.29781801| PASSED diehard_rank_32x32| 0| 40000| 7400|0.20337447| PASSED diehard_rank_32x32| 0| 40000| 7500|0.20323956| PASSED diehard_rank_32x32| 0| 40000| 7600|0.22371420| PASSED diehard_rank_32x32| 0| 40000| 7700|0.19316673| PASSED diehard_rank_32x32| 0| 40000| 7800|0.29318148| PASSED diehard_rank_32x32| 0| 40000| 7900|0.24418049| PASSED diehard_rank_32x32| 0| 40000| 8000|0.25485076| PASSED diehard_rank_32x32| 0| 40000| 8100|0.27765824| PASSED diehard_rank_32x32| 0| 40000| 8200|0.40061998| PASSED diehard_rank_32x32| 0| 40000| 8300|0.39846827| PASSED diehard_rank_32x32| 0| 40000| 8400|0.34203720| PASSED diehard_rank_32x32| 0| 40000| 8500|0.28802346| PASSED diehard_rank_32x32| 0| 40000| 8600|0.23908351| PASSED diehard_rank_32x32| 0| 40000| 8700|0.19109223| PASSED diehard_rank_32x32| 0| 40000| 8800|0.15012655| PASSED diehard_rank_32x32| 0| 40000| 8900|0.18080099| PASSED diehard_rank_32x32| 0| 40000| 9000|0.24592781| PASSED diehard_rank_32x32| 0| 40000| 9100|0.17915480| PASSED diehard_rank_32x32| 0| 40000| 9200|0.21339149| PASSED diehard_rank_32x32| 0| 40000| 9300|0.18569168| PASSED diehard_rank_32x32| 0| 40000| 9400|0.23004501| PASSED diehard_rank_32x32| 0| 40000| 9500|0.21907364| PASSED diehard_rank_32x32| 0| 40000| 9600|0.17481153| PASSED diehard_rank_32x32| 0| 40000| 9700|0.12575134| PASSED diehard_rank_32x32| 0| 40000| 9800|0.20613943| PASSED diehard_rank_32x32| 0| 40000| 9900|0.15214385| PASSED diehard_rank_32x32| 0| 40000| 10000|0.21713219| PASSED diehard_rank_32x32| 0| 40000| 10100|0.21766278| PASSED diehard_rank_32x32| 0| 40000| 10200|0.23673479| PASSED diehard_rank_32x32| 0| 40000| 10300|0.36078185| PASSED diehard_rank_32x32| 0| 40000| 10400|0.41411831| PASSED diehard_rank_32x32| 0| 40000| 10500|0.37295920| PASSED diehard_rank_32x32| 0| 40000| 10600|0.38561650| PASSED diehard_rank_32x32| 0| 40000| 10700|0.45443564| PASSED diehard_rank_32x32| 0| 40000| 10800|0.34633156| PASSED diehard_rank_32x32| 0| 40000| 10900|0.33349609| PASSED diehard_rank_32x32| 0| 40000| 11000|0.28592631| PASSED diehard_rank_32x32| 0| 40000| 11100|0.27353444| PASSED diehard_rank_32x32| 0| 40000| 11200|0.27868713| PASSED diehard_rank_32x32| 0| 40000| 11300|0.21723123| PASSED diehard_rank_32x32| 0| 40000| 11400|0.23054331| PASSED diehard_rank_32x32| 0| 40000| 11500|0.32729204| PASSED ./dieharder/configure.ac0000664000175000017500000000136713707046103013514 0ustar eddedd# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_CONFIG_SRCDIR([run_diehard_dna.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([-Wall]) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL # Checks for libraries. AC_CHECK_LIB([gslcblas], [cblas_ddot]) AC_CHECK_LIB([gsl], [gsl_error]) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([limits.h stdlib.h string.h sys/time.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME # Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_MALLOC AC_FUNC_STRTOD AC_CHECK_FUNCS([sqrt strtol]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT ./dieharder/Makefile.in0000664000175000017500000020104613707054533013275 0ustar eddedd# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 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@ #======================================================================== # This is a Makefile for the dieharder tty application, part of the # overall dieharder package. It has a very abbreviated set of targets. # # make alone should build the application. # # make clean deletes the application and all object files # make install installs application and a man page # make printout prints out all source and include files # # These two commands execute in the toplevel project directory only. # make svn does a svn commit and creates the timestamp $(SVN) # make sync does a svn commit and rsyncs to list of hosts #======================================================================== VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dieharder$(EXEEXT) subdir = dieharder ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_dieharder_OBJECTS = dieharder-add_ui_rngs.$(OBJEXT) \ dieharder-add_ui_tests.$(OBJEXT) \ dieharder-choose_rng.$(OBJEXT) dieharder-dieharder.$(OBJEXT) \ dieharder-dieharder_exit.$(OBJEXT) dieharder-help.$(OBJEXT) \ dieharder-list_rngs.$(OBJEXT) dieharder-list_tests.$(OBJEXT) \ dieharder-output.$(OBJEXT) dieharder-output_rnds.$(OBJEXT) \ dieharder-parsecl.$(OBJEXT) dieharder-rdieharder.$(OBJEXT) \ dieharder-run_all_tests.$(OBJEXT) dieharder-run_test.$(OBJEXT) \ dieharder-set_globals.$(OBJEXT) dieharder-testbits.$(OBJEXT) \ dieharder-time_rng.$(OBJEXT) dieharder-user_template.$(OBJEXT) \ dieharder-globals.$(OBJEXT) dieharder_OBJECTS = $(am_dieharder_OBJECTS) dieharder_DEPENDENCIES = ../libdieharder/libdieharder.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = dieharder_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dieharder_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/dieharder-add_ui_rngs.Po \ ./$(DEPDIR)/dieharder-add_ui_tests.Po \ ./$(DEPDIR)/dieharder-choose_rng.Po \ ./$(DEPDIR)/dieharder-dieharder.Po \ ./$(DEPDIR)/dieharder-dieharder_exit.Po \ ./$(DEPDIR)/dieharder-globals.Po ./$(DEPDIR)/dieharder-help.Po \ ./$(DEPDIR)/dieharder-list_rngs.Po \ ./$(DEPDIR)/dieharder-list_tests.Po \ ./$(DEPDIR)/dieharder-output.Po \ ./$(DEPDIR)/dieharder-output_rnds.Po \ ./$(DEPDIR)/dieharder-parsecl.Po \ ./$(DEPDIR)/dieharder-rdieharder.Po \ ./$(DEPDIR)/dieharder-run_all_tests.Po \ ./$(DEPDIR)/dieharder-run_test.Po \ ./$(DEPDIR)/dieharder-set_globals.Po \ ./$(DEPDIR)/dieharder-testbits.Po \ ./$(DEPDIR)/dieharder-time_rng.Po \ ./$(DEPDIR)/dieharder-user_template.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dieharder_SOURCES) DIST_SOURCES = $(dieharder_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man1_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs COPYING README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ACTAR = @ACTAR@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIEHARDER_CFLAGS = @DIEHARDER_CFLAGS@ DIEHARDER_LIBS = @DIEHARDER_LIBS@ DIEHARDER_LIB_VERSION = @DIEHARDER_LIB_VERSION@ DIEHARDER_LT_VERSION = @DIEHARDER_LT_VERSION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LITTLE_ENDIAN = @LITTLE_ENDIAN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ RELEASED = @RELEASED@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ # This is automagically set in the toplevel build. Do not edit by # hand. VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dieharder_CFLAGS = @dieharder_CFLAGS@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdieharder_lo_CFLAGS = @libdieharder_lo_CFLAGS@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ man1_MANS = dieharder.1 dieharder_LDADD = ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm dieharder_SOURCES = \ add_ui_rngs.c \ add_ui_tests.c \ choose_rng.c \ dieharder.c \ dieharder_exit.c \ help.c \ list_rngs.c \ list_tests.c \ output.c output.h \ output_rnds.c \ parsecl.c \ rdieharder.c \ run_all_tests.c \ run_test.c \ set_globals.c \ testbits.c \ time_rng.c \ user_template.c \ globals.c # rng_empty_random.c \ # run_rgb_bitdist.c # run_rgb_lagged_sums.c # run_rgb_minimum_distance.c # run_rgb_permutations.c # run_rgb_persist.c # run_rgb_timing.c DEFINES = -DVERSION=$(VERSION) #======================================================================== # Define parameters and directives needed in compile/link steps. #======================================================================== # C Compiler # CC = gcc # Compile flags (use fairly standard -O3 as default) AM_CPPFLAGS = -I ${top_srcdir}/include $(DEFINES) -I ${includedir} AM_CFLAGS = -O3 # Load flags (optional) # To build a completely static dieharder, uncomment the following line. # AM_LDFLAGS = -all-static AM_LDFLAGS = #======================================================================== # The only safe place to do svn commits is in the toplevel directory #======================================================================== SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/dieharder SVNTIME = dieharder.svn.time) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dieharder/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu dieharder/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list dieharder$(EXEEXT): $(dieharder_OBJECTS) $(dieharder_DEPENDENCIES) $(EXTRA_dieharder_DEPENDENCIES) @rm -f dieharder$(EXEEXT) $(AM_V_CCLD)$(dieharder_LINK) $(dieharder_OBJECTS) $(dieharder_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-add_ui_rngs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-add_ui_tests.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-choose_rng.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-dieharder.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-dieharder_exit.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-globals.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-help.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-list_rngs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-list_tests.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-output.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-output_rnds.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-parsecl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-rdieharder.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-run_all_tests.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-run_test.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-set_globals.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-testbits.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-time_rng.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dieharder-user_template.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< dieharder-add_ui_rngs.o: add_ui_rngs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-add_ui_rngs.o -MD -MP -MF $(DEPDIR)/dieharder-add_ui_rngs.Tpo -c -o dieharder-add_ui_rngs.o `test -f 'add_ui_rngs.c' || echo '$(srcdir)/'`add_ui_rngs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-add_ui_rngs.Tpo $(DEPDIR)/dieharder-add_ui_rngs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='add_ui_rngs.c' object='dieharder-add_ui_rngs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-add_ui_rngs.o `test -f 'add_ui_rngs.c' || echo '$(srcdir)/'`add_ui_rngs.c dieharder-add_ui_rngs.obj: add_ui_rngs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-add_ui_rngs.obj -MD -MP -MF $(DEPDIR)/dieharder-add_ui_rngs.Tpo -c -o dieharder-add_ui_rngs.obj `if test -f 'add_ui_rngs.c'; then $(CYGPATH_W) 'add_ui_rngs.c'; else $(CYGPATH_W) '$(srcdir)/add_ui_rngs.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-add_ui_rngs.Tpo $(DEPDIR)/dieharder-add_ui_rngs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='add_ui_rngs.c' object='dieharder-add_ui_rngs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-add_ui_rngs.obj `if test -f 'add_ui_rngs.c'; then $(CYGPATH_W) 'add_ui_rngs.c'; else $(CYGPATH_W) '$(srcdir)/add_ui_rngs.c'; fi` dieharder-add_ui_tests.o: add_ui_tests.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-add_ui_tests.o -MD -MP -MF $(DEPDIR)/dieharder-add_ui_tests.Tpo -c -o dieharder-add_ui_tests.o `test -f 'add_ui_tests.c' || echo '$(srcdir)/'`add_ui_tests.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-add_ui_tests.Tpo $(DEPDIR)/dieharder-add_ui_tests.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='add_ui_tests.c' object='dieharder-add_ui_tests.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-add_ui_tests.o `test -f 'add_ui_tests.c' || echo '$(srcdir)/'`add_ui_tests.c dieharder-add_ui_tests.obj: add_ui_tests.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-add_ui_tests.obj -MD -MP -MF $(DEPDIR)/dieharder-add_ui_tests.Tpo -c -o dieharder-add_ui_tests.obj `if test -f 'add_ui_tests.c'; then $(CYGPATH_W) 'add_ui_tests.c'; else $(CYGPATH_W) '$(srcdir)/add_ui_tests.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-add_ui_tests.Tpo $(DEPDIR)/dieharder-add_ui_tests.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='add_ui_tests.c' object='dieharder-add_ui_tests.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-add_ui_tests.obj `if test -f 'add_ui_tests.c'; then $(CYGPATH_W) 'add_ui_tests.c'; else $(CYGPATH_W) '$(srcdir)/add_ui_tests.c'; fi` dieharder-choose_rng.o: choose_rng.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-choose_rng.o -MD -MP -MF $(DEPDIR)/dieharder-choose_rng.Tpo -c -o dieharder-choose_rng.o `test -f 'choose_rng.c' || echo '$(srcdir)/'`choose_rng.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-choose_rng.Tpo $(DEPDIR)/dieharder-choose_rng.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='choose_rng.c' object='dieharder-choose_rng.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-choose_rng.o `test -f 'choose_rng.c' || echo '$(srcdir)/'`choose_rng.c dieharder-choose_rng.obj: choose_rng.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-choose_rng.obj -MD -MP -MF $(DEPDIR)/dieharder-choose_rng.Tpo -c -o dieharder-choose_rng.obj `if test -f 'choose_rng.c'; then $(CYGPATH_W) 'choose_rng.c'; else $(CYGPATH_W) '$(srcdir)/choose_rng.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-choose_rng.Tpo $(DEPDIR)/dieharder-choose_rng.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='choose_rng.c' object='dieharder-choose_rng.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-choose_rng.obj `if test -f 'choose_rng.c'; then $(CYGPATH_W) 'choose_rng.c'; else $(CYGPATH_W) '$(srcdir)/choose_rng.c'; fi` dieharder-dieharder.o: dieharder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-dieharder.o -MD -MP -MF $(DEPDIR)/dieharder-dieharder.Tpo -c -o dieharder-dieharder.o `test -f 'dieharder.c' || echo '$(srcdir)/'`dieharder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-dieharder.Tpo $(DEPDIR)/dieharder-dieharder.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dieharder.c' object='dieharder-dieharder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-dieharder.o `test -f 'dieharder.c' || echo '$(srcdir)/'`dieharder.c dieharder-dieharder.obj: dieharder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-dieharder.obj -MD -MP -MF $(DEPDIR)/dieharder-dieharder.Tpo -c -o dieharder-dieharder.obj `if test -f 'dieharder.c'; then $(CYGPATH_W) 'dieharder.c'; else $(CYGPATH_W) '$(srcdir)/dieharder.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-dieharder.Tpo $(DEPDIR)/dieharder-dieharder.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dieharder.c' object='dieharder-dieharder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-dieharder.obj `if test -f 'dieharder.c'; then $(CYGPATH_W) 'dieharder.c'; else $(CYGPATH_W) '$(srcdir)/dieharder.c'; fi` dieharder-dieharder_exit.o: dieharder_exit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-dieharder_exit.o -MD -MP -MF $(DEPDIR)/dieharder-dieharder_exit.Tpo -c -o dieharder-dieharder_exit.o `test -f 'dieharder_exit.c' || echo '$(srcdir)/'`dieharder_exit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-dieharder_exit.Tpo $(DEPDIR)/dieharder-dieharder_exit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dieharder_exit.c' object='dieharder-dieharder_exit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-dieharder_exit.o `test -f 'dieharder_exit.c' || echo '$(srcdir)/'`dieharder_exit.c dieharder-dieharder_exit.obj: dieharder_exit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-dieharder_exit.obj -MD -MP -MF $(DEPDIR)/dieharder-dieharder_exit.Tpo -c -o dieharder-dieharder_exit.obj `if test -f 'dieharder_exit.c'; then $(CYGPATH_W) 'dieharder_exit.c'; else $(CYGPATH_W) '$(srcdir)/dieharder_exit.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-dieharder_exit.Tpo $(DEPDIR)/dieharder-dieharder_exit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dieharder_exit.c' object='dieharder-dieharder_exit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-dieharder_exit.obj `if test -f 'dieharder_exit.c'; then $(CYGPATH_W) 'dieharder_exit.c'; else $(CYGPATH_W) '$(srcdir)/dieharder_exit.c'; fi` dieharder-help.o: help.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-help.o -MD -MP -MF $(DEPDIR)/dieharder-help.Tpo -c -o dieharder-help.o `test -f 'help.c' || echo '$(srcdir)/'`help.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-help.Tpo $(DEPDIR)/dieharder-help.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='help.c' object='dieharder-help.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-help.o `test -f 'help.c' || echo '$(srcdir)/'`help.c dieharder-help.obj: help.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-help.obj -MD -MP -MF $(DEPDIR)/dieharder-help.Tpo -c -o dieharder-help.obj `if test -f 'help.c'; then $(CYGPATH_W) 'help.c'; else $(CYGPATH_W) '$(srcdir)/help.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-help.Tpo $(DEPDIR)/dieharder-help.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='help.c' object='dieharder-help.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-help.obj `if test -f 'help.c'; then $(CYGPATH_W) 'help.c'; else $(CYGPATH_W) '$(srcdir)/help.c'; fi` dieharder-list_rngs.o: list_rngs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-list_rngs.o -MD -MP -MF $(DEPDIR)/dieharder-list_rngs.Tpo -c -o dieharder-list_rngs.o `test -f 'list_rngs.c' || echo '$(srcdir)/'`list_rngs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-list_rngs.Tpo $(DEPDIR)/dieharder-list_rngs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list_rngs.c' object='dieharder-list_rngs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-list_rngs.o `test -f 'list_rngs.c' || echo '$(srcdir)/'`list_rngs.c dieharder-list_rngs.obj: list_rngs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-list_rngs.obj -MD -MP -MF $(DEPDIR)/dieharder-list_rngs.Tpo -c -o dieharder-list_rngs.obj `if test -f 'list_rngs.c'; then $(CYGPATH_W) 'list_rngs.c'; else $(CYGPATH_W) '$(srcdir)/list_rngs.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-list_rngs.Tpo $(DEPDIR)/dieharder-list_rngs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list_rngs.c' object='dieharder-list_rngs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-list_rngs.obj `if test -f 'list_rngs.c'; then $(CYGPATH_W) 'list_rngs.c'; else $(CYGPATH_W) '$(srcdir)/list_rngs.c'; fi` dieharder-list_tests.o: list_tests.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-list_tests.o -MD -MP -MF $(DEPDIR)/dieharder-list_tests.Tpo -c -o dieharder-list_tests.o `test -f 'list_tests.c' || echo '$(srcdir)/'`list_tests.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-list_tests.Tpo $(DEPDIR)/dieharder-list_tests.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list_tests.c' object='dieharder-list_tests.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-list_tests.o `test -f 'list_tests.c' || echo '$(srcdir)/'`list_tests.c dieharder-list_tests.obj: list_tests.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-list_tests.obj -MD -MP -MF $(DEPDIR)/dieharder-list_tests.Tpo -c -o dieharder-list_tests.obj `if test -f 'list_tests.c'; then $(CYGPATH_W) 'list_tests.c'; else $(CYGPATH_W) '$(srcdir)/list_tests.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-list_tests.Tpo $(DEPDIR)/dieharder-list_tests.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list_tests.c' object='dieharder-list_tests.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-list_tests.obj `if test -f 'list_tests.c'; then $(CYGPATH_W) 'list_tests.c'; else $(CYGPATH_W) '$(srcdir)/list_tests.c'; fi` dieharder-output.o: output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-output.o -MD -MP -MF $(DEPDIR)/dieharder-output.Tpo -c -o dieharder-output.o `test -f 'output.c' || echo '$(srcdir)/'`output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-output.Tpo $(DEPDIR)/dieharder-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output.c' object='dieharder-output.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-output.o `test -f 'output.c' || echo '$(srcdir)/'`output.c dieharder-output.obj: output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-output.obj -MD -MP -MF $(DEPDIR)/dieharder-output.Tpo -c -o dieharder-output.obj `if test -f 'output.c'; then $(CYGPATH_W) 'output.c'; else $(CYGPATH_W) '$(srcdir)/output.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-output.Tpo $(DEPDIR)/dieharder-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output.c' object='dieharder-output.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-output.obj `if test -f 'output.c'; then $(CYGPATH_W) 'output.c'; else $(CYGPATH_W) '$(srcdir)/output.c'; fi` dieharder-output_rnds.o: output_rnds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-output_rnds.o -MD -MP -MF $(DEPDIR)/dieharder-output_rnds.Tpo -c -o dieharder-output_rnds.o `test -f 'output_rnds.c' || echo '$(srcdir)/'`output_rnds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-output_rnds.Tpo $(DEPDIR)/dieharder-output_rnds.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output_rnds.c' object='dieharder-output_rnds.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-output_rnds.o `test -f 'output_rnds.c' || echo '$(srcdir)/'`output_rnds.c dieharder-output_rnds.obj: output_rnds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-output_rnds.obj -MD -MP -MF $(DEPDIR)/dieharder-output_rnds.Tpo -c -o dieharder-output_rnds.obj `if test -f 'output_rnds.c'; then $(CYGPATH_W) 'output_rnds.c'; else $(CYGPATH_W) '$(srcdir)/output_rnds.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-output_rnds.Tpo $(DEPDIR)/dieharder-output_rnds.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output_rnds.c' object='dieharder-output_rnds.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-output_rnds.obj `if test -f 'output_rnds.c'; then $(CYGPATH_W) 'output_rnds.c'; else $(CYGPATH_W) '$(srcdir)/output_rnds.c'; fi` dieharder-parsecl.o: parsecl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-parsecl.o -MD -MP -MF $(DEPDIR)/dieharder-parsecl.Tpo -c -o dieharder-parsecl.o `test -f 'parsecl.c' || echo '$(srcdir)/'`parsecl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-parsecl.Tpo $(DEPDIR)/dieharder-parsecl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsecl.c' object='dieharder-parsecl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-parsecl.o `test -f 'parsecl.c' || echo '$(srcdir)/'`parsecl.c dieharder-parsecl.obj: parsecl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-parsecl.obj -MD -MP -MF $(DEPDIR)/dieharder-parsecl.Tpo -c -o dieharder-parsecl.obj `if test -f 'parsecl.c'; then $(CYGPATH_W) 'parsecl.c'; else $(CYGPATH_W) '$(srcdir)/parsecl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-parsecl.Tpo $(DEPDIR)/dieharder-parsecl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsecl.c' object='dieharder-parsecl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-parsecl.obj `if test -f 'parsecl.c'; then $(CYGPATH_W) 'parsecl.c'; else $(CYGPATH_W) '$(srcdir)/parsecl.c'; fi` dieharder-rdieharder.o: rdieharder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-rdieharder.o -MD -MP -MF $(DEPDIR)/dieharder-rdieharder.Tpo -c -o dieharder-rdieharder.o `test -f 'rdieharder.c' || echo '$(srcdir)/'`rdieharder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-rdieharder.Tpo $(DEPDIR)/dieharder-rdieharder.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rdieharder.c' object='dieharder-rdieharder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-rdieharder.o `test -f 'rdieharder.c' || echo '$(srcdir)/'`rdieharder.c dieharder-rdieharder.obj: rdieharder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-rdieharder.obj -MD -MP -MF $(DEPDIR)/dieharder-rdieharder.Tpo -c -o dieharder-rdieharder.obj `if test -f 'rdieharder.c'; then $(CYGPATH_W) 'rdieharder.c'; else $(CYGPATH_W) '$(srcdir)/rdieharder.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-rdieharder.Tpo $(DEPDIR)/dieharder-rdieharder.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rdieharder.c' object='dieharder-rdieharder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-rdieharder.obj `if test -f 'rdieharder.c'; then $(CYGPATH_W) 'rdieharder.c'; else $(CYGPATH_W) '$(srcdir)/rdieharder.c'; fi` dieharder-run_all_tests.o: run_all_tests.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-run_all_tests.o -MD -MP -MF $(DEPDIR)/dieharder-run_all_tests.Tpo -c -o dieharder-run_all_tests.o `test -f 'run_all_tests.c' || echo '$(srcdir)/'`run_all_tests.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-run_all_tests.Tpo $(DEPDIR)/dieharder-run_all_tests.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run_all_tests.c' object='dieharder-run_all_tests.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-run_all_tests.o `test -f 'run_all_tests.c' || echo '$(srcdir)/'`run_all_tests.c dieharder-run_all_tests.obj: run_all_tests.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-run_all_tests.obj -MD -MP -MF $(DEPDIR)/dieharder-run_all_tests.Tpo -c -o dieharder-run_all_tests.obj `if test -f 'run_all_tests.c'; then $(CYGPATH_W) 'run_all_tests.c'; else $(CYGPATH_W) '$(srcdir)/run_all_tests.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-run_all_tests.Tpo $(DEPDIR)/dieharder-run_all_tests.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run_all_tests.c' object='dieharder-run_all_tests.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-run_all_tests.obj `if test -f 'run_all_tests.c'; then $(CYGPATH_W) 'run_all_tests.c'; else $(CYGPATH_W) '$(srcdir)/run_all_tests.c'; fi` dieharder-run_test.o: run_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-run_test.o -MD -MP -MF $(DEPDIR)/dieharder-run_test.Tpo -c -o dieharder-run_test.o `test -f 'run_test.c' || echo '$(srcdir)/'`run_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-run_test.Tpo $(DEPDIR)/dieharder-run_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run_test.c' object='dieharder-run_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-run_test.o `test -f 'run_test.c' || echo '$(srcdir)/'`run_test.c dieharder-run_test.obj: run_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-run_test.obj -MD -MP -MF $(DEPDIR)/dieharder-run_test.Tpo -c -o dieharder-run_test.obj `if test -f 'run_test.c'; then $(CYGPATH_W) 'run_test.c'; else $(CYGPATH_W) '$(srcdir)/run_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-run_test.Tpo $(DEPDIR)/dieharder-run_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run_test.c' object='dieharder-run_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-run_test.obj `if test -f 'run_test.c'; then $(CYGPATH_W) 'run_test.c'; else $(CYGPATH_W) '$(srcdir)/run_test.c'; fi` dieharder-set_globals.o: set_globals.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-set_globals.o -MD -MP -MF $(DEPDIR)/dieharder-set_globals.Tpo -c -o dieharder-set_globals.o `test -f 'set_globals.c' || echo '$(srcdir)/'`set_globals.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-set_globals.Tpo $(DEPDIR)/dieharder-set_globals.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='set_globals.c' object='dieharder-set_globals.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-set_globals.o `test -f 'set_globals.c' || echo '$(srcdir)/'`set_globals.c dieharder-set_globals.obj: set_globals.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-set_globals.obj -MD -MP -MF $(DEPDIR)/dieharder-set_globals.Tpo -c -o dieharder-set_globals.obj `if test -f 'set_globals.c'; then $(CYGPATH_W) 'set_globals.c'; else $(CYGPATH_W) '$(srcdir)/set_globals.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-set_globals.Tpo $(DEPDIR)/dieharder-set_globals.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='set_globals.c' object='dieharder-set_globals.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-set_globals.obj `if test -f 'set_globals.c'; then $(CYGPATH_W) 'set_globals.c'; else $(CYGPATH_W) '$(srcdir)/set_globals.c'; fi` dieharder-testbits.o: testbits.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-testbits.o -MD -MP -MF $(DEPDIR)/dieharder-testbits.Tpo -c -o dieharder-testbits.o `test -f 'testbits.c' || echo '$(srcdir)/'`testbits.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-testbits.Tpo $(DEPDIR)/dieharder-testbits.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testbits.c' object='dieharder-testbits.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-testbits.o `test -f 'testbits.c' || echo '$(srcdir)/'`testbits.c dieharder-testbits.obj: testbits.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-testbits.obj -MD -MP -MF $(DEPDIR)/dieharder-testbits.Tpo -c -o dieharder-testbits.obj `if test -f 'testbits.c'; then $(CYGPATH_W) 'testbits.c'; else $(CYGPATH_W) '$(srcdir)/testbits.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-testbits.Tpo $(DEPDIR)/dieharder-testbits.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testbits.c' object='dieharder-testbits.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-testbits.obj `if test -f 'testbits.c'; then $(CYGPATH_W) 'testbits.c'; else $(CYGPATH_W) '$(srcdir)/testbits.c'; fi` dieharder-time_rng.o: time_rng.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-time_rng.o -MD -MP -MF $(DEPDIR)/dieharder-time_rng.Tpo -c -o dieharder-time_rng.o `test -f 'time_rng.c' || echo '$(srcdir)/'`time_rng.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-time_rng.Tpo $(DEPDIR)/dieharder-time_rng.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='time_rng.c' object='dieharder-time_rng.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-time_rng.o `test -f 'time_rng.c' || echo '$(srcdir)/'`time_rng.c dieharder-time_rng.obj: time_rng.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-time_rng.obj -MD -MP -MF $(DEPDIR)/dieharder-time_rng.Tpo -c -o dieharder-time_rng.obj `if test -f 'time_rng.c'; then $(CYGPATH_W) 'time_rng.c'; else $(CYGPATH_W) '$(srcdir)/time_rng.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-time_rng.Tpo $(DEPDIR)/dieharder-time_rng.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='time_rng.c' object='dieharder-time_rng.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-time_rng.obj `if test -f 'time_rng.c'; then $(CYGPATH_W) 'time_rng.c'; else $(CYGPATH_W) '$(srcdir)/time_rng.c'; fi` dieharder-user_template.o: user_template.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-user_template.o -MD -MP -MF $(DEPDIR)/dieharder-user_template.Tpo -c -o dieharder-user_template.o `test -f 'user_template.c' || echo '$(srcdir)/'`user_template.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-user_template.Tpo $(DEPDIR)/dieharder-user_template.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='user_template.c' object='dieharder-user_template.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-user_template.o `test -f 'user_template.c' || echo '$(srcdir)/'`user_template.c dieharder-user_template.obj: user_template.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-user_template.obj -MD -MP -MF $(DEPDIR)/dieharder-user_template.Tpo -c -o dieharder-user_template.obj `if test -f 'user_template.c'; then $(CYGPATH_W) 'user_template.c'; else $(CYGPATH_W) '$(srcdir)/user_template.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-user_template.Tpo $(DEPDIR)/dieharder-user_template.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='user_template.c' object='dieharder-user_template.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-user_template.obj `if test -f 'user_template.c'; then $(CYGPATH_W) 'user_template.c'; else $(CYGPATH_W) '$(srcdir)/user_template.c'; fi` dieharder-globals.o: globals.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-globals.o -MD -MP -MF $(DEPDIR)/dieharder-globals.Tpo -c -o dieharder-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-globals.Tpo $(DEPDIR)/dieharder-globals.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='globals.c' object='dieharder-globals.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c dieharder-globals.obj: globals.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -MT dieharder-globals.obj -MD -MP -MF $(DEPDIR)/dieharder-globals.Tpo -c -o dieharder-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dieharder-globals.Tpo $(DEPDIR)/dieharder-globals.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='globals.c' object='dieharder-globals.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dieharder_CFLAGS) $(CFLAGS) -c -o dieharder-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man1_MANS) @$(NORMAL_INSTALL) @list1='$(man1_MANS)'; \ list2=''; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/dieharder-add_ui_rngs.Po -rm -f ./$(DEPDIR)/dieharder-add_ui_tests.Po -rm -f ./$(DEPDIR)/dieharder-choose_rng.Po -rm -f ./$(DEPDIR)/dieharder-dieharder.Po -rm -f ./$(DEPDIR)/dieharder-dieharder_exit.Po -rm -f ./$(DEPDIR)/dieharder-globals.Po -rm -f ./$(DEPDIR)/dieharder-help.Po -rm -f ./$(DEPDIR)/dieharder-list_rngs.Po -rm -f ./$(DEPDIR)/dieharder-list_tests.Po -rm -f ./$(DEPDIR)/dieharder-output.Po -rm -f ./$(DEPDIR)/dieharder-output_rnds.Po -rm -f ./$(DEPDIR)/dieharder-parsecl.Po -rm -f ./$(DEPDIR)/dieharder-rdieharder.Po -rm -f ./$(DEPDIR)/dieharder-run_all_tests.Po -rm -f ./$(DEPDIR)/dieharder-run_test.Po -rm -f ./$(DEPDIR)/dieharder-set_globals.Po -rm -f ./$(DEPDIR)/dieharder-testbits.Po -rm -f ./$(DEPDIR)/dieharder-time_rng.Po -rm -f ./$(DEPDIR)/dieharder-user_template.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/dieharder-add_ui_rngs.Po -rm -f ./$(DEPDIR)/dieharder-add_ui_tests.Po -rm -f ./$(DEPDIR)/dieharder-choose_rng.Po -rm -f ./$(DEPDIR)/dieharder-dieharder.Po -rm -f ./$(DEPDIR)/dieharder-dieharder_exit.Po -rm -f ./$(DEPDIR)/dieharder-globals.Po -rm -f ./$(DEPDIR)/dieharder-help.Po -rm -f ./$(DEPDIR)/dieharder-list_rngs.Po -rm -f ./$(DEPDIR)/dieharder-list_tests.Po -rm -f ./$(DEPDIR)/dieharder-output.Po -rm -f ./$(DEPDIR)/dieharder-output_rnds.Po -rm -f ./$(DEPDIR)/dieharder-parsecl.Po -rm -f ./$(DEPDIR)/dieharder-rdieharder.Po -rm -f ./$(DEPDIR)/dieharder-run_all_tests.Po -rm -f ./$(DEPDIR)/dieharder-run_test.Po -rm -f ./$(DEPDIR)/dieharder-set_globals.Po -rm -f ./$(DEPDIR)/dieharder-testbits.Po -rm -f ./$(DEPDIR)/dieharder-time_rng.Po -rm -f ./$(DEPDIR)/dieharder-user_template.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 .PRECIOUS: Makefile svn: (cd ..;make svn) sync: (cd ..;make sync) # 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: ./dieharder/validation_3.28.0beta0000664000175000017500000002126613707046103014747 0ustar eddedd#=============================================================================# # dieharder version 3.28.0beta Copyright 2003 Robert G. Brown # #=============================================================================# rng | mt19937 rnd/sec | 1.17e+08 #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment| Seed #=============================================================================# diehard_birthdays| 0| 100| 100|0.15715149| PASSED | 1 diehard_operm5| 5| 1000000| 100|0.00759235| PASSED | 1 diehard_rank_32x32| 0| 40000| 100|0.90226919| PASSED | 1 diehard_rank_6x8| 0| 100000| 100|0.95847435| PASSED | 1 diehard_bitstream| 0| 2097152| 100|0.82676859| PASSED | 1 diehard_opso| 0| 2097152| 100|0.53590315| PASSED | 1 diehard_oqso| 0| 2097152| 100|0.58444943| PASSED | 1 diehard_dna| 0| 2097152| 100|0.02425747| PASSED | 1 diehard_count_1s_str| 0| 256000| 100|0.06910723| PASSED | 1 diehard_count_1s_byt| 0| 256000| 100|0.71744844| PASSED | 1 diehard_parking_lot| 0| 12000| 100|0.96229583| PASSED | 1 diehard_2dsphere| 2| 8000| 100|0.79117306| PASSED | 1 diehard_3dsphere| 3| 4000| 100|0.85054185| PASSED | 1 diehard_squeeze| 0| 100000| 100|0.03169980| PASSED | 1 diehard_sums| 0| 100| 100|0.69865003| PASSED | 1 diehard_runs| 0| 100000| 100|0.27731718| PASSED | 1 diehard_runs| 0| 100000| 100|0.71264752| PASSED | 1 diehard_craps| 0| 200000| 100|0.70280675| PASSED | 1 diehard_craps| 0| 200000| 100|0.95642209| PASSED | 1 marsaglia_tsang_gcd| 0| 10000000| 100|0.41080008| PASSED | 1 marsaglia_tsang_gcd| 0| 10000000| 100|0.28272258| PASSED | 1 sts_monobit| 1| 100000| 100|0.37492522| PASSED | 1 sts_runs| 2| 100000| 100|0.98073139| PASSED | 1 sts_serial| 1| 100000| 100|0.37492522| PASSED | 1 sts_serial| 2| 100000| 100|0.56463696| PASSED | 1 sts_serial| 3| 100000| 100|0.56345124| PASSED | 1 sts_serial| 3| 100000| 100|0.26174478| PASSED | 1 sts_serial| 4| 100000| 100|0.98452111| PASSED | 1 sts_serial| 4| 100000| 100|0.30950723| PASSED | 1 sts_serial| 5| 100000| 100|0.99291681| PASSED | 1 sts_serial| 5| 100000| 100|0.69425044| PASSED | 1 sts_serial| 6| 100000| 100|0.97340785| PASSED | 1 sts_serial| 6| 100000| 100|0.93926614| PASSED | 1 sts_serial| 7| 100000| 100|0.95052530| PASSED | 1 sts_serial| 7| 100000| 100|0.17014535| PASSED | 1 sts_serial| 8| 100000| 100|0.99492376| PASSED | 1 sts_serial| 8| 100000| 100|0.89721230| PASSED | 1 sts_serial| 9| 100000| 100|0.07113271| PASSED | 1 sts_serial| 9| 100000| 100|0.92488259| PASSED | 1 sts_serial| 10| 100000| 100|0.99675655| WEAK | 1 sts_serial| 10| 100000| 100|0.63362163| PASSED | 1 sts_serial| 11| 100000| 100|0.96014233| PASSED | 1 sts_serial| 11| 100000| 100|0.53457404| PASSED | 1 sts_serial| 12| 100000| 100|0.90873702| PASSED | 1 sts_serial| 12| 100000| 100|0.93335880| PASSED | 1 sts_serial| 13| 100000| 100|0.34422261| PASSED | 1 sts_serial| 13| 100000| 100|0.75004304| PASSED | 1 sts_serial| 14| 100000| 100|0.65549068| PASSED | 1 sts_serial| 14| 100000| 100|0.99936006| WEAK | 1 sts_serial| 15| 100000| 100|0.99945651| WEAK | 1 sts_serial| 15| 100000| 100|0.86706726| PASSED | 1 sts_serial| 16| 100000| 100|0.65033686| PASSED | 1 sts_serial| 16| 100000| 100|0.79046129| PASSED | 1 rgb_bitdist| 1| 100000| 100|0.21407965| PASSED | 1 rgb_bitdist| 2| 100000| 100|0.84810539| PASSED | 1 rgb_bitdist| 3| 100000| 100|0.61603723| PASSED | 1 rgb_bitdist| 4| 100000| 100|0.89714516| PASSED | 1 rgb_bitdist| 5| 100000| 100|0.50045403| PASSED | 1 rgb_bitdist| 6| 100000| 100|0.77761402| PASSED | 1 rgb_bitdist| 7| 100000| 100|0.68876051| PASSED | 1 rgb_bitdist| 8| 100000| 100|0.67120710| PASSED | 1 rgb_bitdist| 9| 100000| 100|0.82821950| PASSED | 1 rgb_bitdist| 10| 100000| 100|0.53003452| PASSED | 1 rgb_bitdist| 11| 100000| 100|0.71380287| PASSED | 1 rgb_bitdist| 12| 100000| 100|0.00741540| PASSED | 1 rgb_minimum_distance| 2| 10000| 1000|0.78068807| PASSED | 1 rgb_minimum_distance| 3| 10000| 1000|0.94989674| PASSED | 1 rgb_minimum_distance| 4| 10000| 1000|0.65419383| PASSED | 1 rgb_minimum_distance| 5| 10000| 1000|0.10225918| PASSED | 1 rgb_permutations| 2| 100000| 100|0.57155265| PASSED | 1 rgb_permutations| 3| 100000| 100|0.99115707| PASSED | 1 rgb_permutations| 4| 100000| 100|0.39832349| PASSED | 1 rgb_permutations| 5| 100000| 100|0.34871958| PASSED | 1 rgb_lagged_sum| 0| 1000000| 100|0.42808468| PASSED | 1 rgb_lagged_sum| 1| 1000000| 100|0.30926670| PASSED | 1 rgb_lagged_sum| 2| 1000000| 100|0.64933673| PASSED | 1 rgb_lagged_sum| 3| 1000000| 100|0.35886120| PASSED | 1 rgb_lagged_sum| 4| 1000000| 100|0.31841063| PASSED | 1 rgb_lagged_sum| 5| 1000000| 100|0.96579157| PASSED | 1 rgb_lagged_sum| 6| 1000000| 100|0.96805617| PASSED | 1 rgb_lagged_sum| 7| 1000000| 100|0.72674708| PASSED | 1 rgb_lagged_sum| 8| 1000000| 100|0.82605643| PASSED | 1 rgb_lagged_sum| 9| 1000000| 100|0.37783860| PASSED | 1 rgb_lagged_sum| 10| 1000000| 100|0.05901046| PASSED | 1 rgb_lagged_sum| 11| 1000000| 100|0.90358730| PASSED | 1 rgb_lagged_sum| 12| 1000000| 100|0.85094866| PASSED | 1 rgb_lagged_sum| 13| 1000000| 100|0.86259306| PASSED | 1 rgb_lagged_sum| 14| 1000000| 100|0.99099387| PASSED | 1 rgb_lagged_sum| 15| 1000000| 100|0.05743862| PASSED | 1 rgb_lagged_sum| 16| 1000000| 100|0.60763736| PASSED | 1 rgb_lagged_sum| 17| 1000000| 100|0.99658962| WEAK | 1 rgb_lagged_sum| 18| 1000000| 100|0.10972990| PASSED | 1 rgb_lagged_sum| 19| 1000000| 100|0.99890682| WEAK | 1 rgb_lagged_sum| 20| 1000000| 100|0.84182363| PASSED | 1 rgb_lagged_sum| 21| 1000000| 100|0.76073540| PASSED | 1 rgb_lagged_sum| 22| 1000000| 100|0.67183877| PASSED | 1 rgb_lagged_sum| 23| 1000000| 100|0.77834314| PASSED | 1 rgb_lagged_sum| 24| 1000000| 100|0.90992614| PASSED | 1 rgb_lagged_sum| 25| 1000000| 100|0.81150807| PASSED | 1 rgb_lagged_sum| 26| 1000000| 100|0.02184165| PASSED | 1 rgb_lagged_sum| 27| 1000000| 100|0.39052769| PASSED | 1 rgb_lagged_sum| 28| 1000000| 100|0.71754705| PASSED | 1 rgb_lagged_sum| 29| 1000000| 100|0.95529188| PASSED | 1 rgb_lagged_sum| 30| 1000000| 100|0.99956498| FAILED | 1 rgb_lagged_sum| 31| 1000000| 100|0.43824483| PASSED | 1 rgb_lagged_sum| 32| 1000000| 100|0.68729637| PASSED | 1 ./dieharder/dieharder.h0000664000175000017500000000524313707057121013325 0ustar eddedd/* *======================================================================== * $Id: dieharder.h 529 2011-04-01 17:49:31Z rgbatduke $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include "copyright.h" /* To enable large file support */ #define _FILE_OFFSET_BITS 64 #include /* * Flags and variables to control all output formatting etc. tflag_default * is set in set_globals to a default to be used if -T 0 is selected. * tflag is otherwise accumulated from a series of -T FLAG calls, where * flag can be either numerical or a field/control name. table_separator * allows a user to pick their favorite field separator in the final output * table: a blank is easy to parse, a | is easy to read, a , is easy to * import into a spreadsheet (after filtering away e.g. # lines). We make * blank the default because it is hard to specify a blank on the CL but * easy to specify the others? */ extern unsigned int tflag,tflag_default; extern char table_separator; #include "output.h" /* * Variables to handle test selection. parsecl can EITHER be fed a * test number OR a test name; we have to sort that out when we * choose a test. */ extern int dtest_num; extern char dtest_name[128]; extern char generator_name[128]; /* * user_template sources are here, not in library */ #include "user_template.h" extern double rng_avg_time_nsec,rng_rands_per_second; extern double strategy; #ifdef RDIEHARDER Test **rdh_testptr; /* kludge: need a global to report back to R */ Dtest *rdh_dtestptr; /* kludge: need a global to report back to R */ #endif void list_rngs(); void list_tests(); void output_rnds(); void Exit(int); void time_rng(); void set_globals(); void choose_rng(); int execute_test(int); void run_all_tests(); void run_test(); void add_ui_rngs(); void parsecl(int argc, char **argv); void output(Dtest *dtest,Test **test); void show_test_header(Dtest *dtest,Test **test); void show_test_header_debug(Dtest *dtest,Test **test); void test_header(Dtest *dtest); void show_test_results(Dtest *dtest,Test **test); void show_test_results_debut(Dtest *dtest,Test **test); void test_footer(Dtest *dtest, double pvalue, double *pvalues); /* * List new rng types to be added in startup.c. Use "empty" or * libdieharder rng sources as template, uncomment/clone the lines that * add your own type(s) in startup.c. Consider sending "good" generators * that pass all or most tests or "classic" generators good or bad that * people might want to test back to me to include in libdieharder. */ GSL_VAR const gsl_rng_type *gsl_rng_empty_random; ./dieharder/output.c0000664000175000017500000004247214350422742012736 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include "dieharder.h" #if defined(RDIEHARDER) # include #endif void rdh_get_pvalues(Dtest *dtest,Test **test); void output_rng_info(); void output_table_line_header(); void output_table_line(Dtest *dtest,Test **test); int output_histogram(double *input,char *pvlabel,int inum,double min,double max,int nbins,char *label); void output(Dtest *dtest,Test **test) { /* * If this is rdieharder, skip all stdout or stderr entirely, period. * Run only Dirk's code to grab the pvalues and load them into * rdieharder memory to go back to R. Otherwise generate output in * whatever general form the user desires, either a table with user * control over fields via a binary flag variable or a "verbose * report" which shows the test description, the output pvalue histogram, * and sundry gingerbready stuff as well. Note that I should probably * simplify this still further and just have the table output line but * use flag bits to turn on and off even these elements of the output. */ #if defined(RDIEHARDER) rdh_get_pvalues(dtest,test); #else /* * Show the table header at most one time. */ static unsigned int firstcall = 1; if(firstcall){ /* * Output dieharder copyright/version information */ if(tflag & THEADER){ /* * This is actually a libdieharder call now! */ dh_header(); } /* * Next we output information about the random number generator * being tested, according to its flags. This is just one time, * on the first call. */ if(tflag & TSHOW_RNG){ output_rng_info(); } /* * The last thing we output "just one time" is the line header, * which has to match the actual selected output fields in the * table. Note that we move the header to follow the histogram * if histogram is on, as otherwise everything looks funny. */ if((tflag & TLINE_HEADER) && !(tflag & THISTOGRAM)){ output_table_line_header(); } firstcall = 0; } /* * This almost certainly belongs in the show_test_results section, * possibly with additional conditionals rejecting test results involving * rewinds, period. */ if(strncmp("file_input",gsl_rng_name(rng),10) == 0){ /* * This needs its own output flag and field. I'm losing it for now. if(!quiet){ fprintf(stdout,"# %u rands were used in this test\n",file_input_get_rtot(rng)); fflush(stdout); } */ if(file_input_get_rewind_cnt(rng) != 0){ fprintf(stderr,"# The file %s was rewound %u times\n",gsl_rng_name(rng),file_input_get_rewind_cnt(rng)); fflush(stderr); } } /* * Everything below is the output PER TEST. It cannot be skipped, * although I suppose it can be empty if no non-header output flags are * turned on. */ output_table_line(dtest,test); #endif } /* * This is ALMOST the single point of contact between rdh and dh. * dh/shared routines do most of the initialization and setup the * same between the two, a test is called the same way by the same * code, but rdh gets the FINAL pvalues and processes them further * within R; dh has to "report" them to e.g. stdout. On a normal, * error-free run the shared dh code should generate no output * whatsoever to keep rdh happy. */ #if defined(RDIEHARDER) void rdh_get_pvalues(Dtest *dtest,Test **test) { int i; if (rdh_dtestptr == NULL) { rdh_dtestptr = dtest; /* we use R_alloc as R will free this upon return; see R Extensions manual */ rdh_testptr = (Test **) R_alloc((size_t) dtest->nkps, sizeof(Test *)); for(i=0; inkps; i++) { rdh_testptr[i] = (Test *) R_alloc(1, sizeof(Test)); memcpy(rdh_testptr[i], test[i], sizeof(Test)); } } } #endif /* * This is just dieharder version/copyright information, #-delimited, * controlled by the THEADER bit in tflag. */ void output_rng_info() { if(tflag & TLINE_HEADER){ if(tflag & TPREFIX){ fprintf(stdout,"0%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s%c","rng_name",table_separator); } else { fprintf(stdout,"%15s%c","rng_name ",table_separator); } if(tflag & TNUM){ fprintf(stdout,"%3s%c","num",table_separator); } if(fromfile){ if(tflag & TNO_WHITE){ fprintf(stdout,"%s%c","filename",table_separator); } else { fprintf(stdout,"%32s%c","filename ",table_separator); } } if(tflag & TRATE){ fprintf(stdout,"%12s%c","rands/second",table_separator); } if(tflag & TSEED && strategy == 0 && !fromfile){ if(tflag & TNO_WHITE){ fprintf(stdout,"%s%c","Seed",table_separator); } else { fprintf(stdout,"%10s%c","Seed ",table_separator); } } fprintf(stdout,"\n"); } if(tflag & TPREFIX){ fprintf(stdout,"1%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s%c",gsl_rng_name(rng),table_separator); } else { fprintf(stdout,"%15s%c",gsl_rng_name(rng),table_separator); } if(tflag & TNUM){ if(tflag & TNO_WHITE){ fprintf(stdout,"%d%c",generator,table_separator); } else { fprintf(stdout,"%3d%c",generator,table_separator); } } if(fromfile){ if(tflag & TNO_WHITE){ fprintf(stdout,"%s%c",filename,table_separator); } else { fprintf(stdout,"%32s%c",filename,table_separator); } } if(tflag & TRATE){ if(tflag & TNO_WHITE){ fprintf(stdout,"%.2e%c",rng_rands_per_second,table_separator); } else { fprintf(stdout,"%10.2e %c",rng_rands_per_second,table_separator); } } if(tflag & TSEED && strategy == 0 && !fromfile){ if(tflag & TNO_WHITE){ fprintf(stdout,"%lu%c",seed,table_separator); } else { fprintf(stdout,"%10lu%c",seed,table_separator); } } fprintf(stdout,"\n"); fflush(stdout); } void output_table_line_header() { unsigned int field = 0; /* * We assemble the table header according to what tflag's value is. * If header is turned on, we also insert some pretty-printing * line separators. */ if(tflag & THEADER){ fprintf(stdout,"#=============================================================================#\n"); } if(tflag & TPREFIX){ fprintf(stdout,"0"); field++; } if(tflag & TTEST_NAME){ if(field){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s","test_name"); } else { fprintf(stdout,"%20s","test_name "); } field++; } if(tflag & TNUM){ if(field){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s","num"); } else { fprintf(stdout,"%s","num"); } field++; } if(tflag & TNTUPLE){ if(field){ fprintf(stdout,"%c",table_separator); } fprintf(stdout,"%4s","ntup"); field++; } if(tflag & TTSAMPLES){ if(field){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s","tsamples"); } else { fprintf(stdout,"%10s"," tsamples "); } field++; } if(tflag & TPSAMPLES){ if(field){ fprintf(stdout,"%c",table_separator); } fprintf(stdout,"%8s","psamples"); field++; } if(tflag & TPVALUES){ if(field){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s","p-value"); } else { fprintf(stdout,"%10s","p-value "); } field++; } if(tflag & TASSESSMENT){ if(field){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s","Assessment"); } else { fprintf(stdout,"%10s","Assessment"); } field++; } if(tflag & TSEED && strategy){ if(field){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s","Seed"); } else { fprintf(stdout,"%10s","Seed "); } field++; } fprintf(stdout,"\n"); if(tflag & THEADER){ fprintf(stdout,"#=============================================================================#\n"); } fflush(stdout); } /* * Print out all per-test results in a table format where users * can select table columns (fields) and can also select whether or * not to output one-per-test stuff or one-per-pvalue stuff like * the test description or pvalue histogram. */ void output_table_line(Dtest *dtest,Test **test) { unsigned int i; unsigned int field; /* * IF a user wants something like the old-style "report", they * can toggle on the per-test description and the per pvalue * pvalue histogram below. */ if(tflag & TDESCRIPTION){ fprintf(stdout,"%s",dtest->description); } /* * There may be more than one statistic (final p-value) generated by * this test; we loop over all of them. */ for(i=0;inkps;i++){ /* * Don't put a separator in slot for the first field, period. */ field = 0; /* * If a user wants a per-test histogram, here it is. Note that it * will probably be difficult to parse, but that won't matter as it * can trivially be turned off. */ if(tflag & THISTOGRAM){ output_histogram(test[i]->pvalues,test[i]->pvlabel,test[i]->psamples,0.0,1.0,10,"p-values"); if(tflag & TLINE_HEADER){ output_table_line_header(); } } /* * This must be first if it is turned on. */ if(tflag & TPREFIX){ fprintf(stdout,"2"); field++; } if(tflag & TTEST_NAME){ if(field != 0){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%s",dtest->sname); } else { fprintf(stdout,"%20.20s",dtest->sname); } field++; } if(tflag & TNUM){ if(field != 0){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%d",dtest_num); } else { fprintf(stdout,"%3d",dtest_num); } field++; } if(tflag & TNTUPLE){ if(field != 0){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%d",test[i]->ntuple); } else { fprintf(stdout,"%4d",test[i]->ntuple); } field++; } if(tflag & TTSAMPLES){ if(field != 0){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%u",test[0]->tsamples); } else { fprintf(stdout,"%10u",test[0]->tsamples); } field++; } if(tflag & TPSAMPLES){ if(field != 0){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%u",test[0]->psamples); } else { fprintf(stdout,"%8u",test[0]->psamples); } field++; } if(tflag & TPVALUES){ if(field != 0){ fprintf(stdout,"%c",table_separator); } fprintf(stdout,"%10.8f",test[i]->ks_pvalue); field++; } /* * Here is where dieharder sets is assessment. Note that the * assessment MUST be correctly interpreted. Basically, we set things * so that a test is judged weak if its final outcome pvalue occurs * less than 1% of the time symmetrically split on BOTH ends -- less * than 0.005 or greater than 0.995. Failure is a pvalue occurring * less than 0.1% of the time (<0.0005 or >0.9995). Weak results * SHOULD occur (therefore) one time in 100 on average or once every * run or two of dieharder -a. Failure should also be carefully * judged -- a rng SHOULD generate a pvalue that "fails" one time in * every 30 runs of dieharder -a. * * The point is that both of these WILL HAPPEN FROM TIME TO TIME and * NOT mean that the generator is "bad" or "weak". If a generator * shows up as "weak" on three results in one -a(ll) run, though, * quite frequently (as one tests different seeds) that's a problem! * In fact, it is failure! Just remember that p should be uniformly * distributed on [0,1), and so judging failure on any particular * range only makes sense if it occurs systematically, indicating that * p is NOT uniform on [0,1). */ if(tflag & TASSESSMENT){ if(field != 0){ fprintf(stdout,"%c",table_separator); } /* * I'm doing two sided testing, but not really anymore. At * least, if I'm going to do two sided testing I need to make * the Xtrategy code in run_test.c do matching two sided * testing as well. But for the moment, I think I'll just * leave in the high side weak/fail without kicking into * TTD/RA mode because it should be rare compared to normal * low-side failure in second order (at the kstest level) but * I could be wrong so why not flag it? * * I may change the WEAK call on the high side, though. That * will be triggered too often for comfort. */ if(test[i]->ks_pvalue < Xfail || test[i]->ks_pvalue > 1.0 - Xfail){ if(tflag & TNO_WHITE){ fprintf(stdout,"%s","FAILED"); } else { fprintf(stdout,"%10s","FAILED "); } } else if(test[i]->ks_pvalue < Xweak || test[i]->ks_pvalue > 1.0 - Xweak){ if(tflag & TNO_WHITE){ fprintf(stdout,"%s","WEAK"); } else { fprintf(stdout,"%10s","WEAK "); } } else { if(tflag & TNO_WHITE){ fprintf(stdout,"%s","PASSED"); } else { fprintf(stdout,"%10s","PASSED "); } } field++; } if(tflag & TSEED && strategy){ if(field != 0){ fprintf(stdout,"%c",table_separator); } if(tflag & TNO_WHITE){ fprintf(stdout,"%lu",seed); } else { fprintf(stdout,"%10lu",seed); } field++; } if(tflag & TPSAMPLE_VALS) { fprintf(stdout , "\n#=============================================================================#\n"); fprintf(stdout , "# Values of test p-values #\n"); fprintf(stdout , "#=============================================================================#\n"); size_t iter = 0; for(iter = 0 ; iter < test[i]->psamples ; ++iter) { fprintf(stdout, "%c%10.8f%c\n", table_separator, test[i]->pvalues[iter], table_separator); } fprintf(stdout , "#=============================================================================#\n"); } /* * No separator at the end, just EOL */ fprintf(stdout,"\n"); fflush(stdout); } } /* *======================================================================== * This code displays an ascii "*" histogram of the input e.g. p-value * vector. *======================================================================== */ int output_histogram(double *input,char *pvlabel,int inum,double min,double max,int nbins,char *label) { int i,j,hindex; unsigned int *bin,binmax; double binscale; unsigned int vscale; /* * This is where we put the binned count(s). Make and zero it */ bin = (unsigned int *)malloc(nbins*sizeof(unsigned int)); for(i=0;i= 20*vscale) { vscale++; /* printf("binmax = %u vscale = %u\n",binmax,vscale); */ } /* * Now we just display the histogram, which should be in range to * be displayed. */ for(i=20;i>0;i--){ if(i%2 == 0){ printf("# %5d|",i*vscale); } else { printf("# |"); } for(j=0;j= i*vscale ){ printf("****|"); } else { printf(" |"); } } printf("\n"); } printf("# |--------------------------------------------------\n"); printf("# |"); for(i=0;i Copyright (C) 19yy 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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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. ./dieharder/validate.sh0000775000175000017500000000076113707046103013353 0ustar eddedd#! /bin/sh # # This is the standard validation run for the current (3.x) working # snapshot of dieharder. I'm going to start keeping this and its output # in this directory under svn # Generic Tmpfile plus automagic cleanup. Tmpfile=$0.$$ trap 'rm $Tmpfile > /dev/null 2>&1; exit 0' 0 1 2 3 15 ./dieharder -g 206 -S 1 -s 1 -m 10 -a | tee $Tmpfile echo "Validating against standard validate.dat" diff validate.dat $Tmpfile echo "Done!" mv validate.dat validate.dat.old cp $Tmpfile validate.dat ./dieharder/Makefile.am0000664000175000017500000000530214350422742013255 0ustar eddedd#======================================================================== # This is a Makefile for the dieharder tty application, part of the # overall dieharder package. It has a very abbreviated set of targets. # # make alone should build the application. # # make clean deletes the application and all object files # make install installs application and a man page # make printout prints out all source and include files # # These two commands execute in the toplevel project directory only. # make svn does a svn commit and creates the timestamp $(SVN) # make sync does a svn commit and rsyncs to list of hosts #======================================================================== # This is automagically set in the toplevel build. Do not edit by # hand. VERSION=@VERSION@ #======================================================================== # Define all sources. Note that this little trick will get ALL # the source files in the working directory, which must not be empty # Alas, GBT complains just a bit about the shell commands... #======================================================================== # dieharder_SOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d") # SRCINCLUDES = $(shell ls *.h 2>&1 | sed -e "/\/bin\/ls:/d") bin_PROGRAMS = dieharder man1_MANS = dieharder.1 dieharder_LDADD = ../libdieharder/libdieharder.la dieharder_SOURCES = \ add_ui_rngs.c \ add_ui_tests.c \ choose_rng.c \ dieharder.c \ dieharder_exit.c \ help.c \ list_rngs.c \ list_tests.c \ output.c output.h \ output_rnds.c \ parsecl.c \ rdieharder.c \ run_all_tests.c \ run_test.c \ set_globals.c \ testbits.c \ time_rng.c \ user_template.c \ globals.c # rng_empty_random.c \ # run_rgb_bitdist.c # run_rgb_lagged_sums.c # run_rgb_minimum_distance.c # run_rgb_permutations.c # run_rgb_persist.c # run_rgb_timing.c DEFINES = -DVERSION=$(VERSION) #======================================================================== # Define parameters and directives needed in compile/link steps. #======================================================================== # C Compiler # CC = gcc # Compile flags (use fairly standard -O3 as default) AM_CPPFLAGS = -I ${top_srcdir}/include $(DEFINES) AM_CFLAGS = -O3 # Load flags (optional) # To build a completely static dieharder, uncomment the following line. # AM_LDFLAGS = -all-static AM_LDFLAGS = #======================================================================== # The only safe place to do svn commits is in the toplevel directory #======================================================================== SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/dieharder SVNTIME = dieharder.svn.time) svn: (cd ..;make svn) sync: (cd ..;make sync) ./dieharder/user_template.c0000664000175000017500000001271513707046103014242 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include /* *======================================================================== * This is a very simple test template for a test that generates a * single trivial statistic. It demonstrates the basic idea of most * random number tests -- think up a number -- ANY number -- that depends * in ANY way on the fact that random numbers are truly random (aye, * there's the mathematical rub:-). Ideally a number that in the end * is (thanks to the central limit theorem) normally distributed with a * theoretically computable mean and variance. Use a GSL-wrapped * generator to generate the rands required to sample that number, * obtaining an iid (independent, identically distributed) set of samples. * find their mean. Determine the probability of obtaining that * particular value by a random trial (from the erf of the associated * normal distribution) -- this is the "p-value" of the trial. Store it * in a vector for many (psamples) independent trials, each containing * many (tsamples) iid samples. * * The pvalues of the independent trials are themseles a random variable -- * one that should be distributed UNIFORMLY on the interval [0,1]. The * (often ambiguous) signal of the FAILURE of a rng is a non-uniform * distribution of p-values. In some cases the failure isn't subtle -- * all the p-values are zero, or close to it, for example. However, in * other cases there are lots of perfectly reasonable p's generated if you * look at them one at a time -- does "p = 0.348" mean success or failure? * If ALL the p-values are clustered around 0.35, it means failure, but * this isn't obvious from a single test and MAY not be obvious from MANY * tests. We want a mathematical criterion for deciding how likely it is * that we get any given DISTRIBUTION of p from many trials, and besides * would like to look at that distribution as the human eye is a fair * judge of emergent structure. We therefore PLOT THE HISTOGRAM of the * final distribution of trial p-values , and apply a "Kolmogorov-Smirnov" * test to the vector to determine how uniform (or not) it is. This leads * to "the" p-value of the entire test run -- the probability that the * entire sequence of results could have been obtained if in fact the * generator was a good one. [Of course THIS p-value could be put in a * vector and subjected to yet another KS test and so on ad infinitum, but * we arbitrarily terminate here and instead resolve failures where * this might work by cranking up psamples and/or tsamples, if possible.] * * Even here, judging success or failure is at best ambiguous and may * require several runs and some play to inform a decision. We arbitrarily * set "failure" to mean a final p-value less than 0.01%. Only once in * ten thousand runs are you likely to get such a low p by chance. A * generator is flagged as "poor" if it returns a p-value of 0.01 (1% of * the time this will happen even for a good generator, mind you!). A * "possibly weak" warning ensues from a p-value < 0.05, noting that this * will happpen with good generators 5% of the time and ONLY by rerunning * the test several times (or increasing the number of psamples and seeing * the p-value go down to an less ambiguous measure of failure) can you * increase our confidence that the generator is good -- or not. * * All other p-values are judged "success". * * As you can see, testing random number generators is a messy business. * Answers are rarely clear and clean. Besides, one is armed a priori * with the certain knowledge that ANY random number generator can be * made to fail, as "random number generator" is an mathematically * oxymoronic term (reserving judgement only for the POSSIBILITY that * quantum generators MAY prove to be truly random, but even this is * an assertion, not a known fact, and dieharder applied to random * sequences created by random processes are indeed an EXPERIMENT that * might test the assertion!). * *======================================================================== */ int user_template(Test **test,int irun) { unsigned int t,i,lag; Xtest ptest; /* * Get the lag from ntuple. Note that a lag of zero means * "don't throw any away". */ lag = test[0]->ntuple; /* * ptest.x = actual sum of tsamples lagged samples from rng * ptest.y = tsamples*0.5 is the expected mean value of the sum * ptest.sigma = sqrt(tsamples/12.0) is the standard deviation */ ptest.x = 0.0; /* Initial value */ ptest.y = (double) test[0]->tsamples*0.5; ptest.sigma = sqrt(test[0]->tsamples/12.0); if(verbose == D_USER_TEMPLATE || verbose == D_ALL){ printf("# user_template(): Doing a test with lag %u\n",lag); } for(t=0;ttsamples;t++){ /* * A VERY SIMPLE test, but sufficient to demonstrate the * weaknesses in e.g. mt19937. */ /* Throw away lag per sample */ for(i=0;ipvalues[irun] = ptest.pvalue; if(verbose == D_USER_TEMPLATE || verbose == D_ALL){ printf("# user_template(): ks_pvalue[%u] = %10.5f\n",irun,test[0]->pvalues[irun]); } return(0); } void help_user_template() { printf("%s",user_template_dtest.description); } ./dieharder/time_rng.c0000664000175000017500000000240113707046103013164 0ustar eddedd/* *======================================================================== * $Id: dieharder.c 127 2004-11-20 18:17:55Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * time_rng() times the CURRENT random number generator specified by * the global rng. Truthfully, most of the stuff below is unnecessary, * as rgb_timing() isn't a pvalue-generating test. I'll rewrite it * eventually, but it works fine as is for now. *======================================================================== */ #include "dieharder.h" void time_rng() { /* * Declare the results struct. */ Rgb_Timing timing; Test **rgb_timing_test; /* * First we create the test (to set some values displayed in test header * correctly). */ rgb_timing_test = create_test(&rgb_timing_dtest,tsamples,psamples); /* * Call the actual test that fills in the results struct. */ rgb_timing(rgb_timing_test,&timing); /* * Save this for display in */ rng_avg_time_nsec = timing.avg_time_nsec; rng_rands_per_second = timing.rands_per_sec; destroy_test(&rgb_timing_dtest,rgb_timing_test); } ./dieharder/dump0000664000175000017500000000047213707046103012112 0ustar eddedd#================================================================== # generator mt19937 seed = 1350020181 #================================================================== type: d count: 10 numbit: 32 3313802016 2335490399 3384805761 904134280 1934989947 4103833375 2995980466 266194737 3877092254 3577442237 ./dieharder/list_tests.c0000664000175000017500000000636413707046103013571 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* * ======================================================================== * This routine simply lists all the tests currently known to dieharder. * VERY SOON NOW we will automate it and make it look EXACTLY like * the list_rngs() output. * ======================================================================== */ #include "dieharder.h" void list_tests() { int i; dieharder_test_types(); dh_header(); fprintf(stdout,"Installed dieharder tests:\n"); fprintf(stdout,"%12s\t%30s\t%30s\n","Test Number","Test Name","Test Reliability"); fprintf(stdout,"===============================================================================\n"); for(i=0;i<900;i++){ if(dh_test_types[i]){ fprintf(stdout," -d %d \t%40s",i,dh_test_types[i]->name); if( i == 5 || i == 6 || i == 7 ){ fprintf(stdout,"\t%10s\n","Suspect"); } else if(i == 14){ fprintf(stdout,"\t%10s\n","Do Not Use"); } else { fprintf(stdout,"\t%10s\n","Good"); } } } } void list_tests_old() { dh_header(); printf("\n\ Bug/Development Key (use at your own risk):\n\ rft = ready for testing (the test may - or may not - work correctly)\n\ sus = suspect test (consistently fails \"good\" generators)\n\ dev = development only (may crash, isn't finished)\n\ \n\ Only fully reliable tests will be run when diehard -a is invoked,\n\ with \"reasonable\" default parameters. \n\ \n\ PLEASE READ THE MAN PAGE to learn about p-values and the null hypothesis\n\ in testing BEFORE using this testing tool!\n\ \n\ Diehard Tests\n\ -d 1 Diehard Birthdays test\n\ [sus: -d 2 Diehard Overlapping Permutations test]\n\ -d 3 Diehard 32x32 Binary Rank test\n\ -d 4 Diehard 6x8 Binary Rank test\n\ -d 5 Diehard Bitstream test\n\ -d 6 Diehard OPSO test\n\ -d 7 Diehard OQSO test\n\ -d 8 Diehard DNA test\n\ -d 9 Diehard Count the 1s (stream) test\n\ -d 10 Diehard Count the 1s (byte) test\n\ -d 11 Diehard Parking Lot test\n\ -d 12 Diehard Minimum Distance (2D Spheres) test\n\ -d 13 Diehard 3D Spheres (minimum distance) test\n\ -d 14 Diehard Squeeze test\n\ [sus: -d 15 Diehard Sums test]\n\ -d 16 Diehard Runs test\n\ -d 17 Diehard Craps test\n\ -d 18 Marsaglia and Tsang GCD test\n\ [dev: -d 19 Marsaglia and Tsang Gorilla test]\n\ \n\ RGB Tests\n\ -r 1 RGB Timing test (times the rng)\n\ -r 2 RGB Bit Persistence test\n\ -r 3 RGB Ntuple Bit Distribution test suite (-n ntuple)\n\ -r 4 RGB Generalized Minimum Distance test\n\ -r 5 RGB Permutations test (new, partial replacement for operm tests)]\n\ [rft: -r 6 RGB Lagged Sums test\n\ (do not use the following as tests yet)\n\ [dev: -r 7 RGB L-M-Ntuple Distribution test suite (quite long)]\n\ [dev: -r 8 RGB Overlapping Permutations test]\n\ [rft: -r 9 RGB KStest test]\n\ \n\ Statistical Test Suite (STS)\n\ -s 1 STS Monobit test\n\ -s 2 STS Runs test\n\ -s 3 STS Serial test\n\ \n\ User Tests\n\ -u 1 User Template (Lagged Sum Test)\n\ \n"); } ./dieharder/output_rnds.c0000664000175000017500000000770513707046103013762 0ustar eddedd/* * * See copyright in copyright.h and the accompanying file COPYING * See also accompanying file STS.COPYING * */ /* *======================================================================== * Output a list of random numbers of the selected type into a file. * Write a nice informative header, as well, to indicate several things * about the list (type, generator, count etc.) *======================================================================== */ #include "dieharder.h" void output_rnds() { unsigned int i,j; double d; FILE *fp; if(verbose) { fprintf(stderr,"# output_rnds: Dumping %lu rands\n",tsamples); } /* * If Seed is set, use it. Otherwise reseed from /dev/random */ if(Seed){ seed = Seed; if(verbose) { fprintf(stderr,"# output_rnds: seeding rng %s with %lu\n",gsl_rng_name(rng),seed); } gsl_rng_set(rng,seed); } else { seed = random_seed(); if(verbose) { fprintf(stderr,"# output_rnds: seeding rng %s with %lu\n",gsl_rng_name(rng),seed); } gsl_rng_set(rng,seed); } /* * Open the output file. If no filename is specified, or if * filename is "-", use stdout. */ if(verbose) { fprintf(stderr,"# output_rnds: Opening file %s\n",filename); } if( (filename[0] == 0) || (strncmp("-",filename,1)==0) ){ fp = stdout; } else { if ((fp = fopen(filename,"w")) == NULL) { fprintf(stderr,"Error: Cannot open %s, exiting.\n",filename); exit(0); } } if(verbose) { fprintf(stderr,"# output_rnds: Opened %s\n",filename); } /* * We completely change the way we control output. * * -O output_format * output_format = 0 (binary), 1 (uint), 2 (decimal) * * We just do a case switch, since each of them has its own * peculiarities. */ switch(output_format){ case 0: if(verbose) { fprintf(stderr,"Ascii values of binary data being written into file %s:\n",filename); } /* * make the samples and output them. If we run binary with tsamples * = 0, we just loop forever or until the program is interrupted by * hand. */ if(tsamples > 0){ for(i=0;i= MAXRNGS){ return(-1); } /* * We are FINALLY ready, I think, to implement the super/vector generator * as soon as we get the talk all together and ready to go... * (start here) * See if a gennum name has been set (genname not null). If * so, loop through all the gennums in dh_rng_types looking for a * match and return a hit if there is one. Note that this * routine just sets gennum and passes a (presumed valid) * gennum on for further processing, hence it has to be first. */ if(gnames[0][0] != 0){ gennum = -1; for(i=0;i<1000;i++){ if(dh_rng_types[i]){ if(strncmp(dh_rng_types[i]->name,gnames[0],20) == 0){ gennum = i; break; } } } if(gennum == -1) return(-1); } else if(dh_rng_types[gnumbs[0]] != 0){ /* * If we get here, then we are entering a gennum type by number. * We check to be sure there is a gennum with the given * number that CAN be used and return an error if there isn't. */ gennum = gnumbs[0]; if(dh_rng_types[gennum]->name[0] == 0){ /* * No generator with this name. */ return(-1); } } else { /* * Couldn't find a generator at all. Should really never get here. */ return(-1); } /* * We need a sanity check for file input. File input is permitted * iff we have a file name, if the output flag is not set, AND if * gennum is either file_input or file_input_raw. Otherwise * IF gennum is a file input type (primary condition) we punt. * * For the moment we actually return an error message, but we may * want to pass the message back in a shared error buffer that * rdh can pick up or ignore, ditto dh, on a -1 return. */ if(strncmp("file_input",dh_rng_types[gennum]->name,10) == 0){ if(fromfile != 1){ fprintf(stderr,"Error: gennum %s uses file input but no filename has been specified",dh_rng_types[gennum]->name); return(-1); } } /* * If we get here, in principle the gennum is valid and the right * inputs are defined to run it (in the case of file_input). We therefore * allocate the selected rng. However, we FIRST check to see if rng is * not 0, and if it isn't 0 we assume that we're in a UI, that the user * has just changed rngs, and that we need to free the previous rng and * reset the bits buffers so they are empty. */ if(rng){ MYDEBUG(D_SEED){ fprintf(stdout,"# choose_rng(): freeing old gennum %s\n",gsl_rng_name(rng)); } gsl_rng_free(rng); reset_bit_buffers(); } /* * We should now be "certain" that it is safe to allocate a new gennum * without leaking memory. */ MYDEBUG(D_SEED){ fprintf(stdout,"# choose_rng(): Creating and seeding gennum %s\n",dh_rng_types[gennum]->name); } rng = gsl_rng_alloc(dh_rng_types[gennum]); /* * OK, here's the deal on seeds. If strategy = 0, we set the seed * ONE TIME right HERE to either a randomly selected seed or whatever * has been entered for Seed, if nonzero. * * If strategy is not 0 (1 is fine) then no matter what we do below, * we will RESET the seed to either a NEW random seed or the value of * Seed at the beginning of each test. * * The default behavior for actual testing should obviously be * -s(trategy)=0 or 1 and -S(eed)=0, a random seed from /dev/random * used for the whole test or reseeded per test (with a new seed each * time). -S(eed)=anything else can be used to fix a seed/strategy to * match a previous run to reproduce it, or it can be used to set a seed * to be used for each test individually, probably for a validation (of * the test, not the rng) run. DO NOT USE THE LATTER FOR TESTING! The * pvalues generated by test SERIES that e.g test ntuples over a range * are obviously not independent if they all are started with the same * seed (and hence test largely the same series). * * Regardless, the CURRENT seed is stored in the global seed variable, * which we may need to move from libdieharder to the UI as I don't think * we'll need to share a seed variable with any test. * * Note that for file input (not stdin) "reseed per test" is interpreted * as "rewind per test". Otherwise dieharder will rewind the file (and * complain) only if one hits EOF before all testing is done, and usually * that means that at least the test where the rewind occurs is useless. */ /* * We really don't need to worry about the value of strategy here, just * Seed. If it is is 0 we reseed randomly, otherwise we PROceed. We * actually seed from the variable seed, not Seed (which then remembers * the value as long as it remains valid). */ if(Seed == 0){ seed = random_seed(); MYDEBUG(D_SEED){ fprintf(stdout,"# choose_rng(): Generating random seed %lu\n",seed); } } else { seed = Seed; MYDEBUG(D_SEED){ fprintf(stdout,"# choose_rng(): Setting fixed seed %lu\n",seed); } } /* * Set the seed. We do this here just so it is set for the timing * test. It may or may not ever be reset. */ gsl_rng_set(rng,seed); /* * Here we evaluate the speed of the generator if the rate flag is set. */ if(tflag & TRATE){ time_rng(); } /* * Before we quit, we must count the number of significant bits in the * selected rng AND create a mask. Note that several routines in bits * WILL NOT WORK unless this is all set correctly, which actually * complicates things because I stupidly didn't make this data into * components of the rng object (difficult to do given that the latter is * actually already defined in the GSL, admittedly). */ random_max = gsl_rng_max(rng); rmax = random_max; rmax_bits = 0; rmax_mask = 0; while(rmax){ rmax >>= 1; rmax_mask = rmax_mask << 1; rmax_mask++; rmax_bits++; } /* * If we get here, we are all happy, and return false (no error). */ return(0); } /* * ======================================================================== * select_XOR() * * It is our profound wish to leave the code above mostly unmolested as we * add the "special" XOR supergenerator. We therefore make this a * separate routine altogether and add a call to this on a simple * conditional up above. * ======================================================================== */ int select_XOR() { int i,j; int one_file; /* * See if a gennum name has been set (genname not null). If * so, loop through all the gennums in dh_rng_types looking for a * match and return a hit if there is one. Note that this * routine just sets gennum and passes a (presumed valid) * gennum on for further processing, hence it has to be first. */ for(j = 0;j < gvcount;j++){ if(gnames[j][0] != 0){ gnumbs[j] = -1; for(i=0;i<1000;i++){ if(dh_rng_types[i]){ if(strncmp(dh_rng_types[i]->name,gnames[j],20) == 0){ gnumbs[j] = i; break; } } } if(gnumbs[j] == -1) return(-1); } } /* * If we get here, then gnumbs[j] contains only numbers. We check to be * sure all the values are valid and the number CAN be used and * return an error if any of them can't. */ one_file = 0; for(j = 0;j < gvcount;j++){ if(dh_rng_types[gnumbs[j]] == 0){ return(-1); } /* * We need a sanity check for file input. File input is permitted * iff we have a file name AND if gnumbs[j] is either file_input or * file_input_raw. */ if(strncmp("file_input",dh_rng_types[gnumbs[j]]->name,10) == 0){ one_file++; if(fromfile != 1 || one_file > 1){ fprintf(stderr,"Error: generator %s uses file input but no filename has been specified",dh_rng_types[gnumbs[j]]->name); return(-1); } } } /* * If we get here, in principle the gnumbs vector is filled with valid * rngs and the right inputs are defined to run them (in the case of a * SINGLE file_input). We therefore allocate the selected rng. However, * we FIRST check to see if rng is not 0, and if it isn't 0 we assume * that we're in a UI, that the user has just changed rngs, and that we * need to free the previous rng and reset the bits buffers so they are * empty. */ if(rng){ MYDEBUG(D_SEED){ fprintf(stdout,"# choose_rng(): freeing old gennum %s\n",gsl_rng_name(rng)); } gsl_rng_free(rng); reset_bit_buffers(); } /* * We should now be "certain" that it is safe to allocate the XOR rng * without leaking memory and with a list of legitimate rngs. */ MYDEBUG(D_SEED){ } for(j = 0;j < gvcount;j++){ fprintf(stdout,"# choose_XOR(): generator[%i] = %s\n",j,dh_rng_types[gnumbs[j]]->name); } /* * Change 14 to the actual number */ rng = gsl_rng_alloc(dh_rng_types[14]); /* * OK, here's the deal on seeds. If strategy = 0, we set the seed * ONE TIME right HERE to either a randomly selected seed or whatever * has been entered for Seed, if nonzero. * * If strategy is not 0 (1 is fine) then no matter what we do below, * we will RESET the seed to either a NEW random seed or the value of * Seed at the beginning of each test. * * The default behavior for actual testing should obviously be * -s(trategy)=0 or 1 and -S(eed)=0, a random seed from /dev/random * used for the whole test or reseeded per test (with a new seed each * time). -S(eed)=anything else can be used to fix a seed/strategy to * match a previous run to reproduce it, or it can be used to set a seed * to be used for each test individually, probably for a validation (of * the test, not the rng) run. DO NOT USE THE LATTER FOR TESTING! The * pvalues generated by test SERIES that e.g test ntuples over a range * are obviously not independent if they all are started with the same * seed (and hence test largely the same series). * * Regardless, the CURRENT seed is stored in the global seed variable, * which we may need to move from libdieharder to the UI as I don't think * we'll need to share a seed variable with any test. * * Note that for file input (not stdin) "reseed per test" is interpreted * as "rewind per test". Otherwise dieharder will rewind the file (and * complain) only if one hits EOF before all testing is done, and usually * that means that at least the test where the rewind occurs is useless. */ /* * We really don't need to worry about the value of strategy here, just * Seed. If it is is 0 we reseed randomly, otherwise we PROceed. We * actually seed from the variable seed, not Seed (which then remembers * the value as long as it remains valid). */ if(Seed == 0){ seed = random_seed(); MYDEBUG(D_SEED){ fprintf(stdout,"# choose_rng(): Generating random seed %lu\n",seed); } } else { seed = Seed; MYDEBUG(D_SEED){ fprintf(stdout,"# choose_rng(): Setting fixed seed %lu\n",seed); } } /* * Set the seed. We do this here just so it is set for the timing * test. It may or may not ever be reset. */ gsl_rng_set(rng,seed); /* * Here we evaluate the speed of the generator if the rate flag is set. */ if(tflag & TRATE){ time_rng(); } /* * We don't really need this anymore, I don't think. But we'll leave it * for now. */ random_max = gsl_rng_max(rng); rmax = random_max; rmax_bits = 0; rmax_mask = 0; while(rmax){ rmax >>= 1; rmax_mask = rmax_mask << 1; rmax_mask++; rmax_bits++; } /* * If we get here, we are all happy, and return false (no error). */ return(0); } ./dieharder/globals.c0000664000175000017500000001472114345634434013024 0ustar eddedd /* * With gcc 10 and the new default of -fno-common, we need to be more * careful about defining globals _exactly once_ and using extern * declarations elsewhere. * * This file provides the "one spot" for these _sole_ defintions. * * Dirk Eddelbuettel, Dec 2019, Dec 2022 */ #include #include #include #include #include #include /* dieharder.h */ //SEXP result; /* kludge: need a global to report back to main() and then R */ //unsigned int Seed; /* user selected seed. Surpresses reseeding per sample.*/ unsigned int table; /* selects "table" output mode */ unsigned int tflag; /* binary flag(s) to control what goes in the table */ off_t tsamples; /* Generally should be "a lot". off_t is u_int64_t. */ //int user; /* user defined test number */ //int verbose; /* Default is not to be verbose. */ double x_user; /* General purpose command line inputs for use */ double y_user; /* in any test. */ double z_user; int dtest_num; char dtest_name[128]; char generator_name[128]; double strategy; double rng_avg_time_nsec,rng_rands_per_second; unsigned int binary; /* Flag to output rands in binary (with -o -f) */ char table_separator; unsigned int tflag,tflag_default; /* libdieharder.h */ unsigned int all; /* Flag to do all tests on selected generator */ unsigned int bits; /* bitstring size (in bits) */ unsigned int diehard; /* Diehard test number */ unsigned int generator; /* GSL generator id number to be tested */ #define GVECMAX 100 char gnames[GVECMAX][128]; /* VECTOR of names to be XOR'd into a "super" generator */ unsigned int gseeds[GVECMAX]; /* VECTOR of unsigned int seeds used for the "super" generators */ unsigned int gnumbs[GVECMAX]; /* VECTOR of GSL generators to be XOR'd into a "super" gene */ unsigned int gvcount; /* Number of generators to be XOR'd into a "super" generator */ unsigned int gscount; /* Number of seeds entered on the CL in XOR mode */ unsigned int help_flag; /* Help flag */ unsigned int hist_flag; /* Histogram display flag */ unsigned int iterations; /* For timing loop, set iterations to be timed */ unsigned int ks_test; /* Selects the KS test to be used, 0 = Kuiper 1 = Anderson-Darling */ unsigned int list; /* List all tests flag */ unsigned int List; /* List all generators flag */ double multiply_p; /* multiplier for default # of psamples in -a(ll) */ unsigned int ntuple; /* n-tuple size for n-tuple tests */ unsigned int num_randoms; /* the number of randoms stored into memory and usable */ unsigned int output_file; /* equals 1 if you output to file, otherwise 0. */ unsigned int output_format; /* equals 0 (binary), 1 (unsigned int), 2 (decimal) output */ unsigned int overlap; /* 1 use overlapping samples, 0 don't (for tests with the option) */ unsigned int psamples; /* Number of test runs in final KS test */ unsigned int quiet; /* quiet flag -- surpresses full output report */ unsigned int rgb; /* rgb test number */ unsigned int sts; /* sts test number */ unsigned int Seed; /* user selected seed. Surpresses reseeding per sample.*/ off_t tsamples; /* Generally should be "a lot". off_t is u_int64_t. */ unsigned int user; /* user defined test number */ unsigned int verbose; /* Default is not to be verbose. */ double Xweak; /* "Weak" generator cut-off (one sided) */ double Xfail; /* "Unambiguous Fail" generator cut-off (one sided) */ unsigned int Xtrategy; /* Strategy used in TTD mode */ unsigned int Xstep; /* Number of additional psamples in TTD/RA mode */ unsigned int Xoff; /* Max number of psamples in TTD/RA mode */ double x_user; /* Reserved general purpose command line inputs for */ double y_user; /* use in any new user test. */ double z_user; #define KS_SAMPLES_PER_TEST_MAX 256 double *ks_pvalue,*ks_pvalue2; unsigned int kspi; struct timeval tv_start, tv_stop; int dummy,idiot; FILE *fp; #define MAXFIELDNUMBER 8 char **fields; #define K 1024 char filename[K]; /* Input file name */ int fromfile; /* set true if file is used for rands */ int filenumbits; /* number of bits per integer */ off_t filecount; /* number of rands in file */ char filetype; /* file type */ const gsl_rng_type **types; /* where all the rng types go */ gsl_rng *rng; /* global gsl random number generator */ gsl_matrix *A,*V; gsl_vector *S,*svdwork; unsigned long int seed; /* rng seed of run (?) */ unsigned int random_max; /* maximum rng returned by generator */ unsigned int rmax; /* scratch space for random_max manipulation */ unsigned int rmax_bits; /* Number of valid bits in rng */ unsigned int rmax_mask; /* Mask for valid section of unsigned int */ /* dieharder_rng_types.h */ #define MAXRNGS 1000 const gsl_rng_type *dh_rng_types[MAXRNGS]; const gsl_rng_type **gsl_types; /* where all the rng types go */ unsigned int dh_num_rngs; /* dh rngs available in dieharder */ unsigned int dh_num_gsl_rngs; /* GSL rngs available in dieharder */ unsigned int dh_num_dieharder_rngs; /* dh rngs available in libdieharder */ unsigned int dh_num_R_rngs; /* R-derived rngs available in libdieharder */ unsigned int dh_num_hardware_rngs; /* hardware rngs supported in libdieharder */ unsigned int dh_num_user_rngs; /* user-added rngs */ unsigned int dh_num_reserved_rngs; /* ngs added in reserved space by new UI */ gsl_rng *rng; /* global gsl random number generator */ /* dieharder_test_types.h */ #define MAXTESTS 1000 Dtest *dh_test_types[MAXTESTS]; unsigned int dh_num_diehard_tests; /* diehard tests available in dieharder */ unsigned int dh_num_sts_tests; /* STS tests available in dieharder */ unsigned int dh_num_other_tests; /* other tests available in dieharder */ unsigned int dh_num_user_tests; /* user tests added in ui segment */ unsigned int dh_num_tests; /* total tests available in dieharder */ Dtest *dh_test; /* global pointer to the current test */ /* parse.h */ #define PBUF 128 #define PK 1024 char splitbuf[PK][PBUF]; unsigned int *rgb_persist_rand_uint; /* rgb_persist.h */ unsigned int rgb_operm_k; /* rgb_operm.h */ ./dieharder/dct-g207g208g14g205-n80000664000175000017500000000000013707046103014215 0ustar eddedd./dieharder/NOTES0000664000175000017500000013430313707046103012036 0ustar eddeddThese are some simple design notes to document this program and to guide further work. This program is designed to do the following: a) Encapsulate every RNG known to humans for testing. We will use the GSL both for its rich supply of ready-to-test RNG's and for its relatively simple and consistent encapsulation of any new RNG's we add -- /dev/random is already encapsulated and can serve as a template for future work. [1/16/03 rgb] b) test speed of the available RNG's. Both: i) In "native/standard" subroutine calls (with the subroutine call overhead included). [This is done, 1/16/03, rgb] ii) In a custom "vector" form, where a whole block of dedicated memory is filled in one pass from a given algorithm, and subsequently accessed via a macro that only calls for a refill when the vector is exhausted. c) test quality of the available RNG's. There are at least three primary sources of tests that will be used in this tool. i) RGB tests. These are the tests I myself have implemented. To the best of my knowledge these are new, although of course my knowledge is far from complete. ii) DIEHARD, by Dr. George Marsaglia of FSU. This is a well-known and venerable "battery of tests" of RNG's. iii) NIST STS/FIPS (NIST special publication 800-22, revised 5/15/2001). This is also a suite of RNG tests, with some overlap with DIEHARD. I will probably implement only selected tests from this suite at least at first, as some of them appear to be relatively weak compared to e.g. rgb_binomial and to test basically the same thing. iv) Additional tests that are to be found on the web and in the literature, where they appear to test things not well-represented in tests already implemented in one suite or another. d) test quality of any input set of "random" data according to i-iv in c). This will let us test arbitrary RNG's via their data, including and especially hardware generators. Note that hardware generators available as "devices" will be interfaced via a). This step will only be implemented when enough tests to make it worthwhile are already implemented. Addendum and explanation of copyright issues. The STS was written by a variety of authors: Andrew Rukhin, Juan Soto, James Nechvatal, Miles Smid, Elaine Barker, Stefan Leigh, Mark Levenson, Mark Vangel, David Banks, Alan Heckert, James Dray, San Vo. None of the actual code in the STS suite has been used in this tool -- all testing routines have been written using only the STS published document as an excellent reference. GSL routines have been used throughout, where possible, for computing things such as erfc or Q. Since I am not using their code, I am omitting their copyright notice, but wish to acknowledge their documentation of the selected tests anyway. All the code in dieharder is GPL open source in any event, but academic credit matters. Similarly, DIEHARD is the work of George Marsaglia. Dr. Marsaglia doen't have any written copyright notice or license terms that I could find in the sources provided on the website where he openly distributes source for his own suite, but in keeping with a minor design goal of completely original GPL code, all the DIEHARD algorithms have also been completely rewritten without directly utilizing any of the actual diehard code. Fortunately, Dr. Marsaglia also provides clear documentation for his test suite, making it a fairly simple matter to implement the tests. Source code WAS examined (but not copied) to clarify places where the documentation of the tests was openly erroneous (as in the parking lot test) or unclear but dieharder code is completely original and its development thoroughly documented in CVS and (later) SVN tree form, checkin by checkin. The relatively few tests I have added are motivated by a desire to get a less ambiguous answer than many of these tests provide. In many cases it is not (or should not) be correct to say that one "accepts" a generator as being a good one just because a test run of the generator has a p-value significantly greater than 0. A few moment's experimentation, especially with relatively small data sets, should convince one that even "bad" RNG's can sometimes, or even frequently, return an "acceptable" p-value. Only when the size of the test is increased, or the test is repeatedly run with different seeds, does it become apparent that although it sometimes performs acceptably (the result of a run isn't inconsistent with the generator producing "real" random numbers) it sometimes performs so poorly that the result can >>never<< be explained or believed for a true random number generator. That is, while a really poor p-value allows us to reject the hypothesis that the tested generator is random, acceptable p-values, even a fair number of them in repeated tests, do not usually support accepting the hypothesis -- at best they don't support rejection. Running a test repeatedly to generate a full distribution of results and then directly comparing the entire distribution with theory appears to provide greater sensitivity and accuracy in the rejection process than "simple" tests that generate only a single quantity. This motivated the rgb_binomial test, which has proven very good at rejecting "bad" rng's. Similarily, it may prove useful to directly generate an empirical distribution of p-values themselves (repeating a test many times with different seeds and binning the p-values) and compare it to the expected distribution (which might work for erfc-based p-values, although not so well for Q-based p-values). This can replace running a test many times looking for an anomalous number of "poor" p-values mixed in with ones that are not so poor as to lead to immediate rejection. Contributions of rng's (consistently GSL-wrapped as e.g. dev_random.c demonstrates) and/or additional tests would be most welcome. rgb STS Critique, By Statistic The Monobit Statistic The monobit statistic checks to make sure that the raw number of 1's and 0's approximately balance in a given bitstring. This is actually a decent thing to test, but there is a better way to test it. Given a relatively short bitstring (e.g. n<=160 bits), the probability that it will have k bits according to the null hypothesis is p(n,k,1/2) (the binomial distribution of outcomes over n independent trials, each with p=1/2). If one runs m runs of n independent trials each, and accumulates X[k] (the count histogram for each possible value of output k in [0,n]) then one has X[k], the expected value histogram Y(k) = m*p(n,k,1/2), and sigma(k) = sqrt(m)*p(n,k,1/2). From this it is simple to compute a p-value from an incomplete gamma function for the >>details<< of the distribution of 1's. One can even do it two ways -- with an independent random number seed for each of the m samples, or by simply running the rng with its original seed long enough to produce m*n bits. This binomial test is stronger than the monobit test. Any result histogram that passes it necessarily passes the monobit test for the aggregate distribution with m*n bits (as I hope is obvious -- passing it means that the distribution is binomial in detail, not just uniformly balanced. However, it is simple enough to compute the monobit result more or less in passing in the binomial test by simply summing the count histogram at the end or aggregating a total 1-bit count as one goes. In that case one can generate two p-values -- a p-value for the monobit test and one for the binomial -- in one pass for the same data. I would predict that the binomial p-value is strictly less than the monobit p-value, and that there exist rng's that pass the monobit that explicitly fail the binomial, but we can determine that empirically. This chisq-based binomial test methodology can be used to improve nearly any single test statistic in sts. Instead of looking at the expected value of the statistic itself, frame its generation as a Bernoulli trial with a known percentage, compute the expected binomial distribution and its error, generate the result histogram as the test statistic, and use chisq and the complementary incomplete gamma function Q(a,x) to generate a p-value over many smaller "independent" trials instead of one long one. This suggests ways of improving e.g. the runs and other tests as well, see below. The Runs Statistic For n bits, count the test statistic X as the number of (overlapping) 01 and 10 pairs and add one. Compute p_1 = (# ones)/n, p_0 = (1 - p_1) (and ensure that they are close enough to p_0 = p_1 = 0.5). Compute the expected number of 01 and 10 pairs as Y = 2*n*p_1*p_0. Compute the expected error in the number of 01 and 10 pairs as sigma = 2*sqrt(2*n)*p_1*p_0. Finally, compute the p-value as erfc(|X - Y|/sigma). This methodology seems questionable, at least to me. First of all, it seems odd to use a p_0 and p_1 derived from the sample, given that the null hypothesis is p_0 = p_1 = 0.5 and independent. Ensuring that the sample passes monobit (in a slightly different formulation) to start means that one has conditionally >>accepted<< this null hypothesis for the rng before beginning the runs test, using different p's implies a different null hypothesis. In addition, given their prior assumption that p_1 = # ones/# bits, their computation of the probability of p_01 and p_10 (and hence Y) is erroneous. The probability of 01 in a finite string of n bits, subject to constrained numbers of 0's and 1's needs to be computed WITHOUT replacement, just as one does with a deck of cards. After shuffling a deck of cards known to contain four aces, the probability that the top two cards are aces is not (4/52)*(4/52), but rather (4/52)*(3/52) -- if the first card is an ace, it means there are fewer aces left in the deck for the second card. To be consistent, they should compute the expected number of 01 strings in a 10-bit sequence containing 6 1's as (4/10)(6/9) and not (4/10)(6/10). They need to choose between a null hypothesis of p_1 = p_0 = 0.5 (where they can presume successive bit probabilities to be independent) and a null hypothesis of p_1 = (# 1's)/(# bits) and use "probability for a 1, given that the first draw is a 0". This matters for short strings. Next, they don't wrap the n-value bitstring into a torus. Consequently, there are only n-1 bitpairs examined, and thus the expected value should be Y = 2*(n-1)*p_1*p_0 and not 2*n*p_1*p_0. For large n, of course, it won't matter (neither will the previous two problems, at least not much), but it is surprisingly sloppy mathematically. In addition there is no reason I can see to add a 1 to the test statistic of (# of 01 and 10 pairs in an overlapping scan of the string). This is very difficult to understand, as it clearly breaks the symmetry of this test statistic with the complementary view where the test statistic X is (# of 00 or 11 pairs in an overlapping scan of the string) but Y and sigma are the same -- the sum of the Y's necessarily equals n (or n-1, if that is the number of examined pairs). This leads to an obvious problem for short strings, e.g. n = 2, where the formula they give for the expected number of 01 or 10's measured is 2*2*(1/2)*(1/2) = 1, but the statistic can only take on the values 1 or 2, each with probability 1/2. There is something odd here. Finally, it is more than a bit crazy to view this assessment as somehow a measure of excessive sequential correlation, as a measure of "runs". Let us reframe the test statistic (count of 01 and 10's) in terms of our null hypothesis. Presuming random, equal probability 0's and 1's, we expect 25% each of 00 01 10 11. Given an exemplary bit string of e.g. 1001101011, it doesn't really matter if one examines disjoint bitpairs (10 01 10 10 11) (n/2 bitpairs for n even) or the overlapping bitpairs 10 00 01 11 10 01 10 01 11 11 (wrapping the last pair around periodically to ensure symmetry and n pairs of bits, EACH pair is expected to occur with a frequency, in the limit of many bitpairs, of #bitpairs*(1/4). Furthermore, in an ensemble of measurements of bitpair frequencies, each distinct possibility is (for lots of identical bitsets) to be binomially distributed with respect to the rest (as in p_01 = 1/4, p_!01 = 3/4) regardless of whether or not sequential overlapping bitpairs are counted. We can understand this by noting that our null hypothesis (a random generator producing pairs of bits) can be applied to any pair of bits in any string. Note also that in a given bitstring with periodic wraparound, the number of 01 (overlapping) pairs must equal the number of 10 pairs. This can be proven with ease. Every bit flipped can either change >>both<< the 01 and 10 count by one (flipping a bit with two neighbors that are both 0 or both 1) or it can leave them both the same (flipping a bit with a neighboring 0 AND a neighboring 1). This wreaks a certain measure of havoc on the notion that each sequentially overlapping pair examined is an independent measurement -- measuring any pair of (01 or 10 count) and (00 or 11 count) suffices to determine the counts for all four possible bit pairs. The only question remaining is whether measuring the counts using overlapping bitpairs is more or less rigorous a test than measuring the counts using non-overlapping pairs. That is, can a generator create a bitstring that is correctly pairwise distributed in both non-overlapping pair sequences but that is NOT correctly pairwise distributed in overlapping pair sequences or vice versa. The answer is not terribly obvious, but if we make the very weak presumption that our test measurments do not depend, on average, on whether we begin them systematically at bit 0 or bit 1 (so that if we have a bad generator we'll eventually fail for either starting point with roughly equal frequency for different starting seeds and/or first-bit displacements), then measuring both possibilities for each string should (on average) produce results that are conservatively related to measuring one possibility on twice as many strings. To put it another way, if a generator creates strings that >>fail<< the overlapping test, they would necessarily fail at least one of the two non-overlapping tests possible for the same bitstring, since the counts for the two non-overlapping tests add to produce the count for the non-overlapping test. For this addition to push values out of acceptable ranges one would require two deviations from the expected value in the same direction. If we only make the extremely weak assumption that failure of the non-overlapping tests is equally likely for both possible cyclic starting points, the 1/sqrt(2) scaling implicit in using both strings is thus conservative. However, we can easily average over this as well by simply randomly starting each non-overlapping run on bit 0 or bit 1. This might actually simplify the code and provides an ADDITIONAL measure of randomness as the two results should themselves be binomially distributed, independently. The final problem with runs is that it is not easy to see how to extend it to a higher order. For example, does 101 occur too often? How about 010? Again, each bit pattern should occur at a rigorously predicted rate for p_0 = p_1 = 0.5 and independent bits, e.g. p_000 = p_001 = p_010 = ... = 1/8 for any distinct three-bit combination, p_0000... = 1/16 for four-bit combinations, and so on. EACH of these outcomes should occur with binomially distributed frequencies when measured as a bernoulli trial with p_xyz, (1 - p_xyz), making it easy to compute both Y and sigma. This suggests that the correct generalization of monobit and runs (and probably more of the sts tests) is a test that (in one pass): a) presumes a valid bitlevel rng so that p_0 = p_1 = 0.5 exactly, all bits independent (null hypothesis). b) counts 1's (and infers 0's) for M sets of N bits, incrementing a histogram vector of the number of 1's observed accordingly. This is rigorously compared for EACH possible value of the count to the expected binomial distribution of counts. c) counts e.g. 00,01,10,11 overlapping pairs. We showed above that the count of 01's exactly equals the count of 10's. The count of 11 pairs equals the total number of pairs less the count of 00's, 01's and 10's (all known). Even though these are not all independent, there is no harm and a small ease of coding advantage in binning all four counts in four result histograms, each to be compared to its binomial expectation. d) counts e.g. 000, 001, 010... overlapping pairs. Here we IGNORE possible count relationships for sure (as we won't stop with three bits:-). Again, bin the outcome count frequencies and compare to their expected binomial distribution. This process can continue indefinitely, as long as we can accumulate enough counts in each pattern histogram to make aggregate statistics reliable. For example, at 8 bits, one is basically ensuring that the distribution of ascii characters is BOTH overall uniform (has the correct mean number of letters) AND that the actual distribution of those letters in samples is correct from the point of view of Bernoulli trials. I think that this process is strengthened significantly by conducting it simultaneously for all the sequences. The first measures "bit frequency and randomness". The second measures "pairwise sequential correlations". The third measure "three-bit sequential correlations" and so forth. A sequence might pass the first and fail the second, pass the first two and fail the third, pass the first seven and fail the eighth, pass the first eight and fail the 32nd (so that floats formed from the inverse are not uniformly distributed). =============== Addendum to previous note. The insight has struck me that all that this does is give one the actual DISTRIBUTION of outcomes for any given experiment. The distribution of sample means should be -- guess what -- normal -- provided that there are enough elements in the sample itself. For small numbers of elements in the sample, they should be binomial if the experiment is framed as a bernoulli trial. I'll bet that if I convert smoothly from binomial into normal as the number of outcome states exceeds the threshold where computing binomial probabilities is reasonably possible, I'll see no difference in an appropriately computed chisq! This is the solution to the problem of doing long strings. If I counted e.g. bitpair combinations across a string of length 8, (for many samples) binomial is appropriate. If I count bitpair combinations across a string of length 2^23 (8 million), I can't do binomial, but don't have to. Outcomes will be normally distributed about the expected means. SO, this is the answer to the bigger problem of why one should ever trust "p-value" for a single sample, or even a dozen samples, of a random process. Sure (to quote Marsaglia) "p happens", but it doesn't JUST happen, it happens according to a distribution. Instead of wondering if THIS occurrence of p = 0.02 from a single mean value is reasonable or not, compute the p of an entire distribution of mean values compared to the appropriate normal or binomial distribution, and get a p-value one can really trust! ======================= OK, so I'm stupid and I'm wrong. sts_monobit is, in fact, more sensitive than rgb_binomial although rgb_binomial might yet pick up a generator that passes sts_monobit and fail it -- one that preserves the symmetry of its 0/1 distribution about the midpoint (so the mean number of 0's and 1's is correct) but has the >>wrong<< distribution, e.g. is not binomial. As it turns out, most distributions that fail rgb_binomial do not have symmetry about their midpoint and consequently fail sts_monobit "before" failing rgb_binomial. If you like, rgb_binomial only becomes reliable when there is enough data to fill the primary non-zero bins near the middle, which takes a goodly chunk of data. sts_monobit, in the meantime, just adds up the number of 0's and 1's while steadily chopping down sigma -- by the time one has sampled a few thousand bits a lot of rng's are already 0/1 asymmetric enough to fail monobit, but the bin sigma's are still large enough to forgive a lot of slop in any given bin. Interestingly, binomial can be applied to very small bitstrings -- in fact, to bitstrings of length 1 (I think). At that point it should become equivalent to monobit, but in a somewhat different way, especially since rgb_binomial now evaluates monobit directly on the accumulated bit values. Looks like I >>do<< have some work to do to fully understand everything, I do I do...;-) ============== Whoo, dawgies! Out of a bit of insight, rgb_persist was born, and it explains why a LOT of rng's suck incredibly. Lots of rng's quite literally never change the contents of certain bits (usually lower order bits). One common symptom is for an rng to always return odd or even numbers. Another common symptom is for a rng to fail a distributional test when the repeated bits are measured (as repeated 1's cause an excess of 1's, repeated 0's an excess of 0's, even repeated 01's can cause runs/bitpair tests to fail). Worse, rgb_persist clearly shows that MOST rng's that exhibit the problem at all exhibit it STRONGLY (LOTS of repeated lower order bits) for at least some seeds. Using them, one runs a significant (indeed, a near "sure thing") risk of encountering seeds such that as many as 18 bits out of 32 are repeated, leaving one with only a fraction of the variation you thought you had. At this point, I'd have to say that rgb_persist is one of the first tests to run on ANY rng, and any rng that fails it should probably just be rejected out of hand -- even if only the last (least significant) bit is repeated, it seems dangerous to use an rng that produces only even or only odd numbers from any given seed, even for games. Writing the dumpbits and rgb_persist routines also gave me insight into how rgb_binomial and even the sts routines might be failing relative to their design goals. I've been processing bits least to most significant, and I've been ignoring random_max when doing so. This is a capital mistake, as of course an rng will fail when it only returns e.g. 16 bits in a 32 bit slot (and the other bits are necessarily repeated). I've probably been "passing" only rng's that return a full 32 "random bits" (and of course don't fail e.g. rgb_persist()). SO, I need to rewrite sts_monobit, sts_runs, and rgb_binomial (last first) so that they only check bits in the valid part of each returned word. This will be modestly annoying, but is of course absolutely necessary for the results to mean a damn thing. ==================== Note the new test rgb_bitdist, which is the BEST generalization of sts_monobit and perhaps better than rgb_binomial as well. We need to merge sts_monobit, rgb_persist, and rgb_bitdist into a single test that measures the total/average bit number, the per-bit-slot total/average number, and derives the cumulative bitmask of repeated bits. Two additional directions to take this: First: generate a set of Ntest variables for e.g. 1 bit 2 bit 3 bit 4 bit ... N bit combinations (one each). For number of bits and bitpattern, sweep the bitstring and accumulate the frequency histogram (for each possible bitpattern in each string location) ntest[no_of_bits].x[bit_pattern_slot] with periodic wraparound on the bitstring and so forth -- this is, in fact, sts_runs but for arbitrary numbers of bits and accumulating BOTH the totals AND the actual distribution, and check the chisq on the distribution and the pvalue of the total expected. Second: Here we look for subtle sequential bitlevel correlations. We do the same test as before, except that the frequency histogram is LATERAL -- doing each bit position in a sequential fashion. This test should see a clear failure for bits that don't change (strong sequential correlation, that) but should ALSO discover individual bits that do things like: 01010101 or 0011110000111100 or any other "balanced" repetition. In fact, we may eventually do a fft on the forward sequential bit sequences to see if there are even very weak sequential bit-level correlations like 001010100001100010 (where every sequential triplet has two 0's and one 1), even if the triplets themselves are "random". A good frequency test on all 3-way bit patterns should catch this, of course, and the lovely thing about binary is that I can always use a suitably masked integer conversion of the bit pattern itself as the histogram index! So it needn't be TOO horrible to encode. ===================================================== Note on diehard parking lot test. First of all, the documentation for the test is incorrect -- it tests for "crashes" (overlap) of SQUARE cars with sides of length 1, not ROUND cars of RADIUS one as Marsaglia's documentation and comments assert. If round cars ("helicopters", to borrow Marsaglia's term) are used a different distribution is obtained with mean over 4000. Actually to me, round cars seems very very similar to one of Knuth's tests for hyperplanar distribution of random coordinates, which has a much more solid theoretical foundation; I suspect the tests are more or less equivalent in sensitivity and will yield identical success/failure patterns in 99% of all cases (maybe even 100%). And the sensitivity of this test sucks -- it was very difficult for me to find a test that failed it out of the entire GSL collection (trying a half dozen known-weak generators or more in the process). The one that finally DID fail it really, really sucked and failed all sorts of other tests. I'd be interested to see if this test deserves to live, in the long run. I rather suspect that Knuth tests in variable dimensions will yield a much more systematic view of RNG failure, just as rgb_bitdist does compared to e.g. runs tests. ================================================================== 07/11/06 I've just finished testing Marsaglia's bitstream test, and it is (like rgb_bitdist) a test that nothing survives. In fact, it is a dead certainty that rgb_bitdist is a better version of the same basic test, and that generators that fail rgb_bitdist at (say) 6 bits are going to fail Marsaglia's less sensitive 20-bit test. What his test does that bitstream doesn't is use a single relatively coarse grained test statistic -- the expected number of missing 20 bit numbers out of 2 million trials -- instead of doing what rgb_bitdist does, which is do a chisq test on the fractional occupancy of the entire VECTOR of 20 bit numbers. Research question: Which is more sensitive AT 20 bits? It seems to me that the chisq vector test is clearly superior as it would catch many possible "bad" distributions that conserved the mean number of missing numbers at this sample size (however unlikely such special deviations might be in practice) but then there is the question of sensitivity given a fixed sample size. SO FAR, however, rgb_bitdist continues to be the premier test for revealing failure, with nothing getting out alive past 6 bits, ASSUMING that I'm computing the vector chisq and p-value per run correctly and not just revealing that I'm using the wrong form as the number of bits goes up. Oh, and nothing survives diehard_bitdist EITHER, at least when one cranks the test up past Marsaglia's wimply 20 iterations to (say) 200. At that point the non-uniformity of the p-distribution is absolutely apparent -- it even has structure. That is, some seeds lead to biased results that are TOO CLOSE to the mean value and not properly distributed... an interesting observation all by itself. rgb ================================================================== 07/11/06 later that day... diehard_count_1s_stream() now WORKS! What a PITA! And (I suspect) how unnecessary all the complexity! This test (as it turns out) computes chisq on what amounts to a strangely remapped rgb_bitdist test (precisely!) on four and five digit base 5 integers obtained by remapping bytes based on the number of 1's therein. That is, 256 possibilities are reduced to 5, each with a trivial-to-compute frequency/probability, the base 5 integer is left shifted (base 5!) and added to the next one to cumulate 4 or 5 digit numbers, those numbers are then counted, and the counts compared to the EXPECTED counts given the number of samples and turned into chisq (one each, for 4 and for 5 digit numbers). Sigh. OK then, we COULD just print the p-value of those chisq's -- an absolutely straightforward process. Alternatively, we could do what Marsaglia does -- compute the DIFFERENCE of the chisq's themselves, which of course are supposedly distributed around the number of degrees of freedom of each one separately, that is 3125 - 625 = 2500! This is the mean value of the difference, with stddev = sqrt(2*2500). This final result is turned into a p-value. This of course is wierd and wrong in so many ways. For one, it is entirely possible for chisq_4 and chisq_5 to differ systematically from their expected values, and it is perfectly possible and likely that those deviations would occur in the same direction -- e.g. down -- so that the 4 byte and 5 byte streams BOTH have fewer degrees of freedom than expected. Of course in this case part of the individual deviations CANCEL and is not visible in the final p-value! Honestly, I can think of pretty much "no" reasonable ways that this final pvalue can fail where any/all of the p-values for the 4 or 5 (or 2 or 3 or 1 or 17) digit distributions would not also fail, but I can (and just did) think of a way that the final p-value might MARGINALLY pass while the individual p-values fail. Although the general approach is a good one, what is clearly needed is a new test -- one that extends rgb_bitdist to multidigit strings of smaller base. For example, right now rgb_bitdist tests the FREQUENCY of the occurrence of all 5 digit strings but not all 5 digit strings taken two at a time (32 x 32 = 1K possbilities). Of course one REASON that I don't do that is that I >>already<< do e.g. 10 bit strings -- the DIRECT frequency distribution of those 1K possibilities, which obviously samples all the 5 bit combos taken two at a time!. And besides, every rng I have tested fails at the level of what amounts to two digit octal numbers -- six bit strings. So I'm cynical about this. I also don't think that this really counts 1's. How is this one iota different from simply evaluating the distribution of bytes (8 bit randoms)? If the complete distribution of 8 bit bytes (rgb_bitdist at 8 bits) is random, ALL DERIVED DISTRIBUTIONS are random, with the only catchy part being temporal/sequential correlations that might be revealed from taking the strings four or five bytes at a time (at the expense of compressing the information tremendously). Once again, this test seems reduceable to but not as sensitive as rgb_bitdist at a given level, unfortunately a level far beyond where all known rng's fail anyway. It is a MEASURE of the lack of sensitivity that this does does NOT fail for many of those rng's where rgb_bitdist does... rgb ================================================================== 08/16/06 OK, lots has happened. First of all, I've discovered what I believe to be at least one, maybe two diehard data errors -- rngs consistently fail operm5 and bitstream that I (and everybody else) believe to be "good" ones insofar as such a thing exists. Not surprising -- the data being used to compute the test statistics was simulated between 10 and 20 years ago and this test routinely uses more random numbers from better generators in any given test than were likely used to simulate them in the first place. Second, dieharder is already in the process of developing quite a user base. People have ported it to Windows, for example, and Dirk Eddelbuettel is interested in adding a native R interface to the tests (to be able to take advantage of several of the other facilities that R provides, a la octave/matlab/maple/mathematica as a programming UI). To facilitate both this latter project and the eventual creation of a true GTK-based GUI for dieharder, I've begun the fairly monumental task of splitting off all the tests, the add-on rng's that are intended to be part of the basic package, and all the intrinsic support functions into a standalone link library and associated set of include files. I know from experience writing libwulf to support wulfware apps that this is a bit tricky, and I expect there to be deep bugs and places where the API and separation are not clean for quite some time now. However, when I'm DONE it should be REALLY EASY to replace the front end UI. In fact, if I clean up the UI itself while I'm at it to make it even more modular than it is, I should be able to add a GTK basic interface in a very short period of time. I'm also stripping down the actual source part of dieharder (the tty interface version) and putting most of the documentation and so on in with the LIBRARY, since that is where it will be needed. Eventually I should need something like man pages and/or a manual for the libdieharder library, in addition to a much smaller set of toplevel dieharder documentation. The application (in any UI version) should REALLY be fairly self-documenting as a design goal. To mark the advent of a version that appears to build on top of completely separated libdieharder.a, largely decrufted on both sides, I'm bumping the major number of dieharder even though this wasn't an original design goal. It clearly merits a major version bump anyway. The minor.minor numbers will retain their original meaning (bugfix advances and number of tests supported) except that now I should probably reset bugfix to 0 in both libdieharder and dieharder. I don't know what I'll do about synchronicity between the two -- really I should extract numbers from libdieharder to set dieharder version numbers, but parsing out all the screen-scraping macros gives me a headache so I'll await inspiration or need before messing with it. Note finally that doing this has put adding more e.g. marsaglia_tsang tests on hold. I do have an extensive agenda here -- fixing up a "super" version of sts_serial, adding sts_serial itself (which should be more or less equivalent to rgb_bitdist, only the latter doesn't compute the correct statistic for a chisq, alas), figuring out what the RIGHT data is for diehard_operm5 and diehard_bitstream, completing the installation of 10^11 to 10^12 sample-based target data of my OWN for marsaglia_tsang_gcd, and so on. However, clearly this needs to wait until the development environment is stable again, which could be days yet, or even longer depending on what else I have to do for Duke etc. I also haven't even looked at the WinXX patches -- I'll have to figure them out all over again after splitting off the library, I expect. Still, progress is being made. I think that the application is definitely out there to where a) it could be announced more publically on e.g. the stats lists -- maybe when the libdieharder split has been in "alpha" for at least a while...;-) and b) it is time to look for grant support for this project to accomplish certain specific goals -- supporting testing on a cluster (by the time we're done the sts_series/rgb_bitdist/rgb_lmn tests are going to be BIG CPU consumers:-), finishing off all the desired/required tests, re-simulating key target data for the brave new world of unlimited rands to test, and "getting the word out" via publication, travelling to learned meetings and presenting, and so on. I'd guess that this will require a fairly serious grant for at least 3-5 years to do all that needs to be done that I know of already, and may need even more if (as I suspect) things are discovered that require significant new work to be done on testing algorithms themselves, e.g. "moment expansion" type tests, a connection between high-dimensional test failure and bit distribution tests. I have high hopes for the lmn test, although it may prove only the first step in lmnop, lmnopqr, lmnopqrst, etc... -- sampling lagged correlation between l-bit number, m-bit gap, n-bit number, o-bit gap, p-bit number...etc. MANY tests seem to be fancy ways of doing just this and nothing more, interestingly enough -- in some cases ways of examining only a projective subspace of the failures one might occur from a truly systematic test of this sort. For example, a Knuth test that reveals hyperplanar clustering of rand triplets viewed as spatial coordinates is effectively observing non-uniformity of the random integers represented by the conjunction of the three bitstrings... but without attempting to validate true randomness on 96-bit integers! ================================================================== 10/10/06 Well, many many more bugs were discovered (mostly by Charles Karney) and fixed and the tests are much improved as a result. At this point "good" generators pass all but the operm5 and bitstream tests. operm5 I STRONGLY suspect of containing a significant error. bitstream the jury is still out on -- the whole series of n-bit monkey tests bothers me as they seem inevitably related to rgb_bitdist but less specific and sensitive. They are, however, more asymptotic and I've got to really think about it before passing final judgement (hopefully buttressed by very specific examples of correlated failure according to specific patterns). I added a whole selection of bit manipulation tools. I can now grab GUARANTEED sequential bits from the bitstream produced by any of the supported rngs (independent of rmax_bits). I can easily generate a string of (precisely) uints with 32 supposedly random bits from this sequential stream. I can rotate this uint in place and mask/select any of its bits. I can grab arbitrary bit windows within a block of memory, and can grab arbitrary ntuples within a block of memory with periodic boundary conditions. These routines (only) should be used to access the rngs in nearly all tests as they eliminate spurious effects from a rng returning only 31 bits on a test that de facto presumes 32, or 22 bits, or 16 bits. They also permit true overlapping samples to be generated absolutely trivially on a given fixed buffer for overlapping sample tests in dieharder (where it is by no means obvious that overlapping matters in any significant way). It is time to create two new tests. One of them generalizes rgb_bitdist so that the ntuples it samples can be created by more or less arbitrary sample patterns, e.g. stream: 0101010001111101010110101110100010101110101001011001110110110... -------|(repeat) Get sequential 8-tuples e.g. 01010100 -- existing rgb_bitdist test for nbits = 8. stream: 0101010001111101010110101110100010101110101001011001110110110... ----....---|(repeat) Get 4 bits, skip 4 bits, get 4 bits to make the 8-tuple 01010111, test stream of 8-tuples created with this repeating pattern with rgb_bitdist. This should reveal fourier-like correlations of certain kinds within 12 bits, but is LESS sensitive than properly testing 12 bits directly. stream: 0101010001111101010110101110100010101110101001011001110110110... --........--........--........-|(repeat) Get 2 bits, skip 8 bits, get 2 bits, skip 8, get 2, skip 8, get 2 to make the 8-tuple 01111000, test stream of 8-tuples created with this repeating pattern with rgb_bitdist. Note that this test looks for relatively LONG range ntuplet correlations -- a fourier-like correlation over 32 bit cycles and embedded 8 bit cycles at the same time. stream: 0101010001111101010110101110100010101110101001011001110110110... .....................................---|(repeat) Skip 37 bits, get 4, run rgb_bitdist on the stream of 4-tuplets produced e.g. 1101 etc. Note well that 37 bits is odd and prime, as is 41! This approach can look for trouble in difficult places that might well be missed by a binary-happy sampling of sequential uints. This method of sampling can also be run on a single large buffer with overlap. In principle, one can construct a lagged test series that should reveal e.g. hyperplanar distributions very precisely. However, it is still likely limited by the number of bits one can practically run rgb_bitdist on, which appears to be somewhere in the ballpark of 12 to 16. Nevertheless, it also allows one to sample and discover at least a large class of problems across a much larger number of bits. Note well that in principle ALL the tests in dieharder could run on random numbers (uints or whatever) that are generated by using a patterned, lagged selection of bits such as this. We can therefore accomplish a huge amount of flexibility if we build still more routines into bits.c, e.g. uint get_rand_pattern((void)*result,int rsize,int *pattern,gsl_rng *gsl_rng){} where pattern is a variable length vector such as: pattern[0] = 2; pattern[1] = -8; pattern[2] = 2; pattern[3] = -8; pattern[4] = 2; pattern[5] = -8; pattern[6] = 2; pattern[7] = 0; which can be parsed to build an arbitrary sized return very easily. Another routine might use pattern and a varying offset to generate the ten distinct samplings of the bitstream that use one or more of the skipped bits, or even the full 32 corresponding to all overlapping samples with an offset that runs from 0 to 31, pulled either from primary bitstream or from a large cyclic buffer. I'm moderately tempted to write the Master Bit Selector in this way, but the damnable bit selection routines are actually a real pain in the ass to write and especially debug, so I think I'll start with get_rand_pattern (an obvious generalization of get_rand_bits()) and go from there. Then the entire decision on what to run and test is on the calling program. If I make int *pattern a global variable that can be allocated, set, used, and freed by the caller before calling any test and use only get_rand_pattern() to get ints for testing, ALL tests can be run on selected patterns. Dieharder can then sweep over patterns and really test the hell out of rngs... There is a second kind of test that we must implement -- one that I'm very well qualified to write on the basis of published research. The CLT is a very powerful thing. It predicts BOTH the mean AND the variance of any normal sampling process (and probably higher order moments as well -- there should be a series of cumulants, really, that describe the distribution of means). This gives us the ability to write a very subtle and sensitive test for global autocorrelation over arbitrary internal scales. This is a research question (for me, anyway) but it seems that if a system has internal correlations that prevent samples from being truly iid, this will show up as a variance that does not scale correctly with the number of samples. By comparing the VARIANCES, not the means, one should be able to directly observe that a statistic has e.g. fewer samples in it than you think that it does because of correlations between samples, even correlations over a very long time scale. A classic example is a sample stream with true periodicity -- you think that you've accumulated M samples with a variance that scales like 1/sqrt{M} but really you've gotten the same P samples (each with variance that scales like 1/sqrt{P}). The observed variance is therefore going to be much smaller than the expected variance for M samples, off by a factor of sqrt{M/P}. Similar considerations hold for e.g. overlapping bit pattern selection where there is an "autocorrelation time" associated with the overlap. Here we might have a string like: 11010111010101000101010... generating: 11 01 01 11 01 01 01 00 01 01 01 0... and .1 10 10 11 10 10 10 10 00 10 10 10... EACH of these strings can be tested with e.g. rgb_bitdist to see if the patterns are correctly distributed to yield a p-value. If the generator passes two bit tests independent of the offset, the distribution of p will of course be correct for either sequence. What of the "mixed" (interleaved) sequence: 11 01 01 11 01 01 01 ... + 10 10 11 10 10 10 10 ... = 11 10 01 10 01 11 11 10 01 10 01 10 01 10 ... ? Well, it is pretty much guaranteed to have the right number of 00's, 01's, 10's and 11's overall. However, we can make an even stronger statement. Suppose that we know that the original bit sequence passes the >>3<<-tuple rgb_bitdist test. Then in fact we know that it has the right mean distribution of 000 001 010 011 100 101 110 111's. In that case as we parse these combinations into the two overlapping duplets, we get: P(000) = 1/8 => 00 00 P(001) = 1/8 => 00 01 P(010) = 1/8 => 01 10 P(011) = 1/8 => 01 11 P(100) = 1/8 => 10 00 P(101) = 1/8 => 10 01 P(110) = 1/8 => 11 10 P(111) = 1/8 => 11 11 If we see 00, then (as we will with probability 1/4, inherited from the triplet probability table and validated by the passing of rgb_bitdist for the two independent bit sequences separately), we know that it must be followed by 00 or 01. Suppose there were a surplus of 00s relative to 01s. Then there would be more than 1/8 000s and less than 1/8 001s and we could not have passed the rgb_bitdist test for triplets. This idea is obviously extensible for arbitrary ntuplets -- if one passes rgb_bitdist without overlap for n bits, one is guaranteed to pass with overlap at n-1 bits. Consequently there is really >>no point<< in running rgb_bitdist on a series of ntuplets. If one observes the correct (binomial) probability distribution for the duplets 00, 01, 10, 11 over many samples, then one cannot help but have the correct probability distribution for the monets 0 and 1 separately. If one has the the correct binomial distribution of triplets, one cannot help but have the right distribution of duplets and monets, and so on, whether or not overlapping samples are used. This last example is an excellent case of conditional probability at work. If we shift our sample window by one bit from a window that yields a valid distribution, {\em all that matters} is whether or not that additional bit is a 0 or 1 with the correct frequency. There are always only {\em two} possibilities: bbbb0 -> bbbb and bbb0 bbbb1 -> bbbb and bbb1 If that bit is random with probability 0.5, then we should be able to use Bayes theorem to generate very simple proofs that everything stated above is correct. 09/27/08 Well, much water under the dam, many changes and improvements. I'm writing this in a narrow window to consider: How should I change the command line in v3.x.x? Things I need to alter: a) I now provide users with a set of flag bits that select/deselect output options. One number (or several calls with individual flags) turn on and off all output possibilites. b) ./dieharder/superkiss-a-P100-Y2-k20000664000175000017500000021626313707046103014642 0ustar eddedd#=============================================================================# # dieharder version 3.29.6beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| Seed | superkiss| 4.05e+07 |1707679551| #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 100|0.76794321| PASSED diehard_birthdays| 0| 100| 200|0.28496819| PASSED diehard_birthdays| 0| 100| 300|0.46164981| PASSED diehard_birthdays| 0| 100| 400|0.39786537| PASSED diehard_birthdays| 0| 100| 500|0.47016066| PASSED diehard_birthdays| 0| 100| 600|0.32688192| PASSED diehard_birthdays| 0| 100| 700|0.35357282| PASSED diehard_birthdays| 0| 100| 800|0.18293592| PASSED diehard_birthdays| 0| 100| 900|0.39523354| PASSED diehard_birthdays| 0| 100| 1000|0.15258940| PASSED diehard_operm5| 5| 1000000| 100|0.03088889| PASSED diehard_operm5| 5| 1000000| 200|0.00126990| WEAK diehard_operm5| 5| 1000000| 300|0.00000063| FAILED diehard_rank_32x32| 0| 40000| 100|0.66160240| PASSED diehard_rank_32x32| 0| 40000| 200|0.20981157| PASSED diehard_rank_32x32| 0| 40000| 300|0.41205794| PASSED diehard_rank_32x32| 0| 40000| 400|0.61043961| PASSED diehard_rank_32x32| 0| 40000| 500|0.43533995| PASSED diehard_rank_32x32| 0| 40000| 600|0.26047952| PASSED diehard_rank_32x32| 0| 40000| 700|0.24967270| PASSED diehard_rank_32x32| 0| 40000| 800|0.10492334| PASSED diehard_rank_32x32| 0| 40000| 900|0.09571553| PASSED diehard_rank_32x32| 0| 40000| 1000|0.09730042| PASSED diehard_rank_6x8| 0| 100000| 100|0.76263563| PASSED diehard_rank_6x8| 0| 100000| 200|0.90196149| PASSED diehard_rank_6x8| 0| 100000| 300|0.84454379| PASSED diehard_rank_6x8| 0| 100000| 400|0.65672204| PASSED diehard_rank_6x8| 0| 100000| 500|0.47384618| PASSED diehard_rank_6x8| 0| 100000| 600|0.46478878| PASSED diehard_rank_6x8| 0| 100000| 700|0.43977651| PASSED diehard_rank_6x8| 0| 100000| 800|0.90427245| PASSED diehard_rank_6x8| 0| 100000| 900|0.77490271| PASSED diehard_rank_6x8| 0| 100000| 1000|0.92663293| PASSED diehard_bitstream| 0| 2097152| 100|0.51707275| PASSED diehard_bitstream| 0| 2097152| 200|0.63550282| PASSED diehard_bitstream| 0| 2097152| 300|0.21794389| PASSED diehard_bitstream| 0| 2097152| 400|0.70180121| PASSED diehard_bitstream| 0| 2097152| 500|0.71729168| PASSED diehard_bitstream| 0| 2097152| 600|0.90622146| PASSED diehard_bitstream| 0| 2097152| 700|0.71840270| PASSED diehard_bitstream| 0| 2097152| 800|0.50979060| PASSED diehard_bitstream| 0| 2097152| 900|0.54315240| PASSED diehard_bitstream| 0| 2097152| 1000|0.95502078| PASSED diehard_opso| 0| 2097152| 100|0.59967022| PASSED diehard_opso| 0| 2097152| 200|0.49189914| PASSED diehard_opso| 0| 2097152| 300|0.78101466| PASSED diehard_opso| 0| 2097152| 400|0.54940038| PASSED diehard_opso| 0| 2097152| 500|0.43098509| PASSED diehard_opso| 0| 2097152| 600|0.47461866| PASSED diehard_opso| 0| 2097152| 700|0.18774948| PASSED diehard_opso| 0| 2097152| 800|0.06875806| PASSED diehard_opso| 0| 2097152| 900|0.09450416| PASSED diehard_opso| 0| 2097152| 1000|0.33167370| PASSED diehard_oqso| 0| 2097152| 100|0.61121062| PASSED diehard_oqso| 0| 2097152| 200|0.17860469| PASSED diehard_oqso| 0| 2097152| 300|0.18857321| PASSED diehard_oqso| 0| 2097152| 400|0.17639305| PASSED diehard_oqso| 0| 2097152| 500|0.10251012| PASSED diehard_oqso| 0| 2097152| 600|0.37733876| PASSED diehard_oqso| 0| 2097152| 700|0.53303988| PASSED diehard_oqso| 0| 2097152| 800|0.67327348| PASSED diehard_oqso| 0| 2097152| 900|0.64392143| PASSED diehard_oqso| 0| 2097152| 1000|0.81941272| PASSED diehard_dna| 0| 2097152| 100|0.19143716| PASSED diehard_dna| 0| 2097152| 200|0.77777931| PASSED diehard_dna| 0| 2097152| 300|0.58715008| PASSED diehard_dna| 0| 2097152| 400|0.37250895| PASSED diehard_dna| 0| 2097152| 500|0.35059723| PASSED diehard_dna| 0| 2097152| 600|0.19689772| PASSED diehard_dna| 0| 2097152| 700|0.15541553| PASSED diehard_dna| 0| 2097152| 800|0.17972359| PASSED diehard_dna| 0| 2097152| 900|0.08123272| PASSED diehard_dna| 0| 2097152| 1000|0.05394515| PASSED diehard_count_1s_str| 0| 256000| 100|0.87905585| PASSED diehard_count_1s_str| 0| 256000| 200|0.11404421| PASSED diehard_count_1s_str| 0| 256000| 300|0.41654670| PASSED diehard_count_1s_str| 0| 256000| 400|0.19076422| PASSED diehard_count_1s_str| 0| 256000| 500|0.38947435| PASSED diehard_count_1s_str| 0| 256000| 600|0.26624353| PASSED diehard_count_1s_str| 0| 256000| 700|0.26075070| PASSED diehard_count_1s_str| 0| 256000| 800|0.20899417| PASSED diehard_count_1s_str| 0| 256000| 900|0.30989108| PASSED diehard_count_1s_str| 0| 256000| 1000|0.35936724| PASSED diehard_count_1s_byt| 0| 256000| 100|0.73401993| PASSED diehard_count_1s_byt| 0| 256000| 200|0.68029155| PASSED diehard_count_1s_byt| 0| 256000| 300|0.35894616| PASSED diehard_count_1s_byt| 0| 256000| 400|0.43586183| PASSED diehard_count_1s_byt| 0| 256000| 500|0.16834359| PASSED diehard_count_1s_byt| 0| 256000| 600|0.21355899| PASSED diehard_count_1s_byt| 0| 256000| 700|0.71141876| PASSED diehard_count_1s_byt| 0| 256000| 800|0.72150608| PASSED diehard_count_1s_byt| 0| 256000| 900|0.88660539| PASSED diehard_count_1s_byt| 0| 256000| 1000|0.70616780| PASSED diehard_parking_lot| 0| 12000| 100|0.23940415| PASSED diehard_parking_lot| 0| 12000| 200|0.09258776| PASSED diehard_parking_lot| 0| 12000| 300|0.04925776| PASSED diehard_parking_lot| 0| 12000| 400|0.21802606| PASSED diehard_parking_lot| 0| 12000| 500|0.53495900| PASSED diehard_parking_lot| 0| 12000| 600|0.37322926| PASSED diehard_parking_lot| 0| 12000| 700|0.76806362| PASSED diehard_parking_lot| 0| 12000| 800|0.38587301| PASSED diehard_parking_lot| 0| 12000| 900|0.31629955| PASSED diehard_parking_lot| 0| 12000| 1000|0.37149365| PASSED diehard_2dsphere| 2| 8000| 100|0.67599765| PASSED diehard_2dsphere| 2| 8000| 200|0.50980145| PASSED diehard_2dsphere| 2| 8000| 300|0.03715600| PASSED diehard_2dsphere| 2| 8000| 400|0.05474677| PASSED diehard_2dsphere| 2| 8000| 500|0.04854431| PASSED diehard_2dsphere| 2| 8000| 600|0.09661458| PASSED diehard_2dsphere| 2| 8000| 700|0.09094394| PASSED diehard_2dsphere| 2| 8000| 800|0.10600046| PASSED diehard_2dsphere| 2| 8000| 900|0.08546063| PASSED diehard_2dsphere| 2| 8000| 1000|0.11044447| PASSED diehard_3dsphere| 3| 4000| 100|0.55288489| PASSED diehard_3dsphere| 3| 4000| 200|0.23069031| PASSED diehard_3dsphere| 3| 4000| 300|0.13055756| PASSED diehard_3dsphere| 3| 4000| 400|0.44096444| PASSED diehard_3dsphere| 3| 4000| 500|0.30757877| PASSED diehard_3dsphere| 3| 4000| 600|0.44577309| PASSED diehard_3dsphere| 3| 4000| 700|0.35332907| PASSED diehard_3dsphere| 3| 4000| 800|0.51474302| PASSED diehard_3dsphere| 3| 4000| 900|0.83822853| PASSED diehard_3dsphere| 3| 4000| 1000|0.81587025| PASSED diehard_squeeze| 0| 100000| 100|0.05239749| PASSED diehard_squeeze| 0| 100000| 200|0.20930246| PASSED diehard_squeeze| 0| 100000| 300|0.08674863| PASSED diehard_squeeze| 0| 100000| 400|0.20999468| PASSED diehard_squeeze| 0| 100000| 500|0.17385540| PASSED diehard_squeeze| 0| 100000| 600|0.44929527| PASSED diehard_squeeze| 0| 100000| 700|0.39418961| PASSED diehard_squeeze| 0| 100000| 800|0.94080509| PASSED diehard_squeeze| 0| 100000| 900|0.76651132| PASSED diehard_squeeze| 0| 100000| 1000|0.57867509| PASSED diehard_sums| 0| 100| 100|0.01708759| PASSED diehard_sums| 0| 100| 200|0.00009573| WEAK diehard_sums| 0| 100| 300|0.00000050| FAILED diehard_runs| 0| 100000| 100|0.35743542| PASSED diehard_runs| 0| 100000| 100|0.97739121| PASSED diehard_runs| 0| 100000| 200|0.65640821| PASSED diehard_runs| 0| 100000| 200|0.15503429| PASSED diehard_runs| 0| 100000| 300|0.49353277| PASSED diehard_runs| 0| 100000| 300|0.82773842| PASSED diehard_runs| 0| 100000| 400|0.60591937| PASSED diehard_runs| 0| 100000| 400|0.54701929| PASSED diehard_runs| 0| 100000| 500|0.59509059| PASSED diehard_runs| 0| 100000| 500|0.11224505| PASSED diehard_runs| 0| 100000| 600|0.79981812| PASSED diehard_runs| 0| 100000| 600|0.56364586| PASSED diehard_runs| 0| 100000| 700|0.58110727| PASSED diehard_runs| 0| 100000| 700|0.45546484| PASSED diehard_runs| 0| 100000| 800|0.75760965| PASSED diehard_runs| 0| 100000| 800|0.44394600| PASSED diehard_runs| 0| 100000| 900|0.73304905| PASSED diehard_runs| 0| 100000| 900|0.79734413| PASSED diehard_runs| 0| 100000| 1000|0.54868747| PASSED diehard_runs| 0| 100000| 1000|0.58389642| PASSED diehard_craps| 0| 200000| 100|0.00000000| FAILED diehard_craps| 0| 200000| 100|0.00000000| FAILED marsaglia_tsang_gcd| 0| 10000000| 100|0.12542975| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.44958566| PASSED marsaglia_tsang_gcd| 0| 10000000| 200|0.80265862| PASSED marsaglia_tsang_gcd| 0| 10000000| 200|0.57385369| PASSED marsaglia_tsang_gcd| 0| 10000000| 300|0.81909856| PASSED marsaglia_tsang_gcd| 0| 10000000| 300|0.53008639| PASSED marsaglia_tsang_gcd| 0| 10000000| 400|0.73791472| PASSED marsaglia_tsang_gcd| 0| 10000000| 400|0.55910589| PASSED marsaglia_tsang_gcd| 0| 10000000| 500|0.66213847| PASSED marsaglia_tsang_gcd| 0| 10000000| 500|0.84506916| PASSED marsaglia_tsang_gcd| 0| 10000000| 600|0.70738275| PASSED marsaglia_tsang_gcd| 0| 10000000| 600|0.95604719| PASSED marsaglia_tsang_gcd| 0| 10000000| 700|0.84710191| PASSED marsaglia_tsang_gcd| 0| 10000000| 700|0.92430639| PASSED marsaglia_tsang_gcd| 0| 10000000| 800|0.80117443| PASSED marsaglia_tsang_gcd| 0| 10000000| 800|0.49492495| PASSED marsaglia_tsang_gcd| 0| 10000000| 900|0.76320376| PASSED marsaglia_tsang_gcd| 0| 10000000| 900|0.91768860| PASSED marsaglia_tsang_gcd| 0| 10000000| 1000|0.82960760| PASSED marsaglia_tsang_gcd| 0| 10000000| 1000|0.58683606| PASSED sts_monobit| 1| 100000| 100|0.48267354| PASSED sts_monobit| 1| 100000| 200|0.10998928| PASSED sts_monobit| 1| 100000| 300|0.39638554| PASSED sts_monobit| 1| 100000| 400|0.62708250| PASSED sts_monobit| 1| 100000| 500|0.66680120| PASSED sts_monobit| 1| 100000| 600|0.27977461| PASSED sts_monobit| 1| 100000| 700|0.25081134| PASSED sts_monobit| 1| 100000| 800|0.17605237| PASSED sts_monobit| 1| 100000| 900|0.08024063| PASSED sts_monobit| 1| 100000| 1000|0.07558006| PASSED sts_runs| 2| 100000| 100|0.33026441| PASSED sts_runs| 2| 100000| 200|0.70274813| PASSED sts_runs| 2| 100000| 300|0.90817214| PASSED sts_runs| 2| 100000| 400|0.98093671| PASSED sts_runs| 2| 100000| 500|0.81473708| PASSED sts_runs| 2| 100000| 600|0.28389945| PASSED sts_runs| 2| 100000| 700|0.33171261| PASSED sts_runs| 2| 100000| 800|0.68604217| PASSED sts_runs| 2| 100000| 900|0.89627058| PASSED sts_runs| 2| 100000| 1000|0.69649328| PASSED sts_serial| 1| 100000| 100|0.36567302| PASSED sts_serial| 2| 100000| 100|0.39422938| PASSED sts_serial| 3| 100000| 100|0.50177918| PASSED sts_serial| 3| 100000| 100|0.33674443| PASSED sts_serial| 4| 100000| 100|0.38995246| PASSED sts_serial| 4| 100000| 100|0.62590543| PASSED sts_serial| 5| 100000| 100|0.85070756| PASSED sts_serial| 5| 100000| 100|0.18014697| PASSED sts_serial| 6| 100000| 100|0.92973805| PASSED sts_serial| 6| 100000| 100|0.16908720| PASSED sts_serial| 7| 100000| 100|0.93061141| PASSED sts_serial| 7| 100000| 100|0.52105700| PASSED sts_serial| 8| 100000| 100|0.75556782| PASSED sts_serial| 8| 100000| 100|0.71698344| PASSED sts_serial| 9| 100000| 100|0.46105744| PASSED sts_serial| 9| 100000| 100|0.97052999| PASSED sts_serial| 10| 100000| 100|0.82152759| PASSED sts_serial| 10| 100000| 100|0.67396782| PASSED sts_serial| 11| 100000| 100|0.36968510| PASSED sts_serial| 11| 100000| 100|0.69629044| PASSED sts_serial| 12| 100000| 100|0.11573436| PASSED sts_serial| 12| 100000| 100|0.41015127| PASSED sts_serial| 13| 100000| 100|0.39504298| PASSED sts_serial| 13| 100000| 100|0.84340771| PASSED sts_serial| 14| 100000| 100|0.43271876| PASSED sts_serial| 14| 100000| 100|0.27056490| PASSED sts_serial| 15| 100000| 100|0.30295646| PASSED sts_serial| 15| 100000| 100|0.16009170| PASSED sts_serial| 16| 100000| 100|0.77447947| PASSED sts_serial| 16| 100000| 100|0.53110123| PASSED sts_serial| 1| 100000| 200|0.36470638| PASSED sts_serial| 2| 100000| 200|0.32848607| PASSED sts_serial| 3| 100000| 200|0.50391942| PASSED sts_serial| 3| 100000| 200|0.58849085| PASSED sts_serial| 4| 100000| 200|0.60913598| PASSED sts_serial| 4| 100000| 200|0.90551534| PASSED sts_serial| 5| 100000| 200|0.96125779| PASSED sts_serial| 5| 100000| 200|0.29265282| PASSED sts_serial| 6| 100000| 200|0.58499023| PASSED sts_serial| 6| 100000| 200|0.37593697| PASSED sts_serial| 7| 100000| 200|0.72091383| PASSED sts_serial| 7| 100000| 200|0.79939860| PASSED sts_serial| 8| 100000| 200|0.19929566| PASSED sts_serial| 8| 100000| 200|0.06981224| PASSED sts_serial| 9| 100000| 200|0.02377794| PASSED sts_serial| 9| 100000| 200|0.62375472| PASSED sts_serial| 10| 100000| 200|0.54644078| PASSED sts_serial| 10| 100000| 200|0.44374112| PASSED sts_serial| 11| 100000| 200|0.35027053| PASSED sts_serial| 11| 100000| 200|0.85105502| PASSED sts_serial| 12| 100000| 200|0.03105783| PASSED sts_serial| 12| 100000| 200|0.48162273| PASSED sts_serial| 13| 100000| 200|0.43001617| PASSED sts_serial| 13| 100000| 200|0.77288864| PASSED sts_serial| 14| 100000| 200|0.76048636| PASSED sts_serial| 14| 100000| 200|0.08256701| PASSED sts_serial| 15| 100000| 200|0.67050614| PASSED sts_serial| 15| 100000| 200|0.78082767| PASSED sts_serial| 16| 100000| 200|0.98117507| PASSED sts_serial| 16| 100000| 200|0.63131095| PASSED sts_serial| 1| 100000| 300|0.32771941| PASSED sts_serial| 2| 100000| 300|0.92194450| PASSED sts_serial| 3| 100000| 300|0.30736434| PASSED sts_serial| 3| 100000| 300|0.28011956| PASSED sts_serial| 4| 100000| 300|0.48265837| PASSED sts_serial| 4| 100000| 300|0.64739940| PASSED sts_serial| 5| 100000| 300|0.76634417| PASSED sts_serial| 5| 100000| 300|0.34166654| PASSED sts_serial| 6| 100000| 300|0.47252043| PASSED sts_serial| 6| 100000| 300|0.30545838| PASSED sts_serial| 7| 100000| 300|0.49869763| PASSED sts_serial| 7| 100000| 300|0.77734607| PASSED sts_serial| 8| 100000| 300|0.07719103| PASSED sts_serial| 8| 100000| 300|0.33271995| PASSED sts_serial| 9| 100000| 300|0.04442778| PASSED sts_serial| 9| 100000| 300|0.59222480| PASSED sts_serial| 10| 100000| 300|0.43720984| PASSED sts_serial| 10| 100000| 300|0.60160641| PASSED sts_serial| 11| 100000| 300|0.65122221| PASSED sts_serial| 11| 100000| 300|0.99542365| WEAK sts_serial| 12| 100000| 300|0.44051024| PASSED sts_serial| 12| 100000| 300|0.70170219| PASSED sts_serial| 13| 100000| 300|0.89438089| PASSED sts_serial| 13| 100000| 300|0.62794372| PASSED sts_serial| 14| 100000| 300|0.75220276| PASSED sts_serial| 14| 100000| 300|0.37585950| PASSED sts_serial| 15| 100000| 300|0.93891132| PASSED sts_serial| 15| 100000| 300|0.76893020| PASSED sts_serial| 16| 100000| 300|0.79524195| PASSED sts_serial| 16| 100000| 300|0.56703228| PASSED sts_serial| 1| 100000| 400|0.33490290| PASSED sts_serial| 2| 100000| 400|0.85653206| PASSED sts_serial| 3| 100000| 400|0.67103859| PASSED sts_serial| 3| 100000| 400|0.28598329| PASSED sts_serial| 4| 100000| 400|0.73927835| PASSED sts_serial| 4| 100000| 400|0.89401807| PASSED sts_serial| 5| 100000| 400|0.71622140| PASSED sts_serial| 5| 100000| 400|0.24331916| PASSED sts_serial| 6| 100000| 400|0.41878177| PASSED sts_serial| 6| 100000| 400|0.43320789| PASSED sts_serial| 7| 100000| 400|0.86716706| PASSED sts_serial| 7| 100000| 400|0.70358834| PASSED sts_serial| 8| 100000| 400|0.36594293| PASSED sts_serial| 8| 100000| 400|0.43713836| PASSED sts_serial| 9| 100000| 400|0.20746112| PASSED sts_serial| 9| 100000| 400|0.25426588| PASSED sts_serial| 10| 100000| 400|0.73799813| PASSED sts_serial| 10| 100000| 400|0.57639037| PASSED sts_serial| 11| 100000| 400|0.36992870| PASSED sts_serial| 11| 100000| 400|0.60638862| PASSED sts_serial| 12| 100000| 400|0.28550220| PASSED sts_serial| 12| 100000| 400|0.81708967| PASSED sts_serial| 13| 100000| 400|0.90565641| PASSED sts_serial| 13| 100000| 400|0.88174480| PASSED sts_serial| 14| 100000| 400|0.64079978| PASSED sts_serial| 14| 100000| 400|0.28476358| PASSED sts_serial| 15| 100000| 400|0.68391967| PASSED sts_serial| 15| 100000| 400|0.67522083| PASSED sts_serial| 16| 100000| 400|0.64210779| PASSED sts_serial| 16| 100000| 400|0.59589894| PASSED sts_serial| 1| 100000| 500|0.80764356| PASSED sts_serial| 2| 100000| 500|0.41591150| PASSED sts_serial| 3| 100000| 500|0.78174844| PASSED sts_serial| 3| 100000| 500|0.63599609| PASSED sts_serial| 4| 100000| 500|0.51634987| PASSED sts_serial| 4| 100000| 500|0.82327373| PASSED sts_serial| 5| 100000| 500|0.30191057| PASSED sts_serial| 5| 100000| 500|0.24707063| PASSED sts_serial| 6| 100000| 500|0.13383495| PASSED sts_serial| 6| 100000| 500|0.53627766| PASSED sts_serial| 7| 100000| 500|0.85423970| PASSED sts_serial| 7| 100000| 500|0.77791313| PASSED sts_serial| 8| 100000| 500|0.35792004| PASSED sts_serial| 8| 100000| 500|0.49292899| PASSED sts_serial| 9| 100000| 500|0.12547894| PASSED sts_serial| 9| 100000| 500|0.17906270| PASSED sts_serial| 10| 100000| 500|0.66832751| PASSED sts_serial| 10| 100000| 500|0.73617580| PASSED sts_serial| 11| 100000| 500|0.34799263| PASSED sts_serial| 11| 100000| 500|0.91670359| PASSED sts_serial| 12| 100000| 500|0.59818041| PASSED sts_serial| 12| 100000| 500|0.77115602| PASSED sts_serial| 13| 100000| 500|0.93779126| PASSED sts_serial| 13| 100000| 500|0.94996566| PASSED sts_serial| 14| 100000| 500|0.95744950| PASSED sts_serial| 14| 100000| 500|0.23959542| PASSED sts_serial| 15| 100000| 500|0.47471495| PASSED sts_serial| 15| 100000| 500|0.79464416| PASSED sts_serial| 16| 100000| 500|0.80022556| PASSED sts_serial| 16| 100000| 500|0.69226984| PASSED sts_serial| 1| 100000| 600|0.91037650| PASSED sts_serial| 2| 100000| 600|0.45259099| PASSED sts_serial| 3| 100000| 600|0.82179783| PASSED sts_serial| 3| 100000| 600|0.65605213| PASSED sts_serial| 4| 100000| 600|0.28578580| PASSED sts_serial| 4| 100000| 600|0.30121352| PASSED sts_serial| 5| 100000| 600|0.29767841| PASSED sts_serial| 5| 100000| 600|0.66837820| PASSED sts_serial| 6| 100000| 600|0.19288685| PASSED sts_serial| 6| 100000| 600|0.88852460| PASSED sts_serial| 7| 100000| 600|0.47355892| PASSED sts_serial| 7| 100000| 600|0.67458308| PASSED sts_serial| 8| 100000| 600|0.58340274| PASSED sts_serial| 8| 100000| 600|0.57780374| PASSED sts_serial| 9| 100000| 600|0.22652054| PASSED sts_serial| 9| 100000| 600|0.27564261| PASSED sts_serial| 10| 100000| 600|0.83038709| PASSED sts_serial| 10| 100000| 600|0.30016077| PASSED sts_serial| 11| 100000| 600|0.73315526| PASSED sts_serial| 11| 100000| 600|0.86838228| PASSED sts_serial| 12| 100000| 600|0.73342176| PASSED sts_serial| 12| 100000| 600|0.79368474| PASSED sts_serial| 13| 100000| 600|0.96363079| PASSED sts_serial| 13| 100000| 600|0.93495830| PASSED sts_serial| 14| 100000| 600|0.90035607| PASSED sts_serial| 14| 100000| 600|0.14663908| PASSED sts_serial| 15| 100000| 600|0.30420257| PASSED sts_serial| 15| 100000| 600|0.36406894| PASSED sts_serial| 16| 100000| 600|0.73801788| PASSED sts_serial| 16| 100000| 600|0.62326799| PASSED sts_serial| 1| 100000| 700|0.77683812| PASSED sts_serial| 2| 100000| 700|0.31408439| PASSED sts_serial| 3| 100000| 700|0.73133747| PASSED sts_serial| 3| 100000| 700|0.82663281| PASSED sts_serial| 4| 100000| 700|0.15276734| PASSED sts_serial| 4| 100000| 700|0.37873858| PASSED sts_serial| 5| 100000| 700|0.17140385| PASSED sts_serial| 5| 100000| 700|0.53135903| PASSED sts_serial| 6| 100000| 700|0.42993435| PASSED sts_serial| 6| 100000| 700|0.48972193| PASSED sts_serial| 7| 100000| 700|0.43355912| PASSED sts_serial| 7| 100000| 700|0.71459133| PASSED sts_serial| 8| 100000| 700|0.34970656| PASSED sts_serial| 8| 100000| 700|0.81587901| PASSED sts_serial| 9| 100000| 700|0.11231491| PASSED sts_serial| 9| 100000| 700|0.27950434| PASSED sts_serial| 10| 100000| 700|0.78341037| PASSED sts_serial| 10| 100000| 700|0.35685544| PASSED sts_serial| 11| 100000| 700|0.92615891| PASSED sts_serial| 11| 100000| 700|0.86908544| PASSED sts_serial| 12| 100000| 700|0.83659400| PASSED sts_serial| 12| 100000| 700|0.71137955| PASSED sts_serial| 13| 100000| 700|0.89700377| PASSED sts_serial| 13| 100000| 700|0.54960908| PASSED sts_serial| 14| 100000| 700|0.72561424| PASSED sts_serial| 14| 100000| 700|0.30723489| PASSED sts_serial| 15| 100000| 700|0.13083568| PASSED sts_serial| 15| 100000| 700|0.45712608| PASSED sts_serial| 16| 100000| 700|0.74333184| PASSED sts_serial| 16| 100000| 700|0.65513351| PASSED sts_serial| 1| 100000| 800|0.56119511| PASSED sts_serial| 2| 100000| 800|0.10774009| PASSED sts_serial| 3| 100000| 800|0.30577866| PASSED sts_serial| 3| 100000| 800|0.73717776| PASSED sts_serial| 4| 100000| 800|0.06551076| PASSED sts_serial| 4| 100000| 800|0.30679455| PASSED sts_serial| 5| 100000| 800|0.29732373| PASSED sts_serial| 5| 100000| 800|0.40990451| PASSED sts_serial| 6| 100000| 800|0.69376297| PASSED sts_serial| 6| 100000| 800|0.75371378| PASSED sts_serial| 7| 100000| 800|0.43527119| PASSED sts_serial| 7| 100000| 800|0.93076184| PASSED sts_serial| 8| 100000| 800|0.66008179| PASSED sts_serial| 8| 100000| 800|0.69182881| PASSED sts_serial| 9| 100000| 800|0.36155313| PASSED sts_serial| 9| 100000| 800|0.53399621| PASSED sts_serial| 10| 100000| 800|0.96388970| PASSED sts_serial| 10| 100000| 800|0.25840392| PASSED sts_serial| 11| 100000| 800|0.95167746| PASSED sts_serial| 11| 100000| 800|0.95681193| PASSED sts_serial| 12| 100000| 800|0.84716324| PASSED sts_serial| 12| 100000| 800|0.69860538| PASSED sts_serial| 13| 100000| 800|0.61922372| PASSED sts_serial| 13| 100000| 800|0.29535280| PASSED sts_serial| 14| 100000| 800|0.58322030| PASSED sts_serial| 14| 100000| 800|0.07152616| PASSED sts_serial| 15| 100000| 800|0.19552604| PASSED sts_serial| 15| 100000| 800|0.61966821| PASSED sts_serial| 16| 100000| 800|0.59929376| PASSED sts_serial| 16| 100000| 800|0.80301289| PASSED sts_serial| 1| 100000| 900|0.42126925| PASSED sts_serial| 2| 100000| 900|0.09534431| PASSED sts_serial| 3| 100000| 900|0.30612732| PASSED sts_serial| 3| 100000| 900|0.64797894| PASSED sts_serial| 4| 100000| 900|0.10855602| PASSED sts_serial| 4| 100000| 900|0.51036757| PASSED sts_serial| 5| 100000| 900|0.39779932| PASSED sts_serial| 5| 100000| 900|0.49874490| PASSED sts_serial| 6| 100000| 900|0.66837963| PASSED sts_serial| 6| 100000| 900|0.60254376| PASSED sts_serial| 7| 100000| 900|0.51515333| PASSED sts_serial| 7| 100000| 900|0.88040786| PASSED sts_serial| 8| 100000| 900|0.34626005| PASSED sts_serial| 8| 100000| 900|0.71526095| PASSED sts_serial| 9| 100000| 900|0.25125313| PASSED sts_serial| 9| 100000| 900|0.72387484| PASSED sts_serial| 10| 100000| 900|0.74453869| PASSED sts_serial| 10| 100000| 900|0.73075636| PASSED sts_serial| 11| 100000| 900|0.87017006| PASSED sts_serial| 11| 100000| 900|0.86630503| PASSED sts_serial| 12| 100000| 900|0.82481980| PASSED sts_serial| 12| 100000| 900|0.97412979| PASSED sts_serial| 13| 100000| 900|0.99195166| PASSED sts_serial| 13| 100000| 900|0.58043244| PASSED sts_serial| 14| 100000| 900|0.89265799| PASSED sts_serial| 14| 100000| 900|0.19766791| PASSED sts_serial| 15| 100000| 900|0.20073938| PASSED sts_serial| 15| 100000| 900|0.37710506| PASSED sts_serial| 16| 100000| 900|0.70442730| PASSED sts_serial| 16| 100000| 900|0.82219382| PASSED sts_serial| 1| 100000| 1000|0.69041718| PASSED sts_serial| 2| 100000| 1000|0.11732716| PASSED sts_serial| 3| 100000| 1000|0.57600519| PASSED sts_serial| 3| 100000| 1000|0.40010570| PASSED sts_serial| 4| 100000| 1000|0.29431513| PASSED sts_serial| 4| 100000| 1000|0.79455056| PASSED sts_serial| 5| 100000| 1000|0.72425270| PASSED sts_serial| 5| 100000| 1000|0.68044334| PASSED sts_serial| 6| 100000| 1000|0.84222193| PASSED sts_serial| 6| 100000| 1000|0.66401187| PASSED sts_serial| 7| 100000| 1000|0.51835227| PASSED sts_serial| 7| 100000| 1000|0.81816820| PASSED sts_serial| 8| 100000| 1000|0.46219180| PASSED sts_serial| 8| 100000| 1000|0.52592431| PASSED sts_serial| 9| 100000| 1000|0.19952449| PASSED sts_serial| 9| 100000| 1000|0.76673813| PASSED sts_serial| 10| 100000| 1000|0.70210555| PASSED sts_serial| 10| 100000| 1000|0.71651412| PASSED sts_serial| 11| 100000| 1000|0.56555466| PASSED sts_serial| 11| 100000| 1000|0.74570278| PASSED sts_serial| 12| 100000| 1000|0.98093270| PASSED sts_serial| 12| 100000| 1000|0.75594756| PASSED sts_serial| 13| 100000| 1000|0.97860683| PASSED sts_serial| 13| 100000| 1000|0.71130968| PASSED sts_serial| 14| 100000| 1000|0.98436613| PASSED sts_serial| 14| 100000| 1000|0.69594615| PASSED sts_serial| 15| 100000| 1000|0.46815784| PASSED sts_serial| 15| 100000| 1000|0.38794376| PASSED sts_serial| 16| 100000| 1000|0.79276045| PASSED sts_serial| 16| 100000| 1000|0.73414747| PASSED rgb_bitdist| 1| 100000| 100|0.39961507| PASSED rgb_bitdist| 1| 100000| 200|0.93280117| PASSED rgb_bitdist| 1| 100000| 300|0.19129856| PASSED rgb_bitdist| 1| 100000| 400|0.52631064| PASSED rgb_bitdist| 1| 100000| 500|0.75494909| PASSED rgb_bitdist| 1| 100000| 600|0.39964795| PASSED rgb_bitdist| 1| 100000| 700|0.44195331| PASSED rgb_bitdist| 1| 100000| 800|0.34913242| PASSED rgb_bitdist| 1| 100000| 900|0.35684523| PASSED rgb_bitdist| 1| 100000| 1000|0.20434489| PASSED rgb_bitdist| 2| 100000| 100|0.20767249| PASSED rgb_bitdist| 2| 100000| 200|0.89417137| PASSED rgb_bitdist| 2| 100000| 300|0.98406338| PASSED rgb_bitdist| 2| 100000| 400|0.44371755| PASSED rgb_bitdist| 2| 100000| 500|0.05676214| PASSED rgb_bitdist| 2| 100000| 600|0.10010313| PASSED rgb_bitdist| 2| 100000| 700|0.08728320| PASSED rgb_bitdist| 2| 100000| 800|0.10667043| PASSED rgb_bitdist| 2| 100000| 900|0.32555198| PASSED rgb_bitdist| 2| 100000| 1000|0.53355992| PASSED rgb_bitdist| 3| 100000| 100|0.25656923| PASSED rgb_bitdist| 3| 100000| 200|0.61704492| PASSED rgb_bitdist| 3| 100000| 300|0.61176738| PASSED rgb_bitdist| 3| 100000| 400|0.47966297| PASSED rgb_bitdist| 3| 100000| 500|0.64849065| PASSED rgb_bitdist| 3| 100000| 600|0.88992196| PASSED rgb_bitdist| 3| 100000| 700|0.69936674| PASSED rgb_bitdist| 3| 100000| 800|0.81895669| PASSED rgb_bitdist| 3| 100000| 900|0.84860444| PASSED rgb_bitdist| 3| 100000| 1000|0.46848091| PASSED rgb_bitdist| 4| 100000| 100|0.67707945| PASSED rgb_bitdist| 4| 100000| 200|0.88559146| PASSED rgb_bitdist| 4| 100000| 300|0.45118790| PASSED rgb_bitdist| 4| 100000| 400|0.36935768| PASSED rgb_bitdist| 4| 100000| 500|0.46354199| PASSED rgb_bitdist| 4| 100000| 600|0.72832862| PASSED rgb_bitdist| 4| 100000| 700|0.52272962| PASSED rgb_bitdist| 4| 100000| 800|0.45349900| PASSED rgb_bitdist| 4| 100000| 900|0.43270738| PASSED rgb_bitdist| 4| 100000| 1000|0.52307952| PASSED rgb_bitdist| 5| 100000| 100|0.19332184| PASSED rgb_bitdist| 5| 100000| 200|0.24220221| PASSED rgb_bitdist| 5| 100000| 300|0.69835703| PASSED rgb_bitdist| 5| 100000| 400|0.32385728| PASSED rgb_bitdist| 5| 100000| 500|0.48071137| PASSED rgb_bitdist| 5| 100000| 600|0.61798460| PASSED rgb_bitdist| 5| 100000| 700|0.43035490| PASSED rgb_bitdist| 5| 100000| 800|0.41772584| PASSED rgb_bitdist| 5| 100000| 900|0.77145740| PASSED rgb_bitdist| 5| 100000| 1000|0.80403028| PASSED rgb_bitdist| 6| 100000| 100|0.90634728| PASSED rgb_bitdist| 6| 100000| 200|0.92126398| PASSED rgb_bitdist| 6| 100000| 300|0.70063494| PASSED rgb_bitdist| 6| 100000| 400|0.49561261| PASSED rgb_bitdist| 6| 100000| 500|0.25314835| PASSED rgb_bitdist| 6| 100000| 600|0.20639040| PASSED rgb_bitdist| 6| 100000| 700|0.49654427| PASSED rgb_bitdist| 6| 100000| 800|0.40484385| PASSED rgb_bitdist| 6| 100000| 900|0.46978190| PASSED rgb_bitdist| 6| 100000| 1000|0.28788465| PASSED rgb_bitdist| 7| 100000| 100|0.39588262| PASSED rgb_bitdist| 7| 100000| 200|0.98294635| PASSED rgb_bitdist| 7| 100000| 300|0.37982655| PASSED rgb_bitdist| 7| 100000| 400|0.83666948| PASSED rgb_bitdist| 7| 100000| 500|0.49081455| PASSED rgb_bitdist| 7| 100000| 600|0.33995692| PASSED rgb_bitdist| 7| 100000| 700|0.09908343| PASSED rgb_bitdist| 7| 100000| 800|0.08834900| PASSED rgb_bitdist| 7| 100000| 900|0.04583426| PASSED rgb_bitdist| 7| 100000| 1000|0.06804715| PASSED rgb_bitdist| 8| 100000| 100|0.10552599| PASSED rgb_bitdist| 8| 100000| 200|0.02878626| PASSED rgb_bitdist| 8| 100000| 300|0.07658716| PASSED rgb_bitdist| 8| 100000| 400|0.25679491| PASSED rgb_bitdist| 8| 100000| 500|0.13316070| PASSED rgb_bitdist| 8| 100000| 600|0.12185500| PASSED rgb_bitdist| 8| 100000| 700|0.16536504| PASSED rgb_bitdist| 8| 100000| 800|0.16483918| PASSED rgb_bitdist| 8| 100000| 900|0.12435262| PASSED rgb_bitdist| 8| 100000| 1000|0.40151084| PASSED rgb_bitdist| 9| 100000| 100|0.02130503| PASSED rgb_bitdist| 9| 100000| 200|0.11357987| PASSED rgb_bitdist| 9| 100000| 300|0.18862799| PASSED rgb_bitdist| 9| 100000| 400|0.41403040| PASSED rgb_bitdist| 9| 100000| 500|0.23033929| PASSED rgb_bitdist| 9| 100000| 600|0.08034041| PASSED rgb_bitdist| 9| 100000| 700|0.09131026| PASSED rgb_bitdist| 9| 100000| 800|0.02102082| PASSED rgb_bitdist| 9| 100000| 900|0.10364394| PASSED rgb_bitdist| 9| 100000| 1000|0.35686344| PASSED rgb_bitdist| 10| 100000| 100|0.64687636| PASSED rgb_bitdist| 10| 100000| 200|0.69188321| PASSED rgb_bitdist| 10| 100000| 300|0.25790291| PASSED rgb_bitdist| 10| 100000| 400|0.50129739| PASSED rgb_bitdist| 10| 100000| 500|0.83594588| PASSED rgb_bitdist| 10| 100000| 600|0.96435198| PASSED rgb_bitdist| 10| 100000| 700|0.96894551| PASSED rgb_bitdist| 10| 100000| 800|0.96816599| PASSED rgb_bitdist| 10| 100000| 900|0.88315903| PASSED rgb_bitdist| 10| 100000| 1000|0.89649160| PASSED rgb_bitdist| 11| 100000| 100|0.24103089| PASSED rgb_bitdist| 11| 100000| 200|0.37811172| PASSED rgb_bitdist| 11| 100000| 300|0.86595745| PASSED rgb_bitdist| 11| 100000| 400|0.43036495| PASSED rgb_bitdist| 11| 100000| 500|0.09670365| PASSED rgb_bitdist| 11| 100000| 600|0.15816079| PASSED rgb_bitdist| 11| 100000| 700|0.02233305| PASSED rgb_bitdist| 11| 100000| 800|0.03864940| PASSED rgb_bitdist| 11| 100000| 900|0.02311207| PASSED rgb_bitdist| 11| 100000| 1000|0.02470481| PASSED rgb_bitdist| 12| 100000| 100|0.02306099| PASSED rgb_bitdist| 12| 100000| 200|0.06109740| PASSED rgb_bitdist| 12| 100000| 300|0.05557203| PASSED rgb_bitdist| 12| 100000| 400|0.16863492| PASSED rgb_bitdist| 12| 100000| 500|0.11410127| PASSED rgb_bitdist| 12| 100000| 600|0.06898830| PASSED rgb_bitdist| 12| 100000| 700|0.09995918| PASSED rgb_bitdist| 12| 100000| 800|0.39378782| PASSED rgb_bitdist| 12| 100000| 900|0.25362202| PASSED rgb_bitdist| 12| 100000| 1000|0.28323277| PASSED rgb_minimum_distance| 2| 10000| 1000|0.77027891| PASSED rgb_minimum_distance| 3| 10000| 1000|0.35710566| PASSED rgb_minimum_distance| 4| 10000| 1000|0.43330492| PASSED rgb_minimum_distance| 5| 10000| 1000|0.83783422| PASSED rgb_permutations| 2| 100000| 100|0.30504795| PASSED rgb_permutations| 2| 100000| 200|0.77572301| PASSED rgb_permutations| 2| 100000| 300|0.79011427| PASSED rgb_permutations| 2| 100000| 400|0.60154550| PASSED rgb_permutations| 2| 100000| 500|0.56591402| PASSED rgb_permutations| 2| 100000| 600|0.63625308| PASSED rgb_permutations| 2| 100000| 700|0.44093771| PASSED rgb_permutations| 2| 100000| 800|0.86980591| PASSED rgb_permutations| 2| 100000| 900|0.60259574| PASSED rgb_permutations| 2| 100000| 1000|0.74645688| PASSED rgb_permutations| 3| 100000| 100|0.84155901| PASSED rgb_permutations| 3| 100000| 200|0.57636419| PASSED rgb_permutations| 3| 100000| 300|0.29187907| PASSED rgb_permutations| 3| 100000| 400|0.11448945| PASSED rgb_permutations| 3| 100000| 500|0.16894836| PASSED rgb_permutations| 3| 100000| 600|0.34491959| PASSED rgb_permutations| 3| 100000| 700|0.61049419| PASSED rgb_permutations| 3| 100000| 800|0.76586377| PASSED rgb_permutations| 3| 100000| 900|0.78345857| PASSED rgb_permutations| 3| 100000| 1000|0.91944068| PASSED rgb_permutations| 4| 100000| 100|0.73852589| PASSED rgb_permutations| 4| 100000| 200|0.45680659| PASSED rgb_permutations| 4| 100000| 300|0.39939592| PASSED rgb_permutations| 4| 100000| 400|0.19052206| PASSED rgb_permutations| 4| 100000| 500|0.20692241| PASSED rgb_permutations| 4| 100000| 600|0.16544882| PASSED rgb_permutations| 4| 100000| 700|0.20829989| PASSED rgb_permutations| 4| 100000| 800|0.19977611| PASSED rgb_permutations| 4| 100000| 900|0.07264458| PASSED rgb_permutations| 4| 100000| 1000|0.07050192| PASSED rgb_permutations| 5| 100000| 100|0.72887738| PASSED rgb_permutations| 5| 100000| 200|0.99677589| WEAK rgb_permutations| 5| 100000| 300|0.99371466| PASSED rgb_permutations| 5| 100000| 400|0.95815909| PASSED rgb_permutations| 5| 100000| 500|0.45363372| PASSED rgb_permutations| 5| 100000| 600|0.38500040| PASSED rgb_permutations| 5| 100000| 700|0.17404421| PASSED rgb_permutations| 5| 100000| 800|0.13621389| PASSED rgb_permutations| 5| 100000| 900|0.10393402| PASSED rgb_permutations| 5| 100000| 1000|0.13330748| PASSED rgb_lagged_sum| 0| 1000000| 100|0.60552926| PASSED rgb_lagged_sum| 0| 1000000| 200|0.95621349| PASSED rgb_lagged_sum| 0| 1000000| 300|0.73848538| PASSED rgb_lagged_sum| 0| 1000000| 400|0.81768468| PASSED rgb_lagged_sum| 0| 1000000| 500|0.59121863| PASSED rgb_lagged_sum| 0| 1000000| 600|0.72566817| PASSED rgb_lagged_sum| 0| 1000000| 700|0.98708109| PASSED rgb_lagged_sum| 0| 1000000| 800|0.99906151| WEAK rgb_lagged_sum| 0| 1000000| 900|0.98009048| PASSED rgb_lagged_sum| 0| 1000000| 1000|0.96471601| PASSED rgb_lagged_sum| 1| 1000000| 100|0.02231452| PASSED rgb_lagged_sum| 1| 1000000| 200|0.00430838| WEAK rgb_lagged_sum| 1| 1000000| 300|0.05685038| PASSED rgb_lagged_sum| 1| 1000000| 400|0.25239468| PASSED rgb_lagged_sum| 1| 1000000| 500|0.56328823| PASSED rgb_lagged_sum| 1| 1000000| 600|0.65826348| PASSED rgb_lagged_sum| 1| 1000000| 700|0.99387543| PASSED rgb_lagged_sum| 1| 1000000| 800|0.96945999| PASSED rgb_lagged_sum| 1| 1000000| 900|0.65651461| PASSED rgb_lagged_sum| 1| 1000000| 1000|0.23670430| PASSED rgb_lagged_sum| 2| 1000000| 100|0.25859570| PASSED rgb_lagged_sum| 2| 1000000| 200|0.06533953| PASSED rgb_lagged_sum| 2| 1000000| 300|0.00425853| WEAK rgb_lagged_sum| 2| 1000000| 400|0.00819619| PASSED rgb_lagged_sum| 2| 1000000| 500|0.01605297| PASSED rgb_lagged_sum| 2| 1000000| 600|0.06518998| PASSED rgb_lagged_sum| 2| 1000000| 700|0.13242899| PASSED rgb_lagged_sum| 2| 1000000| 800|0.04924788| PASSED rgb_lagged_sum| 2| 1000000| 900|0.04637317| PASSED rgb_lagged_sum| 2| 1000000| 1000|0.20151425| PASSED rgb_lagged_sum| 3| 1000000| 100|0.24845199| PASSED rgb_lagged_sum| 3| 1000000| 200|0.95573092| PASSED rgb_lagged_sum| 3| 1000000| 300|0.76813510| PASSED rgb_lagged_sum| 3| 1000000| 400|0.65040822| PASSED rgb_lagged_sum| 3| 1000000| 500|0.43924302| PASSED rgb_lagged_sum| 3| 1000000| 600|0.70952445| PASSED rgb_lagged_sum| 3| 1000000| 700|0.54757075| PASSED rgb_lagged_sum| 3| 1000000| 800|0.37529963| PASSED rgb_lagged_sum| 3| 1000000| 900|0.16443581| PASSED rgb_lagged_sum| 3| 1000000| 1000|0.22336221| PASSED rgb_lagged_sum| 4| 1000000| 100|0.48873771| PASSED rgb_lagged_sum| 4| 1000000| 200|0.44701330| PASSED rgb_lagged_sum| 4| 1000000| 300|0.38318436| PASSED rgb_lagged_sum| 4| 1000000| 400|0.46307673| PASSED rgb_lagged_sum| 4| 1000000| 500|0.49104451| PASSED rgb_lagged_sum| 4| 1000000| 600|0.45443787| PASSED rgb_lagged_sum| 4| 1000000| 700|0.37600570| PASSED rgb_lagged_sum| 4| 1000000| 800|0.31019256| PASSED rgb_lagged_sum| 4| 1000000| 900|0.33099651| PASSED rgb_lagged_sum| 4| 1000000| 1000|0.48115111| PASSED rgb_lagged_sum| 5| 1000000| 100|0.37891886| PASSED rgb_lagged_sum| 5| 1000000| 200|0.48215392| PASSED rgb_lagged_sum| 5| 1000000| 300|0.47055122| PASSED rgb_lagged_sum| 5| 1000000| 400|0.31749927| PASSED rgb_lagged_sum| 5| 1000000| 500|0.42182372| PASSED rgb_lagged_sum| 5| 1000000| 600|0.38609830| PASSED rgb_lagged_sum| 5| 1000000| 700|0.48019505| PASSED rgb_lagged_sum| 5| 1000000| 800|0.52901286| PASSED rgb_lagged_sum| 5| 1000000| 900|0.42715344| PASSED rgb_lagged_sum| 5| 1000000| 1000|0.62077017| PASSED rgb_lagged_sum| 6| 1000000| 100|0.04179630| PASSED rgb_lagged_sum| 6| 1000000| 200|0.25049421| PASSED rgb_lagged_sum| 6| 1000000| 300|0.09093310| PASSED rgb_lagged_sum| 6| 1000000| 400|0.32716292| PASSED rgb_lagged_sum| 6| 1000000| 500|0.35731217| PASSED rgb_lagged_sum| 6| 1000000| 600|0.57720036| PASSED rgb_lagged_sum| 6| 1000000| 700|0.76854939| PASSED rgb_lagged_sum| 6| 1000000| 800|0.68451831| PASSED rgb_lagged_sum| 6| 1000000| 900|0.61964840| PASSED rgb_lagged_sum| 6| 1000000| 1000|0.77178784| PASSED rgb_lagged_sum| 7| 1000000| 100|0.68763471| PASSED rgb_lagged_sum| 7| 1000000| 200|0.86595791| PASSED rgb_lagged_sum| 7| 1000000| 300|0.78371634| PASSED rgb_lagged_sum| 7| 1000000| 400|0.93344327| PASSED rgb_lagged_sum| 7| 1000000| 500|0.30676390| PASSED rgb_lagged_sum| 7| 1000000| 600|0.47171864| PASSED rgb_lagged_sum| 7| 1000000| 700|0.18925001| PASSED rgb_lagged_sum| 7| 1000000| 800|0.44033871| PASSED rgb_lagged_sum| 7| 1000000| 900|0.62749059| PASSED rgb_lagged_sum| 7| 1000000| 1000|0.46673109| PASSED rgb_lagged_sum| 8| 1000000| 100|0.97156226| PASSED rgb_lagged_sum| 8| 1000000| 200|0.39956111| PASSED rgb_lagged_sum| 8| 1000000| 300|0.20598377| PASSED rgb_lagged_sum| 8| 1000000| 400|0.42542038| PASSED rgb_lagged_sum| 8| 1000000| 500|0.17642376| PASSED rgb_lagged_sum| 8| 1000000| 600|0.12700533| PASSED rgb_lagged_sum| 8| 1000000| 700|0.28167206| PASSED rgb_lagged_sum| 8| 1000000| 800|0.20326267| PASSED rgb_lagged_sum| 8| 1000000| 900|0.14590564| PASSED rgb_lagged_sum| 8| 1000000| 1000|0.26099324| PASSED rgb_lagged_sum| 9| 1000000| 100|0.19510559| PASSED rgb_lagged_sum| 9| 1000000| 200|0.36042283| PASSED rgb_lagged_sum| 9| 1000000| 300|0.67319327| PASSED rgb_lagged_sum| 9| 1000000| 400|0.34992684| PASSED rgb_lagged_sum| 9| 1000000| 500|0.34030536| PASSED rgb_lagged_sum| 9| 1000000| 600|0.72508502| PASSED rgb_lagged_sum| 9| 1000000| 700|0.53962982| PASSED rgb_lagged_sum| 9| 1000000| 800|0.88401661| PASSED rgb_lagged_sum| 9| 1000000| 900|0.68196164| PASSED rgb_lagged_sum| 9| 1000000| 1000|0.77154581| PASSED rgb_lagged_sum| 10| 1000000| 100|0.30903938| PASSED rgb_lagged_sum| 10| 1000000| 200|0.44118659| PASSED rgb_lagged_sum| 10| 1000000| 300|0.33907785| PASSED rgb_lagged_sum| 10| 1000000| 400|0.51580038| PASSED rgb_lagged_sum| 10| 1000000| 500|0.36110181| PASSED rgb_lagged_sum| 10| 1000000| 600|0.27947826| PASSED rgb_lagged_sum| 10| 1000000| 700|0.24359666| PASSED rgb_lagged_sum| 10| 1000000| 800|0.61763231| PASSED rgb_lagged_sum| 10| 1000000| 900|0.51363821| PASSED rgb_lagged_sum| 10| 1000000| 1000|0.70342670| PASSED rgb_lagged_sum| 11| 1000000| 100|0.81260638| PASSED rgb_lagged_sum| 11| 1000000| 200|0.68250396| PASSED rgb_lagged_sum| 11| 1000000| 300|0.47298798| PASSED rgb_lagged_sum| 11| 1000000| 400|0.33714528| PASSED rgb_lagged_sum| 11| 1000000| 500|0.66550339| PASSED rgb_lagged_sum| 11| 1000000| 600|0.33612234| PASSED rgb_lagged_sum| 11| 1000000| 700|0.90710456| PASSED rgb_lagged_sum| 11| 1000000| 800|0.88460315| PASSED rgb_lagged_sum| 11| 1000000| 900|0.78689489| PASSED rgb_lagged_sum| 11| 1000000| 1000|0.78544490| PASSED rgb_lagged_sum| 12| 1000000| 100|0.52676770| PASSED rgb_lagged_sum| 12| 1000000| 200|0.44724371| PASSED rgb_lagged_sum| 12| 1000000| 300|0.14142622| PASSED rgb_lagged_sum| 12| 1000000| 400|0.16041799| PASSED rgb_lagged_sum| 12| 1000000| 500|0.18888349| PASSED rgb_lagged_sum| 12| 1000000| 600|0.15578134| PASSED rgb_lagged_sum| 12| 1000000| 700|0.36190861| PASSED rgb_lagged_sum| 12| 1000000| 800|0.62135234| PASSED rgb_lagged_sum| 12| 1000000| 900|0.74239352| PASSED rgb_lagged_sum| 12| 1000000| 1000|0.93773386| PASSED rgb_lagged_sum| 13| 1000000| 100|0.33269302| PASSED rgb_lagged_sum| 13| 1000000| 200|0.39036462| PASSED rgb_lagged_sum| 13| 1000000| 300|0.21715990| PASSED rgb_lagged_sum| 13| 1000000| 400|0.39479512| PASSED rgb_lagged_sum| 13| 1000000| 500|0.52373923| PASSED rgb_lagged_sum| 13| 1000000| 600|0.88141738| PASSED rgb_lagged_sum| 13| 1000000| 700|0.88823477| PASSED rgb_lagged_sum| 13| 1000000| 800|0.65791116| PASSED rgb_lagged_sum| 13| 1000000| 900|0.85811847| PASSED rgb_lagged_sum| 13| 1000000| 1000|0.81963596| PASSED rgb_lagged_sum| 14| 1000000| 100|0.97617379| PASSED rgb_lagged_sum| 14| 1000000| 200|0.87049454| PASSED rgb_lagged_sum| 14| 1000000| 300|0.97690347| PASSED rgb_lagged_sum| 14| 1000000| 400|0.99118570| PASSED rgb_lagged_sum| 14| 1000000| 500|0.61944116| PASSED rgb_lagged_sum| 14| 1000000| 600|0.64036715| PASSED rgb_lagged_sum| 14| 1000000| 700|0.59419566| PASSED rgb_lagged_sum| 14| 1000000| 800|0.23204374| PASSED rgb_lagged_sum| 14| 1000000| 900|0.56115372| PASSED rgb_lagged_sum| 14| 1000000| 1000|0.43013467| PASSED rgb_lagged_sum| 15| 1000000| 100|0.36144088| PASSED rgb_lagged_sum| 15| 1000000| 200|0.74486194| PASSED rgb_lagged_sum| 15| 1000000| 300|0.34393391| PASSED rgb_lagged_sum| 15| 1000000| 400|0.25694726| PASSED rgb_lagged_sum| 15| 1000000| 500|0.22898047| PASSED rgb_lagged_sum| 15| 1000000| 600|0.27912722| PASSED rgb_lagged_sum| 15| 1000000| 700|0.10126080| PASSED rgb_lagged_sum| 15| 1000000| 800|0.07374043| PASSED rgb_lagged_sum| 15| 1000000| 900|0.20398966| PASSED rgb_lagged_sum| 15| 1000000| 1000|0.32190617| PASSED rgb_lagged_sum| 16| 1000000| 100|0.48312724| PASSED rgb_lagged_sum| 16| 1000000| 200|0.16225039| PASSED rgb_lagged_sum| 16| 1000000| 300|0.38878078| PASSED rgb_lagged_sum| 16| 1000000| 400|0.25026282| PASSED rgb_lagged_sum| 16| 1000000| 500|0.60926090| PASSED rgb_lagged_sum| 16| 1000000| 600|0.76748571| PASSED rgb_lagged_sum| 16| 1000000| 700|0.66872959| PASSED rgb_lagged_sum| 16| 1000000| 800|0.28401725| PASSED rgb_lagged_sum| 16| 1000000| 900|0.32177747| PASSED rgb_lagged_sum| 16| 1000000| 1000|0.10536472| PASSED rgb_lagged_sum| 17| 1000000| 100|0.94604575| PASSED rgb_lagged_sum| 17| 1000000| 200|0.51559909| PASSED rgb_lagged_sum| 17| 1000000| 300|0.08006487| PASSED rgb_lagged_sum| 17| 1000000| 400|0.58801135| PASSED rgb_lagged_sum| 17| 1000000| 500|0.62543022| PASSED rgb_lagged_sum| 17| 1000000| 600|0.82249829| PASSED rgb_lagged_sum| 17| 1000000| 700|0.56029563| PASSED rgb_lagged_sum| 17| 1000000| 800|0.53563621| PASSED rgb_lagged_sum| 17| 1000000| 900|0.18052128| PASSED rgb_lagged_sum| 17| 1000000| 1000|0.33033810| PASSED rgb_lagged_sum| 18| 1000000| 100|0.34479987| PASSED rgb_lagged_sum| 18| 1000000| 200|0.32138938| PASSED rgb_lagged_sum| 18| 1000000| 300|0.15119502| PASSED rgb_lagged_sum| 18| 1000000| 400|0.37851561| PASSED rgb_lagged_sum| 18| 1000000| 500|0.28919622| PASSED rgb_lagged_sum| 18| 1000000| 600|0.35831800| PASSED rgb_lagged_sum| 18| 1000000| 700|0.45001793| PASSED rgb_lagged_sum| 18| 1000000| 800|0.32865268| PASSED rgb_lagged_sum| 18| 1000000| 900|0.17732912| PASSED rgb_lagged_sum| 18| 1000000| 1000|0.13243026| PASSED rgb_lagged_sum| 19| 1000000| 100|0.57215631| PASSED rgb_lagged_sum| 19| 1000000| 200|0.57556537| PASSED rgb_lagged_sum| 19| 1000000| 300|0.44633854| PASSED rgb_lagged_sum| 19| 1000000| 400|0.82726119| PASSED rgb_lagged_sum| 19| 1000000| 500|0.64775020| PASSED rgb_lagged_sum| 19| 1000000| 600|0.65182676| PASSED rgb_lagged_sum| 19| 1000000| 700|0.50119292| PASSED rgb_lagged_sum| 19| 1000000| 800|0.59038362| PASSED rgb_lagged_sum| 19| 1000000| 900|0.71156972| PASSED rgb_lagged_sum| 19| 1000000| 1000|0.26928099| PASSED rgb_lagged_sum| 20| 1000000| 100|0.23526296| PASSED rgb_lagged_sum| 20| 1000000| 200|0.01187195| PASSED rgb_lagged_sum| 20| 1000000| 300|0.01128622| PASSED rgb_lagged_sum| 20| 1000000| 400|0.26403513| PASSED rgb_lagged_sum| 20| 1000000| 500|0.49355354| PASSED rgb_lagged_sum| 20| 1000000| 600|0.70352208| PASSED rgb_lagged_sum| 20| 1000000| 700|0.53734372| PASSED rgb_lagged_sum| 20| 1000000| 800|0.89814691| PASSED rgb_lagged_sum| 20| 1000000| 900|0.64869841| PASSED rgb_lagged_sum| 20| 1000000| 1000|0.81339451| PASSED rgb_lagged_sum| 21| 1000000| 100|0.87300796| PASSED rgb_lagged_sum| 21| 1000000| 200|0.67088951| PASSED rgb_lagged_sum| 21| 1000000| 300|0.97801850| PASSED rgb_lagged_sum| 21| 1000000| 400|0.89796040| PASSED rgb_lagged_sum| 21| 1000000| 500|0.91481978| PASSED rgb_lagged_sum| 21| 1000000| 600|0.60225249| PASSED rgb_lagged_sum| 21| 1000000| 700|0.80371647| PASSED rgb_lagged_sum| 21| 1000000| 800|0.76586349| PASSED rgb_lagged_sum| 21| 1000000| 900|0.81405307| PASSED rgb_lagged_sum| 21| 1000000| 1000|0.55550373| PASSED rgb_lagged_sum| 22| 1000000| 100|0.06515441| PASSED rgb_lagged_sum| 22| 1000000| 200|0.05459284| PASSED rgb_lagged_sum| 22| 1000000| 300|0.09429880| PASSED rgb_lagged_sum| 22| 1000000| 400|0.10831831| PASSED rgb_lagged_sum| 22| 1000000| 500|0.28397956| PASSED rgb_lagged_sum| 22| 1000000| 600|0.32820679| PASSED rgb_lagged_sum| 22| 1000000| 700|0.52760674| PASSED rgb_lagged_sum| 22| 1000000| 800|0.51889382| PASSED rgb_lagged_sum| 22| 1000000| 900|0.48673270| PASSED rgb_lagged_sum| 22| 1000000| 1000|0.47494079| PASSED rgb_lagged_sum| 23| 1000000| 100|0.22882420| PASSED rgb_lagged_sum| 23| 1000000| 200|0.61419001| PASSED rgb_lagged_sum| 23| 1000000| 300|0.80028277| PASSED rgb_lagged_sum| 23| 1000000| 400|0.95470196| PASSED rgb_lagged_sum| 23| 1000000| 500|0.33815055| PASSED rgb_lagged_sum| 23| 1000000| 600|0.85730000| PASSED rgb_lagged_sum| 23| 1000000| 700|0.51747154| PASSED rgb_lagged_sum| 23| 1000000| 800|0.50122141| PASSED rgb_lagged_sum| 23| 1000000| 900|0.34003986| PASSED rgb_lagged_sum| 23| 1000000| 1000|0.05673302| PASSED rgb_lagged_sum| 24| 1000000| 100|0.69930786| PASSED rgb_lagged_sum| 24| 1000000| 200|0.41194797| PASSED rgb_lagged_sum| 24| 1000000| 300|0.59260089| PASSED rgb_lagged_sum| 24| 1000000| 400|0.32966265| PASSED rgb_lagged_sum| 24| 1000000| 500|0.86458597| PASSED rgb_lagged_sum| 24| 1000000| 600|0.69787456| PASSED rgb_lagged_sum| 24| 1000000| 700|0.67692708| PASSED rgb_lagged_sum| 24| 1000000| 800|0.88658455| PASSED rgb_lagged_sum| 24| 1000000| 900|0.84275681| PASSED rgb_lagged_sum| 24| 1000000| 1000|0.86379828| PASSED rgb_lagged_sum| 25| 1000000| 100|0.52591285| PASSED rgb_lagged_sum| 25| 1000000| 200|0.13182084| PASSED rgb_lagged_sum| 25| 1000000| 300|0.35960159| PASSED rgb_lagged_sum| 25| 1000000| 400|0.29016868| PASSED rgb_lagged_sum| 25| 1000000| 500|0.08206646| PASSED rgb_lagged_sum| 25| 1000000| 600|0.00577556| PASSED rgb_lagged_sum| 25| 1000000| 700|0.02901191| PASSED rgb_lagged_sum| 25| 1000000| 800|0.08967414| PASSED rgb_lagged_sum| 25| 1000000| 900|0.05107487| PASSED rgb_lagged_sum| 25| 1000000| 1000|0.03478078| PASSED rgb_lagged_sum| 26| 1000000| 100|0.94126381| PASSED rgb_lagged_sum| 26| 1000000| 200|0.40164393| PASSED rgb_lagged_sum| 26| 1000000| 300|0.76511072| PASSED rgb_lagged_sum| 26| 1000000| 400|0.83293151| PASSED rgb_lagged_sum| 26| 1000000| 500|0.72543161| PASSED rgb_lagged_sum| 26| 1000000| 600|0.84178292| PASSED rgb_lagged_sum| 26| 1000000| 700|0.73826654| PASSED rgb_lagged_sum| 26| 1000000| 800|0.87561931| PASSED rgb_lagged_sum| 26| 1000000| 900|0.91753258| PASSED rgb_lagged_sum| 26| 1000000| 1000|0.92873737| PASSED rgb_lagged_sum| 27| 1000000| 100|0.25780265| PASSED rgb_lagged_sum| 27| 1000000| 200|0.68471855| PASSED rgb_lagged_sum| 27| 1000000| 300|0.12823328| PASSED rgb_lagged_sum| 27| 1000000| 400|0.21601425| PASSED rgb_lagged_sum| 27| 1000000| 500|0.13177370| PASSED rgb_lagged_sum| 27| 1000000| 600|0.20789031| PASSED rgb_lagged_sum| 27| 1000000| 700|0.15183259| PASSED rgb_lagged_sum| 27| 1000000| 800|0.15410247| PASSED rgb_lagged_sum| 27| 1000000| 900|0.19594554| PASSED rgb_lagged_sum| 27| 1000000| 1000|0.29211842| PASSED rgb_lagged_sum| 28| 1000000| 100|0.94326186| PASSED rgb_lagged_sum| 28| 1000000| 200|0.87821380| PASSED rgb_lagged_sum| 28| 1000000| 300|0.73053665| PASSED rgb_lagged_sum| 28| 1000000| 400|0.57425644| PASSED rgb_lagged_sum| 28| 1000000| 500|0.35878978| PASSED rgb_lagged_sum| 28| 1000000| 600|0.04147614| PASSED rgb_lagged_sum| 28| 1000000| 700|0.51173653| PASSED rgb_lagged_sum| 28| 1000000| 800|0.14949215| PASSED rgb_lagged_sum| 28| 1000000| 900|0.27479588| PASSED rgb_lagged_sum| 28| 1000000| 1000|0.32931472| PASSED rgb_lagged_sum| 29| 1000000| 100|0.94376821| PASSED rgb_lagged_sum| 29| 1000000| 200|0.56577651| PASSED rgb_lagged_sum| 29| 1000000| 300|0.81276980| PASSED rgb_lagged_sum| 29| 1000000| 400|0.42760581| PASSED rgb_lagged_sum| 29| 1000000| 500|0.62099112| PASSED rgb_lagged_sum| 29| 1000000| 600|0.87038176| PASSED rgb_lagged_sum| 29| 1000000| 700|0.96650241| PASSED rgb_lagged_sum| 29| 1000000| 800|0.70821579| PASSED rgb_lagged_sum| 29| 1000000| 900|0.72857324| PASSED rgb_lagged_sum| 29| 1000000| 1000|0.53262823| PASSED rgb_lagged_sum| 30| 1000000| 100|0.17389709| PASSED rgb_lagged_sum| 30| 1000000| 200|0.64009467| PASSED rgb_lagged_sum| 30| 1000000| 300|0.95674730| PASSED rgb_lagged_sum| 30| 1000000| 400|0.93008082| PASSED rgb_lagged_sum| 30| 1000000| 500|0.45447919| PASSED rgb_lagged_sum| 30| 1000000| 600|0.77168276| PASSED rgb_lagged_sum| 30| 1000000| 700|0.45337682| PASSED rgb_lagged_sum| 30| 1000000| 800|0.14557155| PASSED rgb_lagged_sum| 30| 1000000| 900|0.31653827| PASSED rgb_lagged_sum| 30| 1000000| 1000|0.38922056| PASSED rgb_lagged_sum| 31| 1000000| 100|0.94807709| PASSED rgb_lagged_sum| 31| 1000000| 200|0.53278000| PASSED rgb_lagged_sum| 31| 1000000| 300|0.84609578| PASSED rgb_lagged_sum| 31| 1000000| 400|0.43711080| PASSED rgb_lagged_sum| 31| 1000000| 500|0.21152635| PASSED rgb_lagged_sum| 31| 1000000| 600|0.14762858| PASSED rgb_lagged_sum| 31| 1000000| 700|0.79790229| PASSED rgb_lagged_sum| 31| 1000000| 800|0.72782393| PASSED rgb_lagged_sum| 31| 1000000| 900|0.59855037| PASSED rgb_lagged_sum| 31| 1000000| 1000|0.96771148| PASSED rgb_lagged_sum| 32| 1000000| 100|0.20130833| PASSED rgb_lagged_sum| 32| 1000000| 200|0.26855183| PASSED rgb_lagged_sum| 32| 1000000| 300|0.45971259| PASSED rgb_lagged_sum| 32| 1000000| 400|0.20808985| PASSED rgb_lagged_sum| 32| 1000000| 500|0.31127089| PASSED rgb_lagged_sum| 32| 1000000| 600|0.26726162| PASSED rgb_lagged_sum| 32| 1000000| 700|0.60717227| PASSED rgb_lagged_sum| 32| 1000000| 800|0.73679276| PASSED rgb_lagged_sum| 32| 1000000| 900|0.43436612| PASSED rgb_lagged_sum| 32| 1000000| 1000|0.45923652| PASSED rgb_kstest_test| 0| 10000| 1000|0.70104322| PASSED dab_bytedistrib| 0| 51200000| 1|0.99397766| PASSED dab_bytedistrib| 0| 51200000| 101|0.34108944| PASSED dab_bytedistrib| 0| 51200000| 201|0.32265037| PASSED dab_bytedistrib| 0| 51200000| 301|0.23283097| PASSED dab_bytedistrib| 0| 51200000| 401|0.01120540| PASSED dab_bytedistrib| 0| 51200000| 501|0.02257664| PASSED dab_bytedistrib| 0| 51200000| 601|0.05305480| PASSED dab_bytedistrib| 0| 51200000| 701|0.14838803| PASSED dab_bytedistrib| 0| 51200000| 801|0.21105009| PASSED dab_bytedistrib| 0| 51200000| 901|0.36884696| PASSED dab_bytedistrib| 0| 51200000| 1000|0.21890701| PASSED dab_dct| 256| 50000| 1|0.93582951| PASSED dab_dct| 256| 50000| 101|0.27096285| PASSED dab_dct| 256| 50000| 201|0.95273515| PASSED dab_dct| 256| 50000| 301|0.99518306| WEAK dab_dct| 256| 50000| 401|0.96854848| PASSED dab_dct| 256| 50000| 501|0.87950720| PASSED dab_dct| 256| 50000| 601|0.58691341| PASSED dab_dct| 256| 50000| 701|0.83806817| PASSED dab_dct| 256| 50000| 801|0.71143885| PASSED dab_dct| 256| 50000| 901|0.85472019| PASSED dab_dct| 256| 50000| 1000|0.64796978| PASSED Preparing to run test 207. ntuple = 0 dab_filltree| 32| 15000000| 1|0.13223599| PASSED dab_filltree| 32| 15000000| 1|0.24754067| PASSED dab_filltree| 32| 15000000| 101|0.11641655| PASSED dab_filltree| 32| 15000000| 101|0.25707664| PASSED dab_filltree| 32| 15000000| 201|0.00775811| PASSED dab_filltree| 32| 15000000| 201|0.50616322| PASSED dab_filltree| 32| 15000000| 301|0.00362712| WEAK dab_filltree| 32| 15000000| 301|0.38098570| PASSED dab_filltree| 32| 15000000| 401|0.00307332| WEAK dab_filltree| 32| 15000000| 401|0.16122394| PASSED dab_filltree| 32| 15000000| 501|0.00047046| WEAK dab_filltree| 32| 15000000| 501|0.19411276| PASSED dab_filltree| 32| 15000000| 601|0.00001182| WEAK dab_filltree| 32| 15000000| 601|0.39412177| PASSED dab_filltree| 32| 15000000| 701|0.00000056| FAILED dab_filltree| 32| 15000000| 701|0.24456959| PASSED Preparing to run test 208. ntuple = 0 dab_filltree2| 0| 5000000| 1|0.37509956| PASSED dab_filltree2| 1| 5000000| 1|0.67194893| PASSED dab_filltree2| 0| 5000000| 101|0.52297480| PASSED dab_filltree2| 1| 5000000| 101|0.73076280| PASSED dab_filltree2| 0| 5000000| 201|0.04589219| PASSED dab_filltree2| 1| 5000000| 201|0.67562521| PASSED dab_filltree2| 0| 5000000| 301|0.08352898| PASSED dab_filltree2| 1| 5000000| 301|0.32264895| PASSED dab_filltree2| 0| 5000000| 401|0.03513935| PASSED dab_filltree2| 1| 5000000| 401|0.58778934| PASSED dab_filltree2| 0| 5000000| 501|0.04122201| PASSED dab_filltree2| 1| 5000000| 501|0.45037006| PASSED dab_filltree2| 0| 5000000| 601|0.21442950| PASSED dab_filltree2| 1| 5000000| 601|0.97197137| PASSED dab_filltree2| 0| 5000000| 701|0.19321264| PASSED dab_filltree2| 1| 5000000| 701|0.56271101| PASSED dab_filltree2| 0| 5000000| 801|0.39956258| PASSED dab_filltree2| 1| 5000000| 801|0.86521045| PASSED dab_filltree2| 0| 5000000| 901|0.49299167| PASSED dab_filltree2| 1| 5000000| 901|0.74139814| PASSED dab_filltree2| 0| 5000000| 1000|0.25543217| PASSED dab_filltree2| 1| 5000000| 1000|0.74187653| PASSED Preparing to run test 209. ntuple = 0 dab_monobit2| 12| 65000000| 1|0.36191738| PASSED dab_monobit2| 12| 65000000| 101|0.03288744| PASSED dab_monobit2| 12| 65000000| 201|0.00202590| WEAK dab_monobit2| 12| 65000000| 301|0.00017091| WEAK dab_monobit2| 12| 65000000| 401|0.00000578| WEAK dab_monobit2| 12| 65000000| 501|0.00000370| WEAK dab_monobit2| 12| 65000000| 601|0.00000234| WEAK dab_monobit2| 12| 65000000| 701|0.00000821| WEAK dab_monobit2| 12| 65000000| 801|0.00000033| FAILED ./dieharder/dieharder.10000664000175000017500000012467613707046103013250 0ustar eddedd.\" $Id: dieharder.1 522 2011-03-10 16:00:48Z rgbatduke $ .TH dieharder 1 "Copyright 2003 Robert G. Brown" "dieharder" .SH NAME .B dieharder \- A testing and benchmarking tool for random number .B generators. .SH SYNOPSIS dieharder [-a] [-d dieharder test number] [-f filename] [-B] [-D output flag [-D output flag] ... ] [-F] [-c separator] [-g generator number or -1] [-h] [-k ks_flag] [-l] [-L overlap] [-m multiply_p] [-n ntuple] [-p number of p samples] [-P Xoff] [-o filename] [-s seed strategy] [-S random number seed] [-n ntuple] [-p number of p samples] [-o filename] [-s seed strategy] [-S random number seed] [-t number of test samples] [-v verbose flag] [-W weak] [-X fail] [-Y Xtrategy] [-x xvalue] [-y yvalue] [-z zvalue] .SH dieharder OPTIONS .TP -a runs all the tests with standard/default options to create a user-controllable report. To control the formatting of the report, see -D below. To control the power of the test (which uses default values for tsamples that cannot generally be varied and psamples which generally can) see -m below as a "multiplier" of the default number of psamples (used only in a -a run). .TP -d test number - selects specific diehard test. .TP -f filename - generators 201 or 202 permit either raw binary or formatted ASCII numbers to be read in from a file for testing. generator 200 reads in raw binary numbers from stdin. Note well: many tests with default parameters require a lot of rands! To see a sample of the (required) header for ASCII formatted input, run dieharder -o -f example.input -t 10 and then examine the contents of example.input. Raw binary input reads 32 bit increments of the specified data stream. stdin_input_raw accepts a pipe from a raw binary stream. .TP -B binary mode (used with -o below) causes output rands to be written in raw binary, not formatted ascii. .TP -D output flag - permits fields to be selected for inclusion in dieharder output. Each flag can be entered as a binary number that turns on a specific output field or header or by flag name; flags are aggregated. To see all currently known flags use the -F command. .TP -F - lists all known flags by name and number. .TP -c table separator - where separator is e.g. ',' (CSV) or ' ' (whitespace). .TP -g generator number - selects a specific generator for testing. Using -g -1 causes all known generators to be printed out to the display. .TP -h prints context-sensitive help -- usually Usage (this message) or a test synopsis if entered as e.g. dieharder -d 3 -h. .TP -k ks_flag - ks_flag 0 is fast but slightly sloppy for psamples > 4999 (default). 1 is MUCH slower but more accurate for larger numbers of psamples. 2 is slower still, but (we hope) accurate to machine precision for any number of psamples up to some as yet unknown numerical upper limit (it has been tested out to at least hundreds of thousands). 3 is kuiper ks, fast, quite inaccurate for small samples, deprecated. .TP -l list all known tests. .TP -L overlap 1 (use overlap, default) 0 (don't use overlap) in operm5 or other tests that support overlapping and non-overlapping sample modes. .TP -m multiply_p - multiply default # of psamples in -a(ll) runs to crank up the resolution of failure. -n ntuple - set ntuple length for tests on short bit strings that permit the length to be varied (e.g. rgb bitdist). .TP -o filename - output -t count random numbers from current generator to file. .TP -p count - sets the number of p-value samples per test (default 100). .TP -P Xoff - sets the number of psamples that will cumulate before deciding that a generator is "good" and really, truly passes even a -Y 2 T2D run. Currently the default is 100000; eventually it will be set from AES-derived T2D test failure thresholds for fully automated reliable operation, but for now it is more a "boredom" threshold set by how long one might reasonably want to wait on any given test run. .TP -S seed - where seed is a uint. Overrides the default random seed selection. Ignored for file or stdin input. .TP -s strategy - if strategy is the (default) 0, dieharder reseeds (or rewinds) once at the beginning when the random number generator is selected and then never again. If strategy is nonzero, the generator is reseeded or rewound at the beginning of EACH TEST. If -S seed was specified, or a file is used, this means every test is applied to the same sequence (which is useful for validation and testing of dieharder, but not a good way to test rngs). Otherwise a new random seed is selected for each test. .TP -t count - sets the number of random entities used in each test, where possible. Be warned -- some tests have fixed sample sizes; others are variable but have practical minimum sizes. It is suggested you begin with the values used in -a and experiment carefully on a test by test basis. .TP -W weak - sets the "weak" threshold to make the test(s) more or less forgiving during e.g. a test-to-destruction run. Default is currently 0.005. .TP -X fail - sets the "fail" threshold to make the test(s) more or less forgiving during e.g. a test-to-destruction run. Default is currently 0.000001, which is basically "certain failure of the null hypothesis", the desired mode of reproducible generator failure. .TP -Y Xtrategy - the Xtrategy flag controls the new "test to failure" (T2F) modes. These flags and their modes act as follows: 0 - just run dieharder with the specified number of tsamples and psamples, do not dynamically modify a run based on results. This is the way it has always run, and is the default. 1 - "resolve ambiguity" (RA) mode. If a test returns "weak", this is an undesired result. What does that mean, after all? If you run a long test series, you will see occasional weak returns for a perfect generators because p is uniformly distributed and will appear in any finite interval from time to time. Even if a test run returns more than one weak result, you cannot be certain that the generator is failing. RA mode adds psamples (usually in blocks of 100) until the test result ends up solidly not weak or proceeds to unambiguous failure. This is morally equivalent to running the test several times to see if a weak result is reproducible, but eliminates the bias of personal judgement in the process since the default failure threshold is very small and very unlikely to be reached by random chance even in many runs. .B This option should only be used with -k 2. 2 - "test to destruction" mode. Sometimes you just want to know where or if a generator will .I ever fail a test (or test series). -Y 2 causes psamples to be added 100 at a time until a test returns an overall pvalue lower than the failure threshold or a specified maximum number of psamples (see -P) is reached. Note well! In this mode one may well fail due to the .I alternate null hypothesis -- the test itself is a bad test and fails! Many dieharder tests, despite our best efforts, are numerically unstable or have only approximately known target statistics or are straight up asymptotic results, and will eventually return a failing result even for a gold-standard generator (such as AES), or for the hypercautious the XOR generator with AES, threefish, kiss, all loaded at once and xor'd together. It is therefore safest to use this mode .I comparatively, executing a T2D run on AES to get an idea of the test failure threshold(s) (something I will eventually do and publish on the web so everybody doesn't have to do it independently) and then running it on your target generator. Failure with numbers of psamples within an order of magnitude of the AES thresholds should probably be considered possible test failures, not generator failures. Failures at levels significantly less than the known gold standard generator failure thresholds are, of course, probably failures of the generator. .B This option should only be used with -k 2. .TP -v verbose flag -- controls the verbosity of the output for debugging only. Probably of little use to non-developers, and developers can read the enum(s) in dieharder.h and the test sources to see which flag values turn on output on which routines. 1 is \"all\" and will result in a highly detailed trace of program activity. .TP -x,-y,-z number - Some tests have parameters that can safely be varied from their default value. For example, in the diehard birthdays test, one can vary the number of \"dates\" drawn from the \"year\" of some length, which can also be varied. -x 2048 -y 30 alters these two values but should still run fine. These parameters should be documented internally (where they exist) in the e.g. -d 0 -h visible notes. .B NOTE WELL: The assessment(s) for the rngs may, in fact, be completely incorrect or misleading. There are still "bad tests" in dieharder, although we are working to fix and improve them (and try to document them in the test descriptions visible with -g testnumber -h). In particular, 'Weak' pvalues should occur one test in two hundred, and 'Failed' pvalues should occur one test in a million with the default thresholds - that's what p MEANS. Use them at your Own Risk! Be Warned! Or better yet, use the new -Y 1 and -Y 2 resolve ambiguity or test to destruction modes above, comparing to similar runs on one of the as-good-as-it-gets cryptographic generators, AES or threefish. .SH DESCRIPTION .B dieharder Welcome to the current snapshot of the dieharder random number tester. It encapsulates all of the Gnu Scientific Library (GSL) random number generators (rngs) as well as a number of generators from the R statistical library, hardware sources such as /dev/*random, "gold standard" cryptographic quality generators (useful for testing dieharder and for purposes of comparison to new generators) as well as generators contributed by users or found in the literature into a .I single harness that can time them and subject them to various tests for randomness. These tests are variously drawn from George Marsaglia's "Diehard battery of random number tests", the NIST Statistical Test Suite, and again from other sources such as personal invention, user contribution, other (open source) test suites, or the literature. The primary point of dieharder is to make it easy to time and test (pseudo)random number generators, including both software and hardware rngs, with a fully open source tool. In addition to providing "instant" access to testing of all built-in generators, users can choose one of three ways to test their own random number generators or sources: a unix pipe of a raw binary (presumed random) bitstream; a file containing a (presumed random) raw binary bitstream or formatted ascii uints or floats; and embedding your generator in dieharder's GSL-compatible rng harness and adding it to the list of built-in generators. The stdin and file input methods are described below in their own section, as is suggested "best practice" for newbies to random number generator testing. An important motivation for using dieharder is that the entire test suite is fully Gnu Public License (GPL) open source code and hence rather than being prohibited from "looking underneath the hood" all users are openly encouraged to critically examine the dieharder code for errors, add new tests or generators or user interfaces, or use it freely as is to test their own favorite candidate rngs subject only to the constraints of the GPL. As a result of its openness, literally hundreds of improvements and bug fixes have been contributed by users to date, resulting in a far stronger and more reliable test suite than would have been possible with closed and locked down sources or even open sources (such as STS) that lack the dynamical feedback mechanism permitting corrections to be shared. Even small errors in test statistics permit the .I alternative (usually unstated) null hypothesis to become an important factor in rng testing -- the unwelcome possibility that your generator is just fine but it is the .I test that is failing. One extremely useful feature of dieharder is that it is at least moderately .I self validating. Using the "gold standard" aes and threefish cryptographic generators, you can observe how these generators perform on dieharder runs to the same general degree of accuracy that you wish to use on the generators you are testing. In general, dieharder tests that consistently fail at any given level of precision (selected with e.g. -a -m 10) on both of the gold standard rngs (and/or the better GSL generators, mt19937, gfsr4, taus) are probably unreliable at that precision and it would hardly be surprising if they failed your generator as well. Experts in statistics are encouraged to give the suite a try, perhaps using any of the example calls below at first and then using it freely on their own generators or as a harness for adding their own tests. Novices (to either statistics or random number generator testing) are .I strongly encouraged to read the next section on p-values and the null hypothesis and running the test suite a few times with a more verbose output report to learn how the whole thing works. .SH QUICK START EXAMPLES Examples for how to set up pipe or file input are given below. However, it is recommended that a user play with some of the built in generators to gain familiarity with dieharder reports and tests before tackling their own favorite generator or file full of possibly random numbers. To see dieharder's default standard test report for its default generator (mt19937) simply run: dieharder -a To increase the resolution of possible failures of the standard -a(ll) test, use the -m "multiplier" for the test default numbers of pvalues (which are selected more to make a full test run take an hour or so instead of days than because it is truly an exhaustive test sequence) run: dieharder -a -m 10 To test a different generator (say the gold standard AES_OFB) simply specify the generator on the command line with a flag: dieharder -g 205 -a -m 10 Arguments can be in any order. The generator can also be selected by name: dieharder -g AES_OFB -a To apply .I only the diehard opso test to the AES_OFB generator, specify the test by name or number: dieharder -g 205 -d 5 or dieharder -g 205 -d diehard_opso Nearly every aspect or field in dieharder's output report format is user-selectable by means of display option flags. In addition, the field separator character can be selected by the user to make the output particularly easy for them to parse (-c ' ') or import into a spreadsheet (-c ','). Try: dieharder -g 205 -d diehard_opso -c ',' -D test_name -D pvalues to see an extremely terse, easy to import report or dieharder -g 205 -d diehard_opso -c ' ' -D default -D histogram -D description to see a verbose report good for a "beginner" that includes a full description of each test itself. Finally, the dieharder binary is remarkably autodocumenting even if the man page is not available. All users should try the following commands to see what they do: dieharder -h (prints the command synopsis like the one above). dieharder -a -h dieharder -d 6 -h (prints the test descriptions only for -a(ll) tests or for the specific test indicated). dieharder -l (lists all known tests, including how reliable rgb thinks that they are as things stand). dieharder -g -1 (lists all known rngs). dieharder -F (lists all the currently known display/output control flags used with -D). Both beginners and experts should be aware that the assessment provided by dieharder in its standard report should be regarded with great suspicion. It is entirely possible for a generator to "pass" all tests as far as their individual p-values are concerned and yet to fail utterly when considering them all together. Similarly, it is .I probable that a rng will at the very least show up as "weak" on 0, 1 or 2 tests in a typical -a(ll) run, and may even "fail" 1 test one such run in 10 or so. To understand why this is so, it is necessary to understand something of .I rng testing, p-values, and the null hypothesis! .SH P-VALUES AND THE NULL HYPOTHESIS dieharder returns "p-values". To understand what a p-value is and how to use it, it is essential to understand the .I null hypothesis, .B H0. The null hypothesis for random number generator testing is "This generator is a perfect random number generator, and for any choice of seed produces a infinitely long, unique sequence of numbers that have all the expected statistical properties of random numbers, to all orders". Note well that we .I know that this hypothesis is technically false for all software generators as they are periodic and do not have the correct entropy content for this statement to ever be true. However, many .I hardware generators fail a priori as well, as they contain subtle bias or correlations due to the deterministic physics that underlies them. Nature is often .I unpredictable but it is rarely .I random and the two words don't (quite) mean the same thing! The null hypothesis can be .I practically true, however. Both software and hardware generators can be "random" .I enough that their sequences cannot be distinguished from random ones, at least not easily or with the available tools (including dieharder!) Hence the null hypothesis is a practical, not a theoretically pure, statement. To test .B H0 , one uses the rng in question to generate a sequence of presumably random numbers. Using these numbers one can generate any one of a wide range of .I test statistics -- empirically computed numbers that are considered .I random samples that may or may not be covariant subject to H0, depending on whether overlapping sequences of random numbers are used to generate successive samples while generating the statistic(s), drawn from a known distribution. From a knowledge of the target distribution of the statistic(s) and the associated cumulative distribution function (CDF) and the .I empirical value of the randomly generated statistic(s), one can read off the probability of obtaining the empirical result .I if the sequence was truly random, that is, if the null hypothesis is true and the generator in question is a "good" random number generator! This probability is the "p-value" for the particular test run. For example, to test a coin (or a sequence of bits) we might simply count the number of heads and tails in a very long string of flips. If we assume that the coin is a "perfect coin", we expect the number of heads and tails to be .I binomially distributed and can easily compute the probability of getting any particular number of heads and tails. If we compare our recorded number of heads and tails from the test series to this distribution and find that the probability of getting the count we obtained is .I very low with, say, way more heads than tails we'd suspect the coin wasn't a perfect coin. dieharder applies this very test (made mathematically precise) and many others that operate on this same principle to the string of random bits produced by the rng being tested to provide a picture of how "random" the rng is. Note that the usual dogma is that if the p-value is low -- typically less than 0.05 -- one "rejects" the null hypothesis. In a word, it is improbable that one would get the result obtained if the generator is a good one. If it is any other value, one does not "accept" the generator as good, one "fails to reject" the generator as bad for this particular test. A "good random number generator" is hence one that we haven't been able to make fail .I yet! This criterion is, of course, naive in the extreme and .I cannot be used with dieharder! It makes just as much sense to reject a generator that has p-values of 0.95 or more! Both of these p-value ranges are .I equally unlikely on any given test run, and .I should be returned for (on average) 5% of all test runs by a .I perfect random number generator. A generator that fails to produce p-values less than 0.05 5% of the time it is tested with different seeds is a .I bad random number generator, one that .I fails the test of the null hypothesis. Since dieharder returns over 100 pvalues by default .I per test, one would expect any perfectly good rng to "fail" such a naive test around five times by this criterion in a single dieharder run! The p-values themselves, as it turns out, are test statistics! By their nature, p-values should be uniformly distributed on the range 0-1. In 100+ test runs with independent seeds, one should not be surprised to obtain 0, 1, 2, or even (rarely) 3 p-values less than 0.01. On the other hand obtaining 7 p-values in the range 0.24-0.25, or seeing that 70 of the p-values are greater than 0.5 should make the generator highly suspect! How can a user determine when a test is producing "too many" of any particular value range for p? Or too few? Dieharder does it for you, automatically. One can in fact convert a .I set of p-values into a p-value by comparing their distribution to the expected one, using a Kolmogorov-Smirnov test against the expected uniform distribution of p. .I These p-values obtained from looking at the distribution of p-values should in turn be uniformly distributed and could in principle be subjected to still more KS tests in aggregate. The distribution of p-values for a .I good generator should be .I idempotent, even across different test statistics and multiple runs. A failure of the distribution of p-values at any level of aggregation signals trouble. In fact, if the p-values of any given test are subjected to a KS test, and those p-values are then subjected to a KS test, as we add more p-values to either level we will either observe idempotence of the resulting distribution of p to uniformity, .I or we will observe idempotence to a single p-value of .I zero! That is, a good generator will produce a roughly uniform distribution of p-values, in the specific sense that the p-values of the distributions of p-values are themselves roughly uniform and so on ad infinitum, while a bad generator will produce a non-uniform distribution of p-values, and as more p-values drawn from the non-uniform distribution are added to its KS test, at some point the failure will be absolutely unmistakeable as the resulting p-value approaches 0 in the limit. Trouble indeed! The question is, trouble with what? Random number tests are themselves complex computational objects, and there is a probability that their code is incorrectly framed or that roundoff or other numerical -- not methodical -- errors are contributing to a distortion of the distribution of some of the p-values obtained. This is not an idle observation; when one works on writing random number generator testing programs, one is .I always testing the tests themselves with "good" (we hope) random number generators so that egregious failures of the null hypothesis signal not a bad generator but an error in the test code. The null hypothesis above is correctly framed from a .I theoretical point of view, but from a .I real and practical point of view it should read: "This generator is a perfect random number generator, and for any choice of seed produces a infinitely long, unique sequence of numbers that have all the expected statistical properties of random numbers, to all orders .B and this test is a perfect test and returns precisely correct p-values from the test computation." Observed "failure" of this joint null hypothesis .B H0' can come from failure of either or both of these disjoint components, and comes from the .I second as often or more often than the first during the test development process. When one cranks up the "resolution" of the test (discussed next) to where a generator starts to fail some test one realizes, or should realize, that development never ends and that new test regimes will always reveal new failures not only of the generators but of the code. With that said, one of dieharder's most significant advantages is the control that it gives you over a critical test parameter. From the remarks above, we can see that we should feel .I very uncomfortable about "failing" any given random number generator on the basis of a 5%, or even a 1%, criterion, especially when we apply a test .I suite like dieharder that returns over 100 (and climbing) distinct test p-values as of the last snapshot. We want failure to be unambiguous and reproducible! To accomplish this, one can simply crank up its resolution. If we ran any given test against a random number generator and it returned a p-value of (say) 0.007328, we'd be perfectly justified in wondering if it is really a good generator. However, the probability of getting this result isn't really all that small -- when one uses dieharder for hours at a time numbers like this will definitely happen quite frequently and mean nothing. If one runs the .I same test again (with a different seed or part of the random sequence) and gets a p-value of 0.009122, and a third time and gets 0.002669 -- well, that's three 1% (or less) shots in a row and .I that should happen only one in a million times. One way to clearly resolve failures, then, is to .I increase the number of p-values generated in a test run. If the actual distribution of p being returned by the test is not uniform, a KS test will .I eventually return a p-value that is not some ambiguous 0.035517 but is instead 0.000000, with the latter produced time after time as we rerun. For this reason, dieharder is .I extremely conservative about announcing rng "weakness" or "failure" relative to any given test. It's internal criterion for these things are currently p < 0.5% or p > 99.5% weakness (at the 1% level total) and a .I considerably more stringent criterion for failure: p < 0.05% or p > 99.95%. Note well that the ranges are symmetric -- too high a value of p is just as bad (and unlikely) as too low, and it is .I critical to flag it, because it is quite possible for a rng to be .I too good, on average, and not to produce .I enough low p-values on the full spectrum of dieharder tests. This is where the final kstest is of paramount importance, and where the "histogram" option can be very useful to help you visualize the failure in the distribution of p -- run e.g.: dieharder [whatever] -D default -D histogram and you will see a crude ascii histogram of the pvalues that failed (or passed) any given level of test. Scattered reports of weakness or marginal failure in a preliminary -a(ll) run should therefore not be immediate cause for alarm. Rather, they are tests to repeat, to watch out for, to push the rng harder on using the -m option to -a or simply increasing -p for a specific test. Dieharder permits one to increase the number of p-values generated for .I any test, subject only to the availability of enough random numbers (for file based tests) and time, to make failures unambiguous. A test that is .I truly weak at -p 100 will almost always fail egregiously at some larger value of psamples, be it -p 1000 or -p 100000. However, because dieharder is a research tool and is under perpetual development and testing, it is .I strongly suggested that one always consider the alternative null hypothesis -- that the failure is a failure of the test code in dieharder itself in some limit of large numbers -- and take at least some steps (such as running the same test at the same resolution on a "gold standard" generator) to ensure that the failure is indeed probably in the rng and not the dieharder code. Lacking a source of .I perfect random numbers to use as a reference, validating the tests themselves is not easy and always leaves one with some ambiguity (even aes or threefish). During development the best one can usually do is to rely heavily on these "presumed good" random number generators. There are a number of generators that we have theoretical reasons to expect to be extraordinarily good and to lack correlations out to some known underlying dimensionality, and that also test out extremely well quite consistently. By using several such generators and not just one, one can hope that those generators have (at the very least) .I different correlations and should not all uniformly fail a test in the same way and with the same number of p-values. When all of these generators .I consistently fail a test at a given level, I tend to suspect that the problem is in the test code, not the generators, although it is very difficult to be .I certain, and many errors in dieharder's code have been discovered and ultimately fixed in just this way by myself or others. One advantage of dieharder is that it has a number of these "good generators" immediately available for comparison runs, courtesy of the Gnu Scientific Library and user contribution (notably David Bauer, who kindly encapsulated aes and threefish). I use AES_OFB, Threefish_OFB, mt19937_1999, gfsr4, ranldx2 and taus2 (as well as "true random" numbers from random.org) for this purpose, and I try to ensure that dieharder will "pass" in particular the -g 205 -S 1 -s 1 generator at any reasonable p-value resolution out to -p 1000 or farther. Tests (such as the diehard operm5 and sums test) that consistently .I fail at these high resolutions are flagged as being "suspect" -- possible failures of the .I alternative null hypothesis -- and they are .I strongly deprecated! Their results should not be used to test random number generators pending agreement in the statistics and random number community that those tests are in fact valid and correct so that observed failures can indeed safely be attributed to a failure of the .I intended null hypothesis. As I keep emphasizing (for good reason!) dieharder is community supported. I therefore openly ask that the users of dieharder who are expert in statistics to help me fix the code or algorithms being implemented. I would like to see this test suite ultimately be .I validated by the general statistics community in hard use in an open environment, where every possible failure of the testing mechanism itself is subject to scrutiny and eventual correction. In this way we will eventually achieve a very powerful suite of tools indeed, ones that may well give us very specific information not just about failure but of the .I mode of failure as well, just how the sequence tested deviates from randomness. Thus far, dieharder has benefitted tremendously from the community. Individuals have openly contributed tests, new generators to be tested, and fixes for existing tests that were revealed by their own work with the testing instrument. Efforts are underway to make dieharder more portable so that it will build on more platforms and faster so that more thorough testing can be done. Please feel free to participate. .SH FILE INPUT The simplest way to use dieharder with an external generator that produces raw binary (presumed random) bits is to pipe the raw binary output from this generator (presumed to be a binary stream of 32 bit unsigned integers) directly into dieharder, e.g.: cat /dev/urandom | ./dieharder -a -g 200 Go ahead and try this example. It will run the entire dieharder suite of tests on the stream produced by the linux built-in generator /dev/urandom (using /dev/random is not recommended as it is too slow to test in a reasonable amount of time). Alternatively, dieharder can be used to test files of numbers produced by a candidate random number generators: dieharder -a -g 201 -f random.org_bin for raw binary input or dieharder -a -g 202 -f random.org.txt for formatted ascii input. A formatted ascii input file can accept either uints (integers in the range 0 to 2^31-1, one per line) or decimal uniform deviates with at least ten significant digits (that can be multiplied by UINT_MAX = 2^32 to produce a uint without dropping precition), also one per line. Floats with fewer digits will almost certainly fail bitlevel tests, although they may pass some of the tests that act on uniform deviates. Finally, one can fairly easily wrap any generator in the same (GSL) random number harness used internally by dieharder and simply test it the same way one would any other internal generator recognized by dieharder. This is strongly recommended where it is possible, because dieharder needs to use a .I lot of random numbers to thoroughly test a generator. A built in generator can simply let dieharder determine how many it needs and generate them on demand, where a file that is too small will "rewind" and render the test results where a rewind occurs suspect. Note well that file input rands are delivered to the tests on demand, but if the test needs more than are available it simply rewinds the file and cycles through it again, and again, and again as needed. Obviously this significantly reduces the sample space and can lead to completely incorrect results for the p-value histograms unless there are enough rands to run EACH test without repetition (it is harmless to reuse the sequence for different tests). Let the user beware! .SH BEST PRACTICE A frequently asked question from new users wishing to test a generator they are working on for fun or profit (or both) is "How should I get its output into dieharder?" This is a nontrivial question, as dieharder consumes .I enormous numbers of random numbers in a full test cycle, and then there are features like -m 10 or -m 100 that let one effortlessly demand 10 or 100 times as many to stress a new generator even more. .I Even with large file support in dieharder, it is difficult to provide enough random numbers in a file to really make dieharder happy. It is therefore .I strongly suggested that you either: a) Edit the output stage of your random number generator and get it to write its production to stdout as a .I random bit stream -- basically create 32 bit unsigned random integers and write them directly to stdout as e.g. char data or raw binary. Note that this is .I not the same as writing raw floating point numbers (that will not be random at all as a bitstream) and that "endianness" of the uints should not matter for the null hypothesis of a "good" generator, as random bytes are random in any order. Crank the generator and feed this stream to dieharder in a pipe as described above. b) Use the samples of GSL-wrapped dieharder rngs to similarly wrap your generator (or calls to your generator's hardware interface). Follow the examples in the ./dieharder source directory to add it as a "user" generator in the command line interface, rebuild, and invoke the generator as a "native" dieharder generator (it should appear in the list produced by -g -1 when done correctly). The advantage of doing it this way is that you can then (if your new generator is highly successful) contribute it back to the dieharder project if you wish! Not to mention the fact that it makes testing it very easy. Most users will probably go with option a) at least initially, but be aware that b) is probably easier than you think. The dieharder maintainers .I may be able to give you a hand with it if you get into trouble, but no promises. .SH WARNING! A warning for those who are testing files of random numbers. dieharder is a tool that .I tests random number generators, not files of random numbers! It is extremely inappropriate to try to "certify" a file of random numbers as being random just because it fails to "fail" any of the dieharder tests in e.g. a dieharder -a run. To put it bluntly, if one rejects all such files that fail any test at the 0.05 level (or any other), the one thing one can be certain of is that the files in question are .I not random, as a truly random sequence would fail any given test at the 0.05 level 5% of the time! To put it another way, any file of numbers produced by a .I generator that "fails to fail" the dieharder suite should be considered "random", even if it contains sequences that might well "fail" any given test at some specific cutoff. One has to presume that passing the broader tests of the generator itself, it was determined that the p-values for the test involved was .I globally correctly distributed, so that e.g. failure at the 0.01 level occurs neither more nor less than 1% of the time, on average, over many many tests. If one particular file generates a failure at this level, one can therefore safely presume that it is a .I random file pulled from many thousands of similar files the generator might create that have the correct distribution of p-values at all levels of testing and aggregation. To sum up, use dieharder to validate your generator (via input from files or an embedded stream). Then by all means use your generator to produce files or streams of random numbers. Do not use dieharder as an accept/reject tool to validate .I the files themselves! .SH EXAMPLES To demonstrate all tests, run on the default GSL rng, enter: dieharder -a To demonstrate a test of an external generator of a raw binary stream of bits, use the stdin (raw) interface: cat /dev/urandom | dieharder -g 200 -a To use it with an ascii formatted file: dieharder -g 202 -f testrands.txt -a (testrands.txt should consist of a header such as: #================================================================== # generator mt19937_1999 seed = 1274511046 #================================================================== type: d count: 100000 numbit: 32 3129711816 85411969 2545911541 etc.). To use it with a binary file dieharder -g 201 -f testrands.bin -a or cat testrands.bin | dieharder -g 200 -a An example that demonstrates the use of "prefixes" on the output lines that make it relatively easy to filter off the different parts of the output report and chop them up into numbers that can be used in other programs or in spreadsheets, try: dieharder -a -c ',' -D default -D prefix .SH DISPLAY OPTIONS As of version 3.x.x, dieharder has a single output interface that produces tabular data per test, with common information in headers. The display control options and flags can be used to customize the output to your individual specific needs. The options are controlled by binary flags. The flags, and their text versions, are displayed if you enter: dieharder -F by itself on a line. The flags can be entered all at once by adding up all the desired option flags. For example, a very sparse output could be selected by adding the flags for the test_name (8) and the associated pvalues (128) to get 136: dieharder -a -D 136 Since the flags are cumulated from zero (unless no flag is entered and the default is used) you could accomplish the same display via: dieharder -a -D 8 -D pvalues Note that you can enter flags by value or by name, in any combination. Because people use dieharder to obtain values and then with to export them into spreadsheets (comma separated values) or into filter scripts, you can chance the field separator character. For example: dieharder -a -c ',' -D default -D -1 -D -2 produces output that is ideal for importing into a spreadsheet (note that one can subtract field values from the base set of fields provided by the default option as long as it is given first). An interesting option is the -D prefix flag, which turns on a field identifier prefix to make it easy to filter out particular kinds of data. However, it is equally easy to turn on any particular kind of output to the exclusion of others directly by means of the flags. Two other flags of interest to novices to random number generator testing are the -D histogram (turns on a histogram of the underlying pvalues, per test) and -D description (turns on a complete test description, per test). These flags turn the output table into more of a series of "reports" of each test. .SH PUBLICATION RULES .B dieharder is entirely original code and can be modified and used at will by any user, provided that: a) The original copyright notices are maintained and that the source, including all modifications, is made publically available at the time of any derived publication. This is open source software according to the precepts and spirit of the Gnu Public License. See the accompanying file COPYING, which also must accompany any redistribution. b) The primary author of the code (Robert G. Brown) is appropriately acknowledged and referenced in any derived publication. It is strongly suggested that George Marsaglia and the Diehard suite and the various authors of the Statistical Test Suite be similarly acknowledged, although this suite shares no actual code with these random number test suites. c) Full responsibility for the accuracy, suitability, and effectiveness of the program rests with the users and/or modifiers. As is clearly stated in the accompanying copyright.h: THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .SH ACKNOWLEDGEMENTS The author of this suite gratefully acknowledges George Marsaglia (the author of the diehard test suite) and the various authors of NIST Special Publication 800-22 (which describes the Statistical Test Suite for testing pseudorandom number generators for cryptographic applications), for excellent descriptions of the tests therein. These descriptions enabled this suite to be developed with a GPL. The author also wishes to reiterate that the academic correctness and accuracy of the implementation of these tests is his sole responsibility and not that of the authors of the Diehard or STS suites. This is especially true where he has seen fit to modify those tests from their strict original descriptions. .SH COPYRIGHT GPL 2b; see the file COPYING that accompanies the source of this program. This is the "standard Gnu General Public License version 2 or any later version", with the one minor (humorous) "Beverage" modification listed below. Note that this modification is probably not legally defensible and can be followed really pretty much according to the honor rule. As to my personal preferences in beverages, red wine is great, beer is delightful, and Coca Cola or coffee or tea or even milk acceptable to those who for religious or personal reasons wish to avoid stressing my liver. .B The "Beverage" Modification to the GPL: Any satisfied user of this software shall, upon meeting the primary author(s) of this software for the first time under the appropriate circumstances, offer to buy him or her or them a beverage. This beverage may or may not be alcoholic, depending on the personal ethical and moral views of the offerer. The beverage cost need not exceed one U.S. dollar (although it certainly may at the whim of the offerer:-) and may be accepted or declined with no further obligation on the part of the offerer. It is not necessary to repeat the offer after the first meeting, but it can't hurt... ./dieharder/set_globals.c0000664000175000017500000000671613707046103013673 0ustar eddedd/* * See copyright in copyright.h and the accompanying file COPYING */ #include "dieharder.h" void set_globals() { /* * Within reason, the following user-controllable options are referenced * by a flag with the same first letter. In order: */ all = NO; /* Default is to NOT do all the tests */ binary = NO; /* Do output a random stream in binary (with -o) */ dtest_num = -1; /* -1 means no test selected */ dtest_name[0] = (char)0; /* empty test name is also default */ filename[0] = (char)0; /* No input file */ fromfile = 0; /* Not from an input file */ ks_test = 0; /* Default is 0, Symmetrized KS test */ output_file = 0; /* No output file */ output_format = 1; /* uint output format if you use -o alone */ /* Cruft overlap = 1; / * Default is to use overlapping samples */ multiply_p = 1; /* Default is to use default number of psamples */ gnumbs[0] = 13; /* Default is mt19937 as a "good" generator */ generator_name[0] = (char)0; /* empty generator name is default */ gvcount = 0; /* Count of generators so far */ gscount = 0; /* Count of seeds so far */ help_flag = NO; /* No help requested */ iterations = -1; /* For timing loop, set iterations to be timed */ list = NO; /* List all generators */ ntuple = 0; /* n-tuple size for n-tuple tests (0 means all) */ overlap = 1; /* Default is to use overlapping samples in tests that support a choice */ psamples = 0; /* This value precipitates use of test defaults */ seed = 0; /* saves the current (possibly randomly selected) seed */ strategy = 0; /* Means use seed (random or otherwise) from beginning of run */ Seed = 0; /* user selected seed. != 0 surpresses reseeding per sample.*/ tsamples = 0; /* This value precipitates use of test defaults */ table_separator = '|'; /* Default table separator is | for human readability */ /* * Table flags to turn on all of these outputs are defined in output.h, * and can also be added by name or number on the command line as in: * -T seed -T pvalues */ tflag_default = THEADER + TSHOW_RNG + TLINE_HEADER + TTEST_NAME + TNTUPLE + TPSAMPLES + TTSAMPLES + TPVALUES + TASSESSMENT + TRATE + TSEED; tflag = 0; /* We START with this zero so we can accumulate */ verbose = 0; /* Default is not to be verbose. */ /* * These are controls for Test To Destruction (TTD) and Resolve Ambiguity * (RA) modes (as well as normal test reporting). They arguably should * not be globals, as they all are used only in the UI. I'm going to * leave them in libdieharder.h for the moment, though, until all of * these changes settle down because they ARE likely to be used by any UI * that seeks to implement similar search strategy control. */ Xtrategy = 0; /* 0 means "no strategy, off", the default */ Xweak = 0.005; /* Point where generator is flagged as "weak" */ Xfail = 0.000001; /* Point where generator unambiguously fails dieharder */ Xstep = 100; /* Number of pvalues to add when iterating in TTD/RA */ Xoff = 100000; /* This is quite stressful and may run a long time */ x_user = 0.0; /* x,y,z_user are for "arbitrary" input controls */ y_user = 0.0; /* and can be used by any test without having to */ z_user = 0.0; /* rewrite parsecl() or add global variables */ } ./dieharder/user_template.h0000664000175000017500000000416013707046103014242 0ustar eddedd/* * This is an example header file for a test. For existing tests these * headers are in the library includes already, but this one is an example * suitable for use as a template. */ /* * The function needs a prototype. In order to use the standard test * creation/destruction/execution routines, the prototype should have * precisely this form. */ int user_template(Test **test,int irun); /* * This is default data for the test at hand. The first field is * the test name. The second is the test description. The third * is the default number of p-values generated by a run for display * in a histogram and to generate a cumulative test p-value using * Kuiper-Kolmogorov-Smirnov. The fourth is the number of "samples" * accumulated per test, if relevant (some tests do not permit this * to be varied). The fifth and final Dtest parameter is the number * of statistics generated by the test (per test invocation) -- usually * this will be one but for several it is two and could be more. */ static Dtest user_template_dtest __attribute__((unused)) = { "Example User Test", "user_template", "\n\ #==================================================================\n\ # Example Dieharder Test\n\ #\n\ # Lagged Sum Test\n\ # This package contains many very lovely tests. Very few of them,\n\ # however, test for lagged correlations -- the possibility that\n\ # the random number generator has a bitlevel correlation after\n\ # some period. Diehard tests, for example, COULD NOT test for this\n\ # sort of thing with only a few million rands to sample from.\n\ # The template test is therefore very simple. It takes a user-\n\ # specified lag (-x lag) and adds up uniform deviates sampled with\n\ # that lag. The mean of tsamples samples summed should be\n\ # 0.5*tsamples. The standard deviation should be sqrt(tsamples/12).\n\ # The experimental values of the sum are thus converted into a\n\ # p-value (using the erf()) and a ks-test applied to psamples of them.\n\ #==================================================================\n", 100, 100000, 1, user_template, 0 }; ./dieharder/testbits.c0000664000175000017500000002512613707046103013232 0ustar eddedd/* *======================================================================== * $Id: startup.c 242 2006-10-04 05:54:56Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* *======================================================================== * This routine does all the required initialization and startup, * including memory allocation and prefilling of vectors. It is * COMPLETELY outside the timing loops. *======================================================================== */ #include "dieharder.h" void testbits() { unsigned int input[4],output[4]; unsigned int tuple,off; int pattern[10]; off = get_uint_rand(rng); printf("\n"); printf(" off = "); dumpuintbits(&off,1); printf("\n"); mybitadd((char*) &tuple,0, (char*) &off,4,16); printf(" Result = "); dumpuintbits(&tuple,1); printf("\n"); exit(0); /* * Let's test some patterns */ pattern[0] = 4; /* grab 4 bits */ pattern[1] = -8; /* skip 8 bits */ pattern[2] = 4; /* grab 4 more */ pattern[3] = -12;/* skip 12 */ pattern[4] = 3; /* grab 3 more */ pattern[5] = 0; /* * test get_uint_rand(rng) */ printf("Testing get_uint_rand(rng)\n"); printf("==============================================================================\n"); input[0] = get_uint_rand(rng); printf("get_uint_rand(rng) = %10u = ",input[0]); dumpuintbits(&input[0],1);printf("\n"); input[1] = get_uint_rand(rng); printf("get_uint_rand(rng) = %10u = ",input[1]); dumpuintbits(&input[1],1);printf("\n"); input[2] = get_uint_rand(rng); printf("get_uint_rand(rng) = %10u = ",input[2]); dumpuintbits(&input[2],1);printf("\n"); input[3] = get_uint_rand(rng); printf("get_uint_rand(rng) = %10u = ",input[3]); dumpuintbits(&input[3],1);printf("\n"); printf("==============================================================================\n\n"); /* * The following are different tests we need to run to validate * get_ntuple_cyclic (which is a bitch to code). */ printf("\nTesting get_ntuple_cyclic with random data.\n"); /* Get exactly one line. Terminates rule 2a */ tuple = 32; off = 0; printf("Getting a %d-tuple from offset = %d\n|",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* Terminates rule 1a */ tuple = 24; off = 0; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* * The following are different tests we need to run to validate * get_ntuple_cyclic (which is a bitch to code). */ /* Terminates rule 2a */ tuple = 24; off = 8; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* * The following are different tests we need to run to validate * get_ntuple_cyclic (which is a bitch to code). */ /* Terminates rule 1a (interior) */ tuple = 16; off = 8; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* Terminates rule 2c -- one fill from rule R, then 2c */ tuple = 24; off = 24; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* Terminates rule 1 -- alternate R-L R-L R-L 1 */ tuple = 120; off = 0; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* Terminates rule 2b -- R R R 2b */ tuple = 120; off = 8; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* Terminates rule 2c, cycli -- one fill from rule R, then 2c */ tuple = 24; off = 120; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* Terminates rule 1, but wraps cyclic -- R L R L R L 1 */ tuple = 120; off = 32; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* Terminates rule 2b, cyclic -- R R R 2b */ tuple = 120; off = 40; printf("Getting a %d-tuple from offset = %d\n",tuple,off); printf("==================================================================\n"); dumpuintbits(&input[0],2);printf("\n"); dumpuintbits(&input[2],2);printf("\n"); get_ntuple_cyclic(input,4,output,4,tuple,off); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); /* * test get_rand_bits() */ printf("Testing get_rand_bits()\n"); tuple = 32; printf("Getting a %d-tuple from circulating buffer\n",tuple); printf("==============================================================================\n"); get_rand_bits((void *)output,4*sizeof(unsigned int),tuple,rng); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); printf("Testing get_rand_bits()\n"); tuple = 32; printf("Getting a %d-tuple from circulating buffer\n",tuple); printf("==============================================================================\n"); get_rand_bits((void *)output,4*sizeof(unsigned int),tuple,rng); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); printf("Testing get_rand_bits()\n"); tuple = 64; printf("Getting a %d-tuple from circulating buffer\n",tuple); printf("==============================================================================\n"); get_rand_bits((void *)output,4*sizeof(unsigned int),tuple,rng); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); tuple = 16; printf("Getting a %d-tuple from circulating buffer\n",tuple); printf("==============================================================================\n"); get_rand_bits((void *)output,4*sizeof(unsigned int),tuple,rng); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); tuple = 16; printf("Getting a %d-tuple from circulating buffer\n",tuple); printf("==============================================================================\n"); get_rand_bits((void *)output,4*sizeof(unsigned int),tuple,rng); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); tuple = 16; printf("Getting a %d-tuple from circulating buffer\n",tuple); printf("==============================================================================\n"); get_rand_bits((void *)output,4*sizeof(unsigned int),tuple,rng); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); tuple = 32; printf("Getting a %d-tuple from circulating buffer\n",tuple); printf("==============================================================================\n"); get_rand_bits((void *)output,4*sizeof(unsigned int),tuple,rng); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); tuple = 24; printf("Getting a %d-tuple from circulating buffer\n",tuple); printf("==============================================================================\n"); get_rand_bits((void *)output,4*sizeof(unsigned int),tuple,rng); dumpuintbits(&output[0],2);printf("\n"); dumpuintbits(&output[2],2);printf("\n"); printf("==================================================================\n\n"); } ./dieharder/README0000664000175000017500000001557213707046103012111 0ustar eddedd======================================================================== Author Contact Information: Robert G. Brown Duke University Dept. of Physics, Box 90305 Durham, N.C. 27708-0305 Phone: 1-919-660-2567 Fax: 919-660-2525 Email: rgb@phy.duke.edu URL: http://www.phy.duke.edu/~rgb ======================================================================== Notes About the Tests in Dieharder Dieharder is original code written by and Copyright Robert G. Brown (with different code modules written over the period 2003-present). The tests included (or expected to be included in the future) in dieharder, are, however, derived from descriptions from several places. * Diehard, a famous suite of random number tests written over many years by George Marsaglia. The original Diehard sources (written in Fortran) are (of course) Copyright George Marsaglia according to the Berne convention, where authors retain copyright with or without a notice in any original work. The original Diehard code written by Marsaglia did not include a copyright notice or an explicit license in or with the sources that have been made publically available on the web for many years. When contacted, Dr. Marsaglia has indicated his wish to restrict commercial usage of his code and permit only academic/research related use. For this reason the the algorithms are fully re-implemented, in original code, in dieharder to keep authorship and GPL licensing issues clear. However, all diehard-equivalent tests are clearly labelled as such and academically attributed to Dr. Marsaglia. * The National Institute of Standards and Technology (NIST) Statistical Test Suite (STS) as described in publication SP800-22b. Although this test suite was developed with government support and is explicitly in the public domain, and is available in C source. There is some overlap between STS and Diehard -- for example, both have binary matrix rank tests -- but the STS focusses primarily on bitlevel randomness and the suitability of a random number generator for use in cryptographic applications. The tests described in SP800-22b that are implemented in dieharder are completely rewritten in original C by Robert G. Brown to keep copyright and GPL issues clear. All STS-derived tests are clearly labelled as such and are academically attributed to the various authors of the suite (Andrew Rukhin, Juan Soto, James Nechvatal, Miles Smid, Elaine Barker, Stefan Leigh, Mark Levenson, Mark Vangel, David Banks, Alan Heckert, James Dray, San Vo). * Original tests or timing operations inserted by Robert G. Brown. Almost any distribution that can be computed on the basis of a source of random numbers with a derived statistic with known or reliably measurable statistical properties can serve as a test of random numbers using the general approach implemented in Diehard, the STS, Dieharder, and elsewhere. * Tests described in Knuth's The Art of Computer Programming. * User-contributed tests. * Tests described elsewhere in the literature. In all cases some effort has been made to correctly attribute the originator of a test algorithm, and if there are any errors in this regard they will be happily corrected once they are brought to the attention of the author. ======================================================================== To Build Dieharder Dieharder can be built from source in most cases by simply typing "make" on the command line while in the source directory. However, it does require certain resources to build, notably the Gnu Scientific Library in a revision no earlier than 1.4 (and ideally greater than 1.6). It has been tested primarily on gcc/linux-based systems, but should port well to any unixoid environment with at most some minor hacking of the include files or systems calls used. If one is using an RPM-based linux, the easiest way to simply build and install the library is to either take a chance on installing a binary rpm, preferrably one that was built on a system with the same general distribution and environment, or rebuilding the source RPM. However, RPM based installations are actually less desireable with a tool such as diehard than source builds, since part of its appeal is the availability of its source and the ease with which new tests or generators can be directly implemented. Dieharder is an open source project for a reason -- it simply is not possible to trust a test suite of this sort without access to the source because even a subtle error in the sources or data used to perform a test will cause the test to return incorrect answers, conceivably to the detriment of all concerned. With the source readily available, any user is free to examine or modify the source for any test and determine whether or not the test is working and participate in the critical process whereby academia arrives at a consensus truth. ======================================================================== Licensing and Revision Control Dieharder is (as noted) Copyright Robert G. Brown, 2003-2006. It has been kept under revision control (first CVS, more recently Subversion) since the inception of the process in 2003 and all incremental changes to the code as it was developed are carefully documented. Dieharder was deliberately developed to by a GPL project, since alternative random number test suites were either incomplete with regard to the span of test possibilities of interest to the author, restricted or unclear about their licensing restrictions, or both. In addition, by integrating from the beginning with the Gnu Scientific Library (which is a full GPL project with the viral version of the license) it becomes itself a GPL project in any event. It is strongly suggested that prospective users of this test read the terms of the license included with this source distribution in the file COPYING. In summary, permission is granted to freely use and modify the sources and distribute the result or any binary objects derived therefrom as long as the terms of the GPL are abided by. These terms require the preservation of all copyright and license information in the sources and that the source of any and all revisions to the original dieharder code be made available upon request to any receivers of a dieharder binary, among other things. 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. If any user of the dieharder program should revise the program in a way that is likely to be of use to others, they are encouraged to at least offer to contribute the revision back to the project (subject to the "editorial" approval of the primary author). Contact Robert G. Brown to arrange for such a contribution. ======================================================================== ./dieharder/Makefile.RDH0000664000175000017500000000042613707046103013275 0ustar eddedd PKG_CFLAGS = -g -W -I. -DRDIEHARDER PKG_LIBS = -ldieharder -lgsl -lgslcblas -lm sources := $(wildcard *.c) objects := $(sources:%.c=%.o) all : RDieHarder.so RDieHarder.so : $(objects) $(CC) -shared -o $@ $(objects) $(PKG_LIBS) clean : rm $(objects) RDieHarder.so ./dieharder/list_rand.c0000664000175000017500000000225113707046103013342 0ustar eddedd/* * $Id: list_rand.c 255 2007-01-27 15:09:15Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING * See also accompanying file STS.COPYING * */ /* *======================================================================== * This routine generates an output list of random numbers using the * selected generator. The output goes to stdout and can be redirected * or piped as desired at the shell level. The output list includes both * integer and uniform deviate output from the routine (one call following * another) and hence is NOT ideal for tests of sequential correlation. *======================================================================== */ #include "dieharder.h" void list_rand() { int i; printf("#==================================================================\n"); printf("# generator type: %s\n", gsl_rng_name(rng)); printf("# seed value: %u, max value = %u count = %d\n",seed, random_max,tsamples); printf("# Count\t int rand\tuniform rand\n"); printf("# ==================================================================\n"); for(i = 1;i<=tsamples;i++) printf("%d\t%u\t %10.8f\n",i,gsl_rng_get(rng),gsl_rng_uniform(rng)); } ./dieharder/run_test.cruft0000664000175000017500000001155213707046103014133 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include "dieharder.h" void run_test() { int i; /* * ======================================================================== * This is where I'm installing the new dh_test_types[]. * ======================================================================== */ if(dtest_num < 0){ /* printf("dtest_name = %s\n",dtest_name); */ for(i=0;isname); */ if(strncmp(dh_test_types[i]->sname,dtest_name,128)==0){ dtest_num = i; break; } } } } if(dtest_num >= 0){ execute_test(dtest_num); } else { fprintf(stderr,"Error: dtest_num = %d. No test found.\n",dtest_num); exit(1); } } int execute_test(int dtest_num) { int i,j,k; uint need_more_p; double smallest_p; /* * Declare the results struct. */ Test **dieharder_test; /* * Here we have to look at strategy FIRST. If strategy is not zero, * we have to reseed either randomly or from the value of nonzero Seed. */ if(strategy){ if(Seed == 0){ seed = random_seed(); MYDEBUG(D_SEED){ fprintf(stdout,"# execute_test(): Generating random seed %u\n",seed); } } else { seed = Seed; MYDEBUG(D_SEED){ fprintf(stdout,"# execute_test(): Setting fixed seed %u\n",seed); } } gsl_rng_set(rng,seed); } /* printf("Test number %d: execute_test(%s) being run.\n",dtest_num,dh_test_types[dtest_num]->sname);*/ /* * First we create the test (to set some values displayed in test header * correctly). */ dieharder_test = create_test(dh_test_types[dtest_num],tsamples,psamples); /* * We now have to implement Xtrategy. The way it works is that we ALWAYS * execute a single std_test() to initialize the process. Then we add * more tests with add_2_test(). At the moment we will output at the * end of each add_2_tests() call, but this can be made an output option. * We must do all checking for being done etc HERE; the std_test() routines * do not do it (although you cannot overrun add_2_test(), you can get * in an infinite loop if you try to force going past Xoff psamples). */ std_test(dh_test_types[dtest_num],dieharder_test); output(dh_test_types[dtest_num],dieharder_test); /* * If Xtrategy is 0 we are done. */ if(Xtrategy == 0){ /* * Destroy the test and free all dynamic memory it used. */ destroy_test(dh_test_types[dtest_num],dieharder_test); return; } /* * If any test[i]->ks_pvalue is less than Xtreme, we are done. */ for(i = 0; i < dh_test_types[dtest_num]->nkps ; i++){ if(dieharder_test[i]->ks_pvalue < Xfail){ /* * Destroy the test and free all dynamic memory it used. */ destroy_test(dh_test_types[dtest_num],dieharder_test); return; } } /* * If we get to here, the test returned a non-Xtreme) value. Now we have * to act according to the Xtrategy. So we just do the two cases. There * is clear room for more Xtrategies (that can just be experimental variants * of these two). * * Xstep can be set here (overriding its default value of 100) * OR one can add additional modes down below that do complex things to * scale Xstep up nonlinearly. If you use the latter, please create * a save_Xstep variable and put Xstep back when you are done, or you will * potentially break a UI that permits e.g. tests to be created and run * by hand with different strategies in a single program instance. */ /* Xstep = whatever; */ switch(Xtrategy){ default: case 1: need_more_p = YES; while(need_more_p){ smallest_p = 1.0; for(i = 0; i < dh_test_types[dtest_num]->nkps ; i++){ if(dieharder_test[i]->ks_pvalue < smallest_p) smallest_p = dieharder_test[i]->ks_pvalue; } if(smallest_p < Xfail) need_more_p = NO; if(smallest_p >= Xweak) need_more_p = NO; if(dieharder_test[0]->psamples >= Xoff) need_more_p = NO; if(need_more_p){ std_test(dh_test_types[dtest_num],dieharder_test); output(dh_test_types[dtest_num],dieharder_test); } } break; case 2: need_more_p = YES; while(need_more_p){ smallest_p = 1.0; for(i = 0; i < dh_test_types[dtest_num]->nkps ; i++){ if(dieharder_test[i]->ks_pvalue < smallest_p) smallest_p = dieharder_test[i]->ks_pvalue; } if(smallest_p < Xfail) need_more_p = NO; if(dieharder_test[0]->psamples >= Xoff) need_more_p = NO; if(need_more_p){ std_test(dh_test_types[dtest_num],dieharder_test); output(dh_test_types[dtest_num],dieharder_test); } } break; } destroy_test(dh_test_types[dtest_num],dieharder_test); } ./dieharder/help.c0000664000175000017500000002451114273744032012323 0ustar eddedd/* *======================================================================== * $Id: help.c 529 2011-04-01 17:49:31Z rgbatduke $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include "dieharder.h" void help() { int i; dieharder_test_types(); /* * help for EACH test must be defined in the test.c package, even if * it is null or says "sorry, no help available". help should be * a brief test description all pretty with each line beginning with * "#" so it is easy to filter out of standard test results output. */ if(all==YES){ for(i=0;i<900;i++){ if(dh_test_types[i]){ fprintf(stdout,"%s",dh_test_types[i]->description); } } Exit(0); } /* printf("OK, what is dtest_num = %u\n",dtest_num);*/ if(dtest_num>=0 && dtest_num < MAXTESTS && dh_test_types[dtest_num]){ fprintf(stdout,"%s",dh_test_types[dtest_num]->description); Exit(0); } else { Usage(); Exit(0); } } void Usage() { dh_header(); fprintf(stdout, "\n\ Usage:\n\ \n\ dieharder [-a] [-d dieharder test number] [-f filename] [-B]\n\ [-D output flag [-D output flag] ... ] [-F] [-c separator]\n\ [-g generator number or -1] [-h] [-k ks_flag] [-l] \n\ [-L overlap] [-m multiply_p] [-n ntuple] \n\ [-p number of p samples] [-P Xoff]\n\ [-o filename] [-s seed strategy] [-S random number seed]\n\ [-n ntuple] [-p number of p samples] [-o filename]\n\ [-s seed strategy] [-S random number seed]\n\ [-t number of test samples] [-v verbose flag]\n\ [-W weak] [-X fail] [-Y Xtrategy]\n\ [-x xvalue] [-y yvalue] [-z zvalue]\n"); fprintf(stdout, "\n\ -a - runs all the tests with standard/default options to create a report\n\ -d test number - selects specific diehard test.\n\ -f filename - generators 201 or 202 permit either raw binary or \n\ formatted ASCII numbers to be read in from a file for testing.\n\ generator 200 reads in raw binary numbers from stdin.\n\ Note well: many tests with default parameters require a lot of rands!\n\ To see a sample of the (required) header for ASCII formatted input, run\n\ \n\ dieharder -o -f example.input -t 10\n\ \n\ and then examine the contents of example.input.\n\ Raw binary input reads 32 bit increments of the specified data stream.\n\ stdin_input_raw accepts a pipe from a raw binary stream.\n\ -B binary output (used with -o)\n\ -D output flag - permits fields to be selected for inclusion in dieharder\n\ output. Each flag can be entered as a binary number that turns\n\ on a specific output field or header or by flag name; flags are\n\ aggregated. To see all currently known flags use the -F command.\n\ -F - lists all known flags by name and number.\n\ -c table separator - where separator is e.g. ',' (CSV) or ' ' (whitespace).\n\ -g generator number - selects a specific generator for testing. Using\n\ -1 causes all known generators to be printed out to the display.\n\ -h prints context-sensitive help -- usually Usage (this message) or a\n\ test synopsis if entered as e.g. dieharder -D 3 -h.\n\ -k ks_flag - ks_flag\n\ \n\ 0 is fast but slightly sloppy for psamples > 4999 (default).\n\ \n\ 1 is MUCH slower but more accurate for larger numbers of psamples.\n\ \n\ 2 is very slow and accurate to machine precision.\n\ \n\ 3 is kuiper ks, fast, quite inaccurate for small samples, deprecated.\n\ \n\ -l list all known tests.\n\ -L overlap \n\ \n\ 1 (use overlap, default) \n\ \n\ 0 (don't use overlap) \n\ \n\ in operm5 or other tests that support overlapping and non-overlapping \n\ sample modes. \n\ -m multiply_p - multiply default # of psamples in -a(ll) runs to crank\n\ up the resolution of failure.\n\ -n ntuple - set ntuple length for tests on short bit strings that permit\n\ the length to be varied (e.g. rgb bitdist).\n\ -o filename - output -t count random numbers from current generator to file.\n\ -p count - sets the number of p-value samples per test (default 100).\n\ -P Xoff - sets the number of psamples that will cumulate before deciding \n\ that a generator is 'good' and really, truly passes even a -Y 2 T2D run. \n\ Currently the default is 100000; eventually it will be set from \n\ AES-derived T2D test failure thresholds for fully automated reliable \n\ operation, but for now it is more a 'boredom' threshold set by how long \n\ one might reasonably want to wait on any given test run. \n\ -S seed - where seed is a uint. Overrides the default random seed\n\ selection. Ignored for file or stdin input.\n\ -s strategy - if strategy is the (default) 0, dieharder reseeds (or\n\ rewinds) once at the beginning when the random number generator is\n\ selected and then never again. If strategy is nonzero, the generator\n\ is reseeded or rewound at the beginning of EACH TEST. If -S seed was\n\ specified, or a file is used, this means every test is applied to the\n\ same sequence (which is useful for validation and testing of dieharder,\n\ but not a good way to test rngs). Otherwise a new random seed is\n\ selected for each test.\n\ -t count - sets the number of random entities used in each test, where\n\ possible. Be warned -- some tests will take a long time with the\n\ default value of 10000. Read the test synopses for suggested settings\n\ for -t or use -a first. Many tests will ignore -t as they require\n\ a very specific number of samples to be used in generating their\n\ statistic.\n"); fprintf(stdout, " -W weak - sets the 'weak' threshold to make the test(s) more or less \n\ forgiving during e.g. a test-to-destruction run. Default is currently \n\ 0.005. \n\ -X fail - sets the 'fail' threshold to make the test(s) more or less \n\ forgiving during e.g. a test-to-destruction run. Default is currently \n\ 0.000001, which is basically 'certain failure of the null hypothesis', \n\ the desired mode of reproducible generator failure. \n\ -Y Xtrategy - the Xtrategy flag controls the new 'test to failure' (T2F)\n\ modes. These flags and their modes act as follows:\n\ \n\ 0 - just run dieharder with the specified number of tsamples and\n\ psamples, do not dynamically modify a run based on results. This is\n\ the way it has always run, and is still the default.\n\ \n\ 1 - 'resolve ambiguity' (RA) mode. If a test returns 'weak', this is \n\ an undesired result. What does that mean, after all? If you run a long\n\ test series, you will see occasional weak returns for a perfect\n\ generators because p is uniformly distributed and will appear in any\n\ finite interval from time to time. Even if a test run returns more than\n\ one weak result, you cannot be certain that the generator is failing.\n\ RA mode adds psamples (usually in blocks of 100) until the\n\ test result ends up solidly not weak or proceeds to unambiguous failure.\n\ This is morally equivalent to running the test several times to see if a\n\ weak result is reproducible, but eliminates the bias of personal\n\ judgement in the process since the default failure threshold is very\n\ small and very unlikely to be reached by random chance even in many\n\ runs.\n\ \n\ This option should only be used with -k 2.\n\ \n\ 2 - 'test to destruction' (T2D) mode. Sometimes you just want to know\n\ where or if a generator will .I ever fail a test (or test series). -Y 2\n\ causes psamples to be added 100 at a time until a test returns an\n\ overall pvalue lower than the failure threshold or a specified maximum\n\ number of psamples (see -P) is reached. \n"); fprintf(stdout, "\n\ Note well! In this mode one may well fail due to the alternate\n\ null hypothesis -- the test itself is a bad test and fails! Many\n\ dieharder tests, despite our best efforts, are numerically unstable or\n\ have only approximately known target statistics or are straight up\n\ asymptotic results, and will eventually return a failing result even for\n\ a gold-standard generator (such as AES), or for the hypercautious the\n\ XOR generator with AES, threefish, kiss, all loaded at once and xor'd\n\ together. It is therefore safest to use this mode comparatively,\n\ executing a T2D run on AES to get an idea of the test failure\n\ threshold(s) (something I will eventually do and publish on the web so\n\ everybody doesn't have to do it independently) and then running it on\n\ your target generator. Failure with numbers of psamples within an order\n\ of magnitude of the AES thresholds should probably be considered\n\ possible test failures, not generator failures. Failures at levels\n\ significantly less than the known gold standard generator failure\n\ thresholds are, of course, probably failures of the generator.\n\ \n\ This option should only be used with -k 2.\n\ \n\ -v verbose flag -- controls the verbosity of the output for debugging\n\ only. Probably of little use to non-developers, and developers can\n\ read the enum(s) in dieharder.h and the test sources to see which\n\ flag values turn on output on which routines. 1 is 'all' and will\n\ result in a highly detailed trace of program activity.\n\ \n\ -x,-y,-z number - Some tests have parameters that can safely be varied\n\ from their default value. For example, in the diehard birthdays test,\n\ one can vary the number of 'dates' drawn from the 'year' of some\n\ length, which can also be varied. -x 2048 -y 30 alters these two values\n\ but should still run fine. These parameters should be documented\n\ internally (where they exist) in the e.g. -d 0 -h visible notes.\n\ \n\ NOTE WELL: The assessment(s) for the rngs may, in fact, be completely\n\ incorrect or misleading. In particular, 'Weak' pvalues should occur\n\ one test in a hundred, and 'Failed' pvalues should occur one test in\n\ a thousand -- that's what p MEANS. Use them at your Own Risk! Be Warned!\n\ \n"); exit(0); } /* Cruft * This is a standard way of putting out a test description void help_test(Dtest *dtest) { printf("%s",dtest->description); } */ ./dieharder/d_g205_a_Y1.out0000664000175000017500000001564613707046103013615 0ustar eddedd#=============================================================================# # dieharder version 3.29.5beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| Seed | AES_OFB| 2.71e+07 | 205224670| #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 100|0.80893239| PASSED diehard_operm5| 5| 1000000| 100|0.03763324| PASSED diehard_rank_32x32| 0| 40000| 100|0.78446160| PASSED diehard_rank_6x8| 0| 100000| 100|0.09165899| PASSED diehard_bitstream| 0| 2097152| 100|0.14251957| PASSED diehard_opso| 0| 2097152| 100|0.01305680| PASSED diehard_oqso| 0| 2097152| 100|0.59191187| PASSED diehard_dna| 0| 2097152| 100|0.59854505| PASSED diehard_count_1s_str| 0| 256000| 100|0.80330619| PASSED diehard_count_1s_byt| 0| 256000| 100|0.03433692| PASSED diehard_parking_lot| 0| 12000| 100|0.18394907| PASSED diehard_2dsphere| 2| 8000| 100|0.15467172| PASSED diehard_3dsphere| 3| 4000| 100|0.65668025| PASSED diehard_squeeze| 0| 100000| 100|0.39930786| PASSED diehard_sums| 0| 100| 100|0.00000442| WEAK diehard_sums| 0| 100| 200|0.00000000| FAILED diehard_runs| 0| 100000| 100|0.87452751| PASSED diehard_runs| 0| 100000| 100|0.22703133| PASSED diehard_craps| 0| 200000| 100|0.89850268| PASSED diehard_craps| 0| 200000| 100|0.47807319| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.43232221| PASSED marsaglia_tsang_gcd| 0| 10000000| 100|0.98981745| PASSED sts_monobit| 1| 100000| 100|0.20410180| PASSED sts_runs| 2| 100000| 100|0.74924962| PASSED sts_serial| 1| 100000| 100|0.52813587| PASSED sts_serial| 2| 100000| 100|0.88950288| PASSED sts_serial| 3| 100000| 100|0.45554029| PASSED sts_serial| 3| 100000| 100|0.06177226| PASSED sts_serial| 4| 100000| 100|0.77261687| PASSED sts_serial| 4| 100000| 100|0.96868101| PASSED sts_serial| 5| 100000| 100|0.52826957| PASSED sts_serial| 5| 100000| 100|0.55064818| PASSED sts_serial| 6| 100000| 100|0.16308263| PASSED sts_serial| 6| 100000| 100|0.48583093| PASSED sts_serial| 7| 100000| 100|0.37336499| PASSED sts_serial| 7| 100000| 100|0.11355964| PASSED sts_serial| 8| 100000| 100|0.60728845| PASSED sts_serial| 8| 100000| 100|0.60047138| PASSED sts_serial| 9| 100000| 100|0.80854994| PASSED sts_serial| 9| 100000| 100|0.23436521| PASSED sts_serial| 10| 100000| 100|0.82996938| PASSED sts_serial| 10| 100000| 100|0.79358125| PASSED sts_serial| 11| 100000| 100|0.63553918| PASSED sts_serial| 11| 100000| 100|0.09717073| PASSED sts_serial| 12| 100000| 100|0.90647799| PASSED sts_serial| 12| 100000| 100|0.49372803| PASSED sts_serial| 13| 100000| 100|0.46884148| PASSED sts_serial| 13| 100000| 100|0.72605403| PASSED sts_serial| 14| 100000| 100|0.98221431| PASSED sts_serial| 14| 100000| 100|0.54461529| PASSED sts_serial| 15| 100000| 100|0.91821655| PASSED sts_serial| 15| 100000| 100|0.63199701| PASSED sts_serial| 16| 100000| 100|0.90319118| PASSED sts_serial| 16| 100000| 100|0.76445167| PASSED rgb_bitdist| 1| 100000| 100|0.45228413| PASSED rgb_bitdist| 2| 100000| 100|0.85610223| PASSED rgb_bitdist| 3| 100000| 100|0.87142384| PASSED rgb_bitdist| 4| 100000| 100|0.31740404| PASSED rgb_bitdist| 5| 100000| 100|0.56087192| PASSED rgb_bitdist| 6| 100000| 100|0.04147357| PASSED rgb_bitdist| 7| 100000| 100|0.14730994| PASSED rgb_bitdist| 8| 100000| 100|0.14969864| PASSED rgb_bitdist| 9| 100000| 100|0.88626300| PASSED rgb_bitdist| 10| 100000| 100|0.29670081| PASSED rgb_bitdist| 11| 100000| 100|0.63721491| PASSED rgb_bitdist| 12| 100000| 100|0.83849303| PASSED rgb_minimum_distance| 2| 10000| 1000|0.22411219| PASSED rgb_minimum_distance| 3| 10000| 1000|0.84397896| PASSED rgb_minimum_distance| 4| 10000| 1000|0.42496024| PASSED rgb_minimum_distance| 5| 10000| 1000|0.50141324| PASSED rgb_permutations| 2| 100000| 100|0.34574320| PASSED rgb_permutations| 3| 100000| 100|0.50528580| PASSED rgb_permutations| 4| 100000| 100|0.83518676| PASSED rgb_permutations| 5| 100000| 100|0.66628557| PASSED rgb_lagged_sum| 0| 1000000| 100|0.91541406| PASSED rgb_lagged_sum| 1| 1000000| 100|0.80422646| PASSED rgb_lagged_sum| 2| 1000000| 100|0.41420626| PASSED rgb_lagged_sum| 3| 1000000| 100|0.20285035| PASSED rgb_lagged_sum| 4| 1000000| 100|0.09220408| PASSED rgb_lagged_sum| 5| 1000000| 100|0.50140977| PASSED rgb_lagged_sum| 6| 1000000| 100|0.58959027| PASSED rgb_lagged_sum| 7| 1000000| 100|0.25103273| PASSED rgb_lagged_sum| 8| 1000000| 100|0.87733026| PASSED rgb_lagged_sum| 9| 1000000| 100|0.10291000| PASSED rgb_lagged_sum| 10| 1000000| 100|0.62433480| PASSED rgb_lagged_sum| 11| 1000000| 100|0.68107432| PASSED rgb_lagged_sum| 12| 1000000| 100|0.41339988| PASSED rgb_lagged_sum| 13| 1000000| 100|0.61450241| PASSED rgb_lagged_sum| 14| 1000000| 100|0.09202318| PASSED rgb_lagged_sum| 15| 1000000| 100|0.84818307| PASSED rgb_lagged_sum| 16| 1000000| 100|0.80746762| PASSED rgb_lagged_sum| 17| 1000000| 100|0.85949236| PASSED rgb_lagged_sum| 18| 1000000| 100|0.20730715| PASSED rgb_lagged_sum| 19| 1000000| 100|0.39538782| PASSED rgb_lagged_sum| 20| 1000000| 100|0.72738308| PASSED rgb_lagged_sum| 21| 1000000| 100|0.35581586| PASSED ./dieharder/histograms0000664000175000017500000001527313707046103013332 0ustar eddedd#=============================================================================# # dieharder version 3.29.0beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| mt19937| 4.84e+07 | #=============================================================================# # Histogram of test p-values # #=============================================================================# # Bin scale = 0.100000 # 2000| | | | | | | | | | | # | | | | | | | | | | | # 1800| | | | | | | | | |****| # | | | | | | | | | |****| # 1600| | | | | | | | | |****| # | | | | | | | | | |****| # 1400| | | | | | | | | |****| # | | | | | | | | | |****| # 1200| | | | | | | | | |****| # | | | | | | | | |****|****| # 1000| | | | | | |****|****|****|****| # | | | | | |****|****|****|****|****| # 800| | | |****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 600|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 400|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 200|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #=============================================================================# #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment| Seed #=============================================================================# rgb_kstest_test| 0| 100| 10000|0.00000000| FAILED | 1 #=============================================================================# # dieharder version 3.29.0beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| mt19937| 3.63e+07 | #=============================================================================# # Histogram of test p-values # #=============================================================================# # Bin scale = 0.100000 # 2000| | | | | | | | | | | # | | | | | | | | | | | # 1800| | | | | | | | | | | # | | | | | | | | | | | # 1600| | | | | | | | | | | # | | | | | | | | | | | # 1400| | | | | | | | | | | # | | | | | | | | | | | # 1200| | | | | | | | | | | # | | | | | | | | | | | # 1000|****| | |****| | |****| |****|****| # |****|****|****|****|****|****|****|****|****|****| # 800|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 600|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 400|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 200|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #=============================================================================# #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment| Seed #=============================================================================# rgb_kstest_test| 0| 100| 10000|0.09685116| PASSED | 1 #=============================================================================# # dieharder version 3.29.0beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| mt19937| 3.59e+07 | #=============================================================================# # Histogram of test p-values # #=============================================================================# # Bin scale = 0.100000 # 2000| | | | | | | | | | | # | | | | | | | | | | | # 1800| | | | | | | | | | | # | | | | | | | | | |****| # 1600| | | | | | | | | |****| # | | | | | | | | | |****| # 1400| | | | | | | | | |****| # | | | | | | | | | |****| # 1200| | | | | | | | | |****| # | | | | | | | | | |****| # 1000| | | | | | | |****|****|****| # | | | | | |****|****|****|****|****| # 800|****| |****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 600|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 400|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 200|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #=============================================================================# #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment| Seed #=============================================================================# rgb_kstest_test| 0| 100| 10000|0.00000000| FAILED | 1 ./dieharder/run_test.c0000664000175000017500000000775413707046103013243 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include "dieharder.h" void run_test() { int i; /* * ======================================================================== * This is where I'm installing the new dh_test_types[]. * ======================================================================== */ if(dtest_num < 0){ /* printf("dtest_name = %s\n",dtest_name); */ for(i=0;isname); */ if(strncmp(dh_test_types[i]->sname,dtest_name,128)==0){ dtest_num = i; break; } } } } if(dtest_num >= 0){ execute_test(dtest_num); } else { fprintf(stderr,"Error: dtest_num = %d. No test found.\n",dtest_num); exit(1); } } int execute_test(int dtest_num) { int i; unsigned int need_more_p; double smallest_p; /* * Declare the results struct. */ Test **dieharder_test; /* * Here we have to look at strategy FIRST. If strategy is not zero, * we have to reseed either randomly or from the value of nonzero Seed. */ if(strategy){ if(Seed == 0){ seed = random_seed(); MYDEBUG(D_SEED){ fprintf(stdout,"# execute_test(): Generating random seed %lu\n",seed); } } else { seed = Seed; MYDEBUG(D_SEED){ fprintf(stdout,"# execute_test(): Setting fixed seed %lu\n",seed); } } gsl_rng_set(rng,seed); } /* printf("Test number %d: execute_test(%s) being run.\n",dtest_num,dh_test_types[dtest_num]->sname);*/ /* * First we create the test (to set some values displayed in test header * correctly). */ dieharder_test = create_test(dh_test_types[dtest_num],tsamples,psamples); /* * We now have to implement Xtrategy. Since std_test is now smart enough * to be able to differentiate a first call after creation or clear from * subsequent calls (where the latter adds Xstep more psamples) all we * need is a simple case switch on -Y Xtrategy to decide what to do. * Note well that we can reset Xstep here (hard code) or add additional * cases below quite easily to e.g. exponentially grow Xstep as we proceed. * If you do this, please preserve Xstep and put it back when you are done. */ /* Xstep = whatever; */ need_more_p = YES; while(need_more_p){ std_test(dh_test_types[dtest_num],dieharder_test); output(dh_test_types[dtest_num],dieharder_test); smallest_p = 0.5; for(i = 0; i < dh_test_types[dtest_num]->nkps ; i++){ if(0.5 - fabs(dieharder_test[i]->ks_pvalue - 0.5) < smallest_p) { smallest_p = 0.5 - fabs(dieharder_test[i]->ks_pvalue - 0.5); } } switch(Xtrategy){ /* * This just runs std_test a single time, period, for good or ill. */ default: case 0: need_more_p = NO; break; /* * Resolve Ambiguity (RA) mode * * If any test has a p that is less than Xfail, we are done. * If the entire test has pvalues that are bigger than Xweak, * we are done (we really need this to happen e.g. 3x consecutively * or exceed a much larger threshold, but that is more work to code * and I want to be certain of the algorithm first). If the test * has accumulated Xoff psamples, we are done. */ case 1: if(smallest_p < Xfail) need_more_p = NO; if(smallest_p >= Xweak) need_more_p = NO; if(dieharder_test[0]->psamples >= Xoff) need_more_p = NO; break; /* * Test To Destruction (TTD) mode * * If any test has a p that is less than Xfail, we are done. * If the test has accumulated Xoff psamples, we are done. */ case 2: if(smallest_p < Xfail) need_more_p = NO; if(dieharder_test[0]->psamples >= Xoff) need_more_p = NO; break; } } destroy_test(dh_test_types[dtest_num],dieharder_test); return(0); } ./dieharder/dieharder.c0000664000175000017500000001003113707046103013305 0ustar eddedd/* *======================================================================== * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include "dieharder.h" /* * For Command Line Interface (CLI) dieharder, main() is just a shell for * routines that parse the command line, do all the requested work, and * then exit cleanly. Interactive User Interfaces (UIs) have an internal * interactive loop. The initialization commands are therefore split up * so that things that must be done once per invocation of the binary * itself are cleanly distinct from things that must be done once per * selection of rng to be tested, that are in turn distinct from things * that must be done once per test. See comments around each call below. */ int main(int argc, char *argv[]) { /* * set_globals picks the default values that control the CLI/UI (not the * tests, which have internal defaults). If you are writing your own UI, * replace or patch set_globals with your own choices if desired. Note * that some of the variables set control e.g. dieharder stdout output * options that will likely be irrelevant to a GUI or tool interface. */ set_globals(); /* * parsecl executes CLI-specific code that overrides the defaults set by * set_globals with choices selected via command line options. A UI * should almost certainly just reset the global variables directly and * not use parsecl(). parsecl() (and the options available to the CLI) * is subject to change without notice as the CLI evolves, but the global * variables themselves should change much more slowly. */ parsecl(argc,argv); /* * This fills the global *dh_rng_types defined in libdieharder with all * the rngs known directly to libdieharder including known hardware * generators and file input "generators". This routine also sets the * counts of each "kind" of generator into global/shared variables. This * command must be run (by all UIs, not just the dieharder CLI) BEFORE * adding any UI generators, and BEFORE selecting a generator or input * stream to test. */ dieharder_rng_types(); /* * Similarly we load *dh_test_types[]. */ dieharder_test_types(); /* * The following contains commands that are likely to be different for * different UIs. At the very least, they can be done more than once in * an interactive UI, even though some of them will usually be done just * one time in the dieharder CLI. I'm indenting them to show their * RELATIVE precedence in a core event loop in a UI. */ /* * Pick a rng, establish a seed based on how things were initialized * in parsecl() or elsewhere. Note that choose_rng() times the selected * rng as a matter of course now. */ choose_rng(); /* * At this point, a valid rng should be selected, allocated, and * provisionally seeded. It -a(ll) is set (CLI only) run all the * available tests on the selected rng, reseeding at the beginning of * each test if Seed is nonzero. Otherwise, run the single selected * test (which may still return a vector of pvalues) on the single * selected rng. The CLI then goes on to exit; an interactive UI would * presumably loop back to permit the user to run another test on the * selected rng or select a new rng (and run more tests on it) until the * user elects to exit. * * It is the UI's responsibility to ensure that run_test() is not called * without choosing a valid rng first! */ if(all){ run_all_tests(); } else { run_test(); } /* * This ends the core loop for a non-CLI interactive UI. GUIs will * typically exit directly from the event loop. Tool UIs may well fall * through, and the CLI simply proceeds sequentially to exit. It isn't * strictly necessary to execute an exit() command at the end, but it * does make the code a bit clearer (and let's one choose an exit code, * if that might ever matter. Exit code 0 clearly means "completed * normally". */ exit(0); } ./dieharder/d_g207_a.out0000664000175000017500000000124313707046103013232 0ustar eddeddSeeding kiss Done! Seeding kiss Done! Seeding kiss Done! #=============================================================================# # dieharder version 3.29.5beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| Seed | kiss| 1.66e+08 | 969302850| #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# sts_monobit| 1| 100000| 100|0.00000000| FAILED ./dieharder/list_rngs.c0000664000175000017500000000712013707046103013367 0ustar eddedd/* * $Id: list_rngs.c 472 2008-09-22 04:13:56Z rgbatduke $ * * See copyright in copyright.h and the accompanying file COPYING * See also accompanying file STS.COPYING * */ /* *======================================================================== * This just lists the available rng's. This is the default action of * dieharder when no test is specified. *======================================================================== */ #include "dieharder.h" void list_rngs() { int i,j; /* * This is run right away or not at all, so just announce that we're * listing rngs if verbose is set at all. */ if(verbose){ printf("list_rngs():\n"); } /* * These have to be called to set up the types[] vector with all * the available rngs so we can list them. This SHOULD be the first * time this is called (and the only time) but it shouldn't leak memory * even if it is called more than once -- it uses a static global vector * in libdieharder's data space and is therefore persistent. */ dieharder_rng_types(); add_ui_rngs(); /* Version string seems like a good idea */ dh_header(); printf("# %3s %-20s|%3s %-20s|%3s %-20s#\n"," Id","Test Name", " Id","Test Name"," Id","Test Name"); printf("#=============================================================================#\n"); i = 0; j = 0; while(dh_rng_types[i] != NULL){ if(j%3 == 0) printf("| "); printf("%3.3d %-20s|", i, dh_rng_types[i]->name); if(((j+1)%3) == 0 && i>0) printf("\n"); i++; j++; } /* * Finish off each block neatly. If j == 0, we finished the row * and do nothing. Otherwise, pad to the end of the row. */ j = j%3; if(j == 1) printf(" | |\n"); if(j == 2) printf(" |\n"); printf("#=============================================================================#\n"); i = 200; j = 0; while(dh_rng_types[i] != NULL){ if(j%3 == 0) printf("| "); printf("%3.3d %-20s|", i, dh_rng_types[i]->name); if(((j+1)%3) == 0 && i>200) printf("\n"); i++; j++; } j = j%3; if(j == 1) printf(" | |\n"); if(j == 2) printf(" |\n"); printf("#=============================================================================#\n"); i = 400; j = 0; while(dh_rng_types[i] != NULL){ if(j%3 == 0) printf("| "); printf("%3d %-20s|", i, dh_rng_types[i]->name); if(((j+1)%3) == 0 && i>400) printf("\n"); i++; j++; } j = j%3; if(j == 1) printf(" | |\n"); if(j == 2) printf(" |\n"); printf("#=============================================================================#\n"); i = 500; j = 0; while(dh_rng_types[i] != NULL){ if(j%3 == 0) printf("| "); printf("%3d %-20s|", i, dh_rng_types[i]->name); if(((j+1)%3) == 0 && i>500) printf("\n"); i++; j++; } j = j%3; if(j == 1) printf(" | |\n"); if(j == 2) printf(" |\n"); printf("#=============================================================================#\n"); if(dh_num_user_rngs){ i = 600; j = 0; while(dh_rng_types[i] != NULL){ if(j%3 == 0) printf("| "); printf("%3d %-20s|", i, dh_rng_types[i]->name); if(((j+1)%3) == 0 && i>600) printf("\n"); i++; j++; } j = j%3; if(j == 1) printf(" | |\n"); if(j == 2) printf(" |\n"); printf("#=============================================================================#\n"); } } ./dieharder/output.h0000664000175000017500000000224214350422742012732 0ustar eddedd /* * These are all binary flags, used to control precisely what comes out * of dieharder in its reports. The vector of strings immediately * below it can be used to match up names to the power of two of each * entry. Be sure to keep the two precisely in sync! */ typedef enum { TDEFAULT = 0, THEADER = 1, TSHOW_RNG = 2, TLINE_HEADER = 4, TTEST_NAME = 8, TNTUPLE = 16, TTSAMPLES = 32, TPSAMPLES = 64, TPVALUES = 128, TASSESSMENT = 256, TPREFIX = 512, TDESCRIPTION = 1024, THISTOGRAM = 2048, TSEED = 4096, TRATE = 8192, TNUM = 16384, TNO_WHITE = 32768, TPSAMPLE_VALS = 65536 } Table; #define TCNT 17 /* * These should have a maximum length one can use in strncmp(). * At the moment it looks like 10, but I think 16 is a safer * bet (and still safe from a buffer overwrite point of view) */ #define TLENGTH 16 static char *table_fields[] __attribute__((unused)) = { "default", "header", "show_rng", "line_header", "test_name", "ntuple", "tsamples", "psamples", "pvalues", "assessment", "prefix", "description", "histogram", "seed", "rate", "show_num", "no_whitespace", "psample_values" }; ./dieharder/dieharder_exit.c0000664000175000017500000000154713707046103014352 0ustar eddedd/* *======================================================================== * $Id: work.c 320 2007-05-21 13:34:44Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include "dieharder.h" /* *======================================================================== * We need a wrapper for exit() because we cannot call it in R. * We also very likely will need to do some cleanup on exit that * didn't bother with in dieharder on a single pass CL program -- * somebody might well run dieharder in a loop and leak otherwise. *======================================================================== */ void Exit(int exitcode) { #if !defined(RDIEHARDER) exit(exitcode); #endif /* !defined(RDIEHARDER) */ /* Add any e.g. free() statements below */ } ./dieharder/parsecl.c0000664000175000017500000002452413707046103013023 0ustar eddedd/* * $Id: parsecl.c 529 2011-04-01 17:49:31Z rgbatduke $ * * See copyright in copyright.h and the accompanying file COPYING * */ #include "dieharder.h" #include /* * parsecl parses the command line for the dieharder CLI to: * * a) override the defaults set by set_globals(). * b) handle ill-formed command lines (usage errors) * c) manage all autodocumentation features of dieharder (commands * that cause any of the general output documentation panels to print). * * With the exception of the usage/documentation pathways (that all exit * on completion without executing any test) parsecl does no actual work. * Actual dieharder setup and task execution is handled by downstream * routines. */ char table_entry[TLENGTH]; int show_flags = 0; void parsecl(int argc, char **argv) { /* * Thus far, dieharder has used getopt() to parse the CL. However, this * isn't as flexible as one might like. To manage CLI-driven control * flags and a few other things, we may need to parse out options the * hard way in a future release. The following variables are pretty much * all to support getopt and would change if we change parsing tools or * strategies. */ int i,c,errflg=0; int itmp; int tflag_tmp = 0,dtest_tmp,gen_tmp=17; extern char *optarg; extern int optind, opterr, optopt; char *endptr; /* * If dieharder is executed by itself on a command line, print out help * and then exit. dieharder cannot be run without options, in other * words. */ if(argc == 1){ Usage(); exit(1); /* count this as an error */ } while ((c = getopt(argc,argv,"aBc:D:d:Ff:g:hi:k:lL:m:n:oO:p:P:S:s:t:Vv:W:X:x:Y:y:Z:z:")) != EOF){ switch (c){ case 'a': all = YES; break; case 'B': binary = 1; break; case 'c': /* printf("Setting separator to %c\n",optarg[0]); */ table_separator = (char) optarg[0]; break; case 'D': /* * We only override the default table display flags if there is * actually an argument to -D. I hope. */ tflag_tmp = strtol(optarg,&endptr,10); if(*endptr != 0){ /* * This trick will be useful for parsing both random * number generator names and test names. Try to convert * the string to a number, but if the conversion fails * then try to lookup a string instead and convert to * the index/number needed. */ for(i=0;i 2){ fprintf(stderr,"-O %u format not recognized.\n",output_format); fprintf(stderr," Choices: 0 (binary), 1 (uint), 2 (decimal)\n"); } break; case 'P': Xoff = strtol(optarg,(char **) NULL,10); break; case 'p': psamples = strtol(optarg,(char **) NULL,10); break; case 'S': Seed = strtol(optarg,(char **) NULL,10); gseeds[gscount] = gen_tmp; gscount++; break; case 's': strategy = strtol(optarg,(char **) NULL,10); break; case 't': itmp = strtol(optarg,(char **) NULL,10); /* * For a variety of reasons, we can't yet manage a full uint here, * nor can we deal with a negative number. HOWEVER, we DO have * a really big ull tsamples, and we really SHOULD do our checking * for excessive size elsewhere. */ if(itmp>=0){ tsamples = itmp; } else { fprintf(stderr,"Warning! tsamples cannot be negative = %d\n",itmp); fprintf(stderr," using default tsamples value(s).\n"); fflush(stderr); } break; case 'V': dh_version(); exit(0); break; case 'v': verbose = strtol(optarg,(char **) NULL,10); printf("# Verbose is now %d\n",verbose); break; case 'W': Xweak = strtod(optarg,(char **) NULL); break; case 'X': Xfail = strtod(optarg,(char **) NULL); break; case 'x': x_user = strtod(optarg,(char **) NULL); break; case 'Y': Xtrategy = strtol(optarg,(char **) NULL,10); break; case 'y': y_user = strtod(optarg,(char **) NULL); break; case 'z': z_user = strtod(optarg,(char **) NULL); break; case '?': errflg++; } } /* * By the time we get here, all the command line options should have * been processed, and we are ready to act on them. There are a small * set of options that we act on right away below, mostly associated with * the autodocumenting features of the dieharder CLI (only). * Interfaces such as Rdieharder should just ifdef them out, or better * yet, not use this routine at all since it should invariably be faster * and easier to just set the options directly instead of building a * fake command line to hand off to parsecl(). */ /* * Some option was set incorrectly. */ if(errflg){ Usage(); exit(0); } /* * If there are no more arguments it is a legal command. We execute * some of the simpler, autodocumenting ones right here and then * immediately exit. */ if(argc-optind == 0){ /* * If a list of tests was requested, print it and exit. */ if(list == YES) { list_tests(); Exit(0); } /* * If a list of all the generators was requested, we give it, but * list_rngs() won't work until after the types[] list is built. * I could probably do this several ways, but this one is quite * simple and works fine. */ if(generator == -1){ list_rngs(); Exit(0); } if(show_flags == 1){ dh_header(); fprintf(stdout," Dieharder output control flags. Set with -D flagname or -D flag\n"); fprintf(stdout," Multiple flags may be given:\t\tdieharder -a -D test_name -D pvalues.\n"); fprintf(stdout," Flags names and numbers may be mixed:\tdieharder -a -D 8 -D pvalues.\n"); fprintf(stdout," Flag\t Flag Name\n"); fprintf(stdout,"=======================\n"); fprintf(stdout,"%5d\t%15s\n",0,table_fields[0]); for(i=0;i #include #include #include #include #include #include "dieharder.h" /* from the front-end sources */ SEXP dieharder(SEXP genS, SEXP testS, SEXP seedS, SEXP psamplesS, SEXP verbS, SEXP infileS, SEXP ntupleS) { int verb, testarg; unsigned int i; SEXP result = NULL, vec, pv, name, desc, nkps; char *inputfile; /* Setup argv to allow call of parsecl() to let dieharder set globals */ char *argv[] = { "dieharder" }; optind = 0; parsecl(1, argv); /* Parse 'our' parameters from R */ generator = INTEGER_VALUE(genS); testarg = INTEGER_VALUE(testS); diehard = rgb = sts = user = 0; if (testarg < 100) { diehard = testarg; } else if (testarg < 200) { rgb = testarg - 100; } else if (testarg < 300) { sts = testarg - 200; } else { user = testarg - 300; } Seed = (unsigned long int) INTEGER_VALUE(seedS); /* (user-select) Seed, not (save switch) seed */ psamples = INTEGER_VALUE(psamplesS); verb = INTEGER_VALUE(verbS); inputfile = (char*) CHARACTER_VALUE(infileS); ntuple = INTEGER_VALUE(ntupleS); rdh_testptr = NULL; rdh_dtestptr = NULL; /* to be safe, explicitly flag as NULL; cf test in output.c */ if (strcmp(inputfile, "") != 0) { strncpy(filename, inputfile, 128); fromfile = 1; /* flag this as file input */ } if (Seed == 0) { seed = random_seed(); } else { seed = (unsigned long int) Seed; } if (verb) { Rprintf("Dieharder called with gen=%d test=%d seed=%lu\n", generator, diehard, seed); quiet = 0; hist_flag = 1; } else { quiet = 1; /* override dieharder command-line default */ hist_flag = 0; } /* Now do the work that dieharder.c does */ startup(); work(); gsl_rng_free(rng); reset_bit_buffers(); /* And then bring our results back to R */ /* create vector of size four: [0] is vector (!!) ks_pv, [1] is pvalues vec, [2] name, [3] nkps */ PROTECT(result = allocVector(VECSXP, 4)); /* alloc vector and scalars, and set it */ PROTECT(pv = allocVector(REALSXP, rdh_dtestptr->nkps)); PROTECT(name = allocVector(STRSXP, 1)); PROTECT(nkps = allocVector(INTSXP, 1)); if (rdh_testptr != NULL && rdh_dtestptr != NULL) { for (i=0; inkps; i++) { /* there can be nkps p-values per test */ REAL(pv)[i] = rdh_testptr[i]->ks_pvalue; } PROTECT(vec = allocVector(REALSXP, rdh_testptr[0]->psamples)); /* alloc vector and set it */ for (i = 0; i < rdh_testptr[0]->psamples; i++) { REAL(vec)[i] = rdh_testptr[0]->pvalues[i]; } SET_STRING_ELT(name, 0, mkChar(rdh_dtestptr->name)); INTEGER(nkps)[0] = rdh_dtestptr->nkps; /* nb of Kuiper KS p-values in pv vector */ } else { PROTECT(vec = allocVector(REALSXP, 1)); REAL(pv)[0] = R_NaN; REAL(vec)[0] = R_NaN; SET_STRING_ELT(name, 0, mkChar("")); INTEGER(nkps)[0] = R_NaN; } /* insert vectors and scalars into result vector */ SET_VECTOR_ELT(result, 0, pv); SET_VECTOR_ELT(result, 1, vec); SET_VECTOR_ELT(result, 2, name); SET_VECTOR_ELT(result, 3, nkps); UNPROTECT(5); return result; } SEXP dieharderGenerators(void) { SEXP result, gens, genid; unsigned int i,j; /* from startup.c */ /* * We new have to work a bit harder to determine how many * generators we have of the different dh_types because there are * different ranges for different sources of generator. * * We start with the basic GSL generators, which start at offset 0. */ dh_types = dieharder_rng_dh_types_setup (); i = 0; while(dh_types[i] != NULL){ i++; j++; } num_gsl_rngs = i; /* * Next come the dieharder generators, which start at offset 200. */ i = 200; j = 0; while(dh_types[i] != NULL){ i++; j++; } num_dieharder_rngs = j; /* * Next come the R generators, which start at offset 400. */ i = 400; j = 0; while(dh_types[i] != NULL){ i++; j++; } num_R_rngs = j; /* * Next come the hardware generators, which start at offset 500. */ i = 500; j = 0; while(dh_types[i] != NULL){ i++; j++; } num_hardware_rngs = j; /* * Finally, any generators added by the user at the interface level. * That is, if you are hacking dieharder to add your own rng, add it * below and it should "just appear" in the dieharder list of available * generators and be immediately useful. */ i = 600; j = 0; dh_types[i] = gsl_rng_empty_random; i++; j++; num_ui_rngs = j; /* /\* */ /* * Now add my own dh_types and count THEM. */ /* *\/ */ /* add_ui_rngs(); */ /* while(dh_types[i] != NULL){ */ /* i++; */ /* } */ num_rngs = num_gsl_rngs + num_dieharder_rngs + num_R_rngs + num_hardware_rngs + num_ui_rngs; /* vector of size onetwo: [0] is scalar ks_pv, [1] is vector of pvalues */ PROTECT(result = allocVector(VECSXP, 2)); PROTECT(gens = allocVector(STRSXP, num_rngs)); PROTECT(genid = allocVector(INTSXP, num_rngs)); j = 0; for (i = 0; i < num_gsl_rngs; i++) { SET_STRING_ELT(gens, j, mkChar(dh_types[i]->name)); INTEGER(genid)[j++] = i; } for (i = 200; i < 200 + num_dieharder_rngs; i++) { SET_STRING_ELT(gens, j, mkChar(dh_types[i]->name)); INTEGER(genid)[j++] = i; } for (i = 400; i < 400 + num_R_rngs; i++) { SET_STRING_ELT(gens, j, mkChar(dh_types[i]->name)); INTEGER(genid)[j++] = i; } for (i = 500; i < 500 + num_hardware_rngs; i++) { SET_STRING_ELT(gens, j, mkChar(dh_types[i]->name)); INTEGER(genid)[j++] = i; } for (i = 600; i < 600 + num_ui_rngs; i++) { SET_STRING_ELT(gens, j, mkChar(dh_types[i]->name)); INTEGER(genid)[j++] = i; } SET_VECTOR_ELT(result, 0, gens); SET_VECTOR_ELT(result, 1, genid); UNPROTECT(3); return result; } #endif /* RDIEHARDER */ ./dieharder/d_g207_m20_a.out0000664000175000017500000001743213707046103013717 0ustar eddedd#=============================================================================# # dieharder version 3.29.5beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| Seed | kiss| 1.51e+08 |3755503523| #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# diehard_birthdays| 0| 100| 2000|0.27369951| PASSED diehard_operm5| 5| 1000000| 2000|0.00000000| FAILED diehard_rank_32x32| 0| 40000| 2000|0.94645631| PASSED diehard_rank_6x8| 0| 100000| 2000|0.21664132| PASSED diehard_bitstream| 0| 2097152| 2000|0.30317124| PASSED diehard_opso| 0| 2097152| 2000|0.77054927| PASSED diehard_oqso| 0| 2097152| 2000|0.14920135| PASSED diehard_dna| 0| 2097152| 2000|0.00010696| WEAK diehard_count_1s_str| 0| 256000| 2000|0.18095962| PASSED diehard_count_1s_byt| 0| 256000| 2000|0.75998385| PASSED diehard_parking_lot| 0| 12000| 2000|0.09610425| PASSED diehard_2dsphere| 2| 8000| 2000|0.62467236| PASSED diehard_3dsphere| 3| 4000| 2000|0.00838263| PASSED diehard_squeeze| 0| 100000| 2000|0.27630062| PASSED diehard_sums| 0| 100| 2000|0.00000000| FAILED diehard_runs| 0| 100000| 2000|0.47205520| PASSED diehard_runs| 0| 100000| 2000|0.61836834| PASSED diehard_craps| 0| 200000| 2000|0.78926015| PASSED diehard_craps| 0| 200000| 2000|0.52035197| PASSED marsaglia_tsang_gcd| 0| 10000000| 2000|0.68967167| PASSED marsaglia_tsang_gcd| 0| 10000000| 2000|0.98968899| PASSED sts_monobit| 1| 100000| 2000|0.69015564| PASSED sts_runs| 2| 100000| 2000|0.70903360| PASSED sts_serial| 1| 100000| 2000|0.77651960| PASSED sts_serial| 2| 100000| 2000|0.80852048| PASSED sts_serial| 3| 100000| 2000|0.33957728| PASSED sts_serial| 3| 100000| 2000|0.38403539| PASSED sts_serial| 4| 100000| 2000|0.73981276| PASSED sts_serial| 4| 100000| 2000|0.70987235| PASSED sts_serial| 5| 100000| 2000|0.58858514| PASSED sts_serial| 5| 100000| 2000|0.97477897| PASSED sts_serial| 6| 100000| 2000|0.80554806| PASSED sts_serial| 6| 100000| 2000|0.68382921| PASSED sts_serial| 7| 100000| 2000|0.91743138| PASSED sts_serial| 7| 100000| 2000|0.59557813| PASSED sts_serial| 8| 100000| 2000|0.97799979| PASSED sts_serial| 8| 100000| 2000|0.41801002| PASSED sts_serial| 9| 100000| 2000|0.21467576| PASSED sts_serial| 9| 100000| 2000|0.14529355| PASSED sts_serial| 10| 100000| 2000|0.80776774| PASSED sts_serial| 10| 100000| 2000|0.44132799| PASSED sts_serial| 11| 100000| 2000|0.44964046| PASSED sts_serial| 11| 100000| 2000|0.42700247| PASSED sts_serial| 12| 100000| 2000|0.74666523| PASSED sts_serial| 12| 100000| 2000|0.85827922| PASSED sts_serial| 13| 100000| 2000|0.32153758| PASSED sts_serial| 13| 100000| 2000|0.26719035| PASSED sts_serial| 14| 100000| 2000|0.36497367| PASSED sts_serial| 14| 100000| 2000|0.87743856| PASSED sts_serial| 15| 100000| 2000|0.32295119| PASSED sts_serial| 15| 100000| 2000|0.86787552| PASSED sts_serial| 16| 100000| 2000|0.93592201| PASSED sts_serial| 16| 100000| 2000|0.46345012| PASSED rgb_bitdist| 1| 100000| 2000|0.67308253| PASSED rgb_bitdist| 2| 100000| 2000|0.46323368| PASSED rgb_bitdist| 3| 100000| 2000|0.19480415| PASSED rgb_bitdist| 4| 100000| 2000|0.08203054| PASSED rgb_bitdist| 5| 100000| 2000|0.11218837| PASSED rgb_bitdist| 6| 100000| 2000|0.24759864| PASSED rgb_bitdist| 7| 100000| 2000|0.53172953| PASSED rgb_bitdist| 8| 100000| 2000|0.00783149| PASSED rgb_bitdist| 9| 100000| 2000|0.22445386| PASSED rgb_bitdist| 10| 100000| 2000|0.84203170| PASSED rgb_bitdist| 11| 100000| 2000|0.11594948| PASSED rgb_bitdist| 12| 100000| 2000|0.84247869| PASSED rgb_minimum_distance| 2| 10000| 20000|0.36284280| PASSED rgb_minimum_distance| 3| 10000| 20000|0.81523012| PASSED rgb_minimum_distance| 4| 10000| 20000|0.16553454| PASSED rgb_minimum_distance| 5| 10000| 20000|0.00050417| WEAK rgb_permutations| 2| 100000| 2000|0.41481734| PASSED rgb_permutations| 3| 100000| 2000|0.38447402| PASSED rgb_permutations| 4| 100000| 2000|0.11539878| PASSED rgb_permutations| 5| 100000| 2000|0.32809426| PASSED rgb_lagged_sum| 0| 1000000| 2000|0.27178788| PASSED rgb_lagged_sum| 1| 1000000| 2000|0.96989521| PASSED rgb_lagged_sum| 2| 1000000| 2000|0.03083660| PASSED rgb_lagged_sum| 3| 1000000| 2000|0.18265741| PASSED rgb_lagged_sum| 4| 1000000| 2000|0.80487947| PASSED rgb_lagged_sum| 5| 1000000| 2000|0.35783736| PASSED rgb_lagged_sum| 6| 1000000| 2000|0.30230093| PASSED rgb_lagged_sum| 7| 1000000| 2000|0.70832662| PASSED rgb_lagged_sum| 8| 1000000| 2000|0.35531440| PASSED rgb_lagged_sum| 9| 1000000| 2000|0.59110407| PASSED rgb_lagged_sum| 10| 1000000| 2000|0.43623642| PASSED rgb_lagged_sum| 11| 1000000| 2000|0.84844329| PASSED rgb_lagged_sum| 12| 1000000| 2000|0.35274160| PASSED rgb_lagged_sum| 13| 1000000| 2000|0.74958697| PASSED rgb_lagged_sum| 14| 1000000| 2000|0.44403673| PASSED rgb_lagged_sum| 15| 1000000| 2000|0.12563492| PASSED rgb_lagged_sum| 16| 1000000| 2000|0.81754581| PASSED rgb_lagged_sum| 17| 1000000| 2000|0.68041876| PASSED rgb_lagged_sum| 18| 1000000| 2000|0.00935690| PASSED rgb_lagged_sum| 19| 1000000| 2000|0.41225389| PASSED rgb_lagged_sum| 20| 1000000| 2000|0.12955289| PASSED rgb_lagged_sum| 21| 1000000| 2000|0.31772612| PASSED rgb_lagged_sum| 22| 1000000| 2000|0.71630403| PASSED rgb_lagged_sum| 23| 1000000| 2000|0.50632070| PASSED rgb_lagged_sum| 24| 1000000| 2000|0.26578700| PASSED rgb_lagged_sum| 25| 1000000| 2000|0.00264134| WEAK rgb_lagged_sum| 26| 1000000| 2000|0.33845062| PASSED rgb_lagged_sum| 27| 1000000| 2000|0.39311722| PASSED rgb_lagged_sum| 28| 1000000| 2000|0.25305546| PASSED rgb_lagged_sum| 29| 1000000| 2000|0.22737201| PASSED rgb_lagged_sum| 30| 1000000| 2000|0.03077599| PASSED rgb_lagged_sum| 31| 1000000| 2000|0.69880762| PASSED rgb_lagged_sum| 32| 1000000| 2000|0.07659975| PASSED rgb_kstest_test| 0| 10000| 20000|0.56948575| PASSED dab_bytedistrib| 0| 51200000| 20|0.08012558| PASSED dab_dct| 256| 50000| 20|0.75978208| PASSED ./dieharder_version.h.in0000664000175000017500000000063013707046103013541 0ustar eddedd#ifndef __GSL_VERSION_H__ #define __GSL_VERSION_H__ #include #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS /* empty */ # define __END_DECLS /* empty */ #endif __BEGIN_DECLS #define GSL_VERSION "@VERSION@" GSL_VAR const char * gsl_version; __END_DECLS #endif /* __GSL_VERSION_H__ */ ./config.h.in0000664000175000017500000000543113707046265011327 0ustar eddedd/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `gsl' library (-lgsl). */ #undef HAVE_LIBGSL /* Define to 1 if you have the `gslcblas' library (-lgslcblas). */ #undef HAVE_LIBGSLCBLAS /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Description */ #undef RELEASED /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile ./manual/0000775000175000017500000000000013707057144010554 5ustar eddedd./manual/configure.ac0000664000175000017500000000102113707046103013025 0ustar eddedd# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) # Checks for programs. AC_PROG_MAKE_SET # Checks for libraries. # FIXME: Replace `main' with a function in `-local_icons': AC_CHECK_LIB([ocal_icons], [main]) # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_CONFIG_FILES([Makefile]) AC_OUTPUT ./manual/Makefile.in0000664000175000017500000004030113707046265012621 0ustar eddedd# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = manual ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = macros.tex CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/macros.tex.in \ $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ACTAR = @ACTAR@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIEHARDER_CFLAGS = @DIEHARDER_CFLAGS@ DIEHARDER_LIBS = @DIEHARDER_LIBS@ DIEHARDER_LIB_VERSION = @DIEHARDER_LIB_VERSION@ DIEHARDER_LT_VERSION = @DIEHARDER_LT_VERSION@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LITTLE_ENDIAN = @LITTLE_ENDIAN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RELEASE = 1 RELEASED = @RELEASED@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = 0.1 abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dieharder_CFLAGS = @dieharder_CFLAGS@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdieharder_lo_CFLAGS = @libdieharder_lo_CFLAGS@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SOURCE = dieharder.tex SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/dieharder SVNTIME = $(HOME/Src/Projects/dieharder/dieharder.svn.time) # The list of includes are things required for the build to work. Examples # might be included .tex or .sty files, embedded .eps files, and so forth. # Naturally, anything on this list should be in the SVN tree. # FIGS = $(shell ls *.fig 2>&1 | grep -v "No such file or directory" | sed -e "/\/bin\/ls:/d") # FEPS = $(FIGS:.fig=.eps) # INCLUDE = $(FIGS) # Source(s) and production objects. SOURCES = $(SOURCE) LOGS = $(SOURCE:.tex=.log) TOC = $(SOURCE:.tex=.toc) AUX = $(SOURCE:.tex=.aux) ERR = $(SOURCE:.tex=.err) DVI = $(SOURCE:.tex=.dvi) PS = $(SOURCE:.tex=.ps) PDF = $(SOURCE:.tex=.pdf) A4PS = $(SOURCE:.tex=.a4.ps) A4PDF = $(SOURCE:.tex=.a4.pdf) HTMLDIR = $(SOURCE:.tex=) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu manual/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu manual/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): macros.tex: $(top_builddir)/config.status $(srcdir)/macros.tex.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf-am: ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # Build targets (from rules) all: $(PDF) ps: $(DVI) $(PS) pdf: $(DVI) $(PS) $(PDF) a4ps: $(DVI) $(A4PS) a4pdf: $(DVI) $(A4PS) $(A4PDF) tar: $(TAR) tgz: $(TGZ) # # These should run in the doc directory, although a commit one level up # will work too... # svn: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) # Clean up all the junk build files and output formats to save space. clean: rm -f $(DVI) $(AUX) $(LOGS) $(TOC) $(ERR) $(PS) $(PDF) install: $(PDF) cp $(PDF) .. # # RULES FOR BUILDING STANDARD TARGETS # # Rule for making dvi out of tex. Do it twice to build table of contents # and resolve forward references. %.dvi:%.tex $(SOURCES) latex $< $@ latex $< $@ # Rule for making postscript image %.ps:%.dvi dvips -Pamz -Pcmz -o $@ $< # Rule for making pdf image %.pdf:%.ps ps2pdf $< # Rule for making postscript image %.a4.ps:%.dvi dvips -Pamz -Pcmz -t A4 -o $@ $< # Rule for making pdf image %.a4.pdf:%.a4.ps ps2pdf $< # Rule for making .fig->.eps %.eps:%.fig fig2dev -L eps $< > $@ # 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: ./manual/example_ascii.input0000664000175000017500000000047713707046103014441 0ustar eddedd#================================================================== # generator mt19937_1999 seed = 3022359314 #================================================================== type: d count: 10 numbit: 32 3918167916 1483868040 2886294571 1820144487 3098900874 3564305042 2601418103 1958443454 1831934296 1895780536 ./manual/rgbmacros.tex0000664000175000017500000001751713707046103013261 0ustar eddedd%======================================================================== % These are some macros I find useful doing e.g. physics textbooks. % Some just shorten typing -- it is much easier to % type \be than \begin{equation}. Others encapsulate complex commands, % such as commands that add dynamic links to wikipedia content (which is % VERY USEFUL for online content! I'm quite proud of my "\wikinote{}" % below, as it is nearly a one-stop-shop for references these days. %======================================================================== \newcommand{\mb}[1]{\mbox{\boldmath $#1$}} \ifx \Vec \undefined \newcommand{\Vec}[1]{\mbox{\boldmath $\vec{#1}$}} \else \renewcommand{\Vec}[1]{\mbox{\boldmath $\vec{#1}$}} \fi \newcommand{\sVec}[1]{\mbox{\scriptsize \boldmath $#1$}} \newcommand{\Mat}[1]{\stackrel{\Leftrightarrow}{\mbox{\boldmath $#1$}}} \ifx \Hat \undefined \newcommand{\Hat}[1]{\mbox{\boldmath $\hat{#1}$}} \else \renewcommand{\Hat}[1]{\mbox{\boldmath $\hat{#1}$}} \fi \newcommand{\sHat}[1]{\hat{\mbox{\scriptsize \boldmath $#1$}}} \newcommand{\deriv}[2]{\frac{d #1}{d #2}} \newcommand{\ddt}[1]{\frac{d #1}{dt}} \newcommand{\dderiv}[2]{\frac{d^2 #1}{d #2^2}} \newcommand{\ddtsq}[1]{\frac{d^2 #1}{d t^2}} \newcommand{\partialdiv}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\ppartialdiv}[2]{\frac{\partial^2 #1}{\partial #2^2}} \newcommand{\del}{\Vec{\nabla}} \newcommand{\grad}{\Vec{\nabla}} \newcommand{\deldot}{\del \cdot} \newcommand{\curl}{\del \times} \newcommand{\lapl}{\nabla^2} \newcommand{\vsh}[2]{\Vec{Y}_{#1}^{#2}} \newcommand{\abs}[1]{\left| #1 \right|} \newcommand{\RE}{\rm I \hspace{-.180em} R} \newcommand{\be}{ \begin{equation} } \newcommand{\ee}{ \end{equation} } \newcommand{\bea}{ \begin{eqnarray} } \newcommand{\eea}{ \end{eqnarray} } \newcommand{\ba}{\begin{array}} \newcommand{\ea}{\end{array}} \newcommand{\ben}{ \begin{enumerate} } \newcommand{\een}{ \end{enumerate} } \newcommand{\bit}{ \begin{itemize} } \newcommand{\eit}{ \end{itemize} } \newcommand{\bv}{ \begin{verbatim} } % one cannot end verbatim with a macro, as the macro % is interpreted as verbatim text, duh... % Here's a useful one for the Dieharder book: \newcommand{\die}{\emph{Dieharder}\ } \newcommand{\spade}{\framebox{$\spadesuit$}} \newcommand{\heart}{\framebox{$\heartsuit$}} \renewcommand{\diamond}{\framebox{$\diamondsuit$}} \newcommand{\club}{\framebox{$\clubsuit$}} \newcommand{\notrump}{\framebox{\rule[2.75mm]{0cm}{0cm}\rule[-0.5mm]{0cm}{0cm}\ \ }} \newcommand{\half}{\frac{1}{2}} \newcommand{\tot}{ {\rm tot} } \newcommand{\link}[2]{\htmladdnormallink{#1}{#2}} \newcommand{\wikilink}[1]{Wikipedia: \htmladdnormallink{http://www.wikipedia.org/wiki/#1}{http://www.wikipedia.org/wiki/#1}} \newcommand{\GIYF}{ \htmladdnormallink{GIYF}{http://www.google.com} } \newcommand{\WIYF}{\htmladdnormallink{WIYF}{http://www.wikipedia.org} } \newcommand{\MWIYF}{\htmladdnormallink{MWIYF}{http://mathworld.wolfram.com}} \newcommand{\webnote}[2]{\footnote{Internet: \htmladdnormallink{#1 }{#1 } #2}} \newcommand{\wikinote}[2]{\footnote{Wikipedia: \htmladdnormallink{http://www.wikipedia.org/wiki/#1.}{http://www.wikipedia.org/wiki/#1} #2} } \newcommand{\googlenote}[2]{\footnote{GIYF: \htmladdnormallink{#1 }{http://www.google.com/search?hl=en&lr=&q=#1&btnG=Search} #2} } % Really I should just go ahead and define a bloody alphabet of the % defs below... \newcommand{\vbeta}{\Vec{\beta}} \newcommand{\vA}{\Vec{A}} \newcommand{\vB}{\Vec{B}} \newcommand{\vC}{\Vec{C}} \newcommand{\vD}{\Vec{D}} \newcommand{\vE}{\Vec{E}} \newcommand{\vF}{\Vec{F}} \newcommand{\vG}{\Vec{G}} \newcommand{\vH}{\Vec{H}} \newcommand{\vI}{\Vec{I}} \newcommand{\vJ}{\Vec{J}} \newcommand{\vL}{\Vec{L}} \newcommand{\vM}{\Vec{M}} \newcommand{\vN}{\Vec{N}} \newcommand{\vO}{\Vec{O}} \newcommand{\vP}{\Vec{P}} \newcommand{\vQ}{\Vec{Q}} \newcommand{\vR}{\Vec{R}} \newcommand{\vS}{\Vec{S}} \newcommand{\vT}{\Vec{T}} \newcommand{\vU}{\Vec{U}} \newcommand{\vV}{\Vec{V}} \newcommand{\vW}{\Vec{W}} \newcommand{\vX}{\Vec{X}} \newcommand{\vY}{\Vec{Y}} \newcommand{\vZ}{\Vec{Y}} \newcommand{\va}{\Vec{a}} \newcommand{\vb}{\Vec{b}} \newcommand{\vc}{\Vec{c}} \newcommand{\vd}{\Vec{d}} \newcommand{\ve}{\Vec{e}} \newcommand{\vf}{\Vec{f}} \newcommand{\vg}{\Vec{g}} \newcommand{\vh}{\Vec{h}} \newcommand{\vi}{\Vec{i}} \newcommand{\vj}{\Vec{j}} \newcommand{\vk}{\Vec{k}} \newcommand{\vl}{\Vec{l}} \newcommand{\vm}{\Vec{m}} \newcommand{\vn}{\Vec{n}} \newcommand{\vo}{\Vec{o}} \newcommand{\vp}{\Vec{p}} \newcommand{\vq}{\Vec{q}} \newcommand{\vr}{\Vec{r}} \newcommand{\vs}{\Vec{s}} \newcommand{\vt}{\Vec{t}} \newcommand{\vu}{\Vec{u}} \newcommand{\vv}{\Vec{v}} \newcommand{\vx}{\Vec{x}} \newcommand{\vy}{\Vec{y}} \newcommand{\vz}{\Vec{z}} \newcommand{\vell}{\Vec{\ell}} \newcommand{\valpha}{\Vec{\alpha}} \newcommand{\vtau}{\Vec{\tau}} \newcommand{\vomega}{\Vec{\omega}} \newcommand{\vOmega}{\Vec{\Omega}} \newcommand{\ha}{\Hat{a}} \newcommand{\hb}{\Hat{b}} \newcommand{\hc}{\Hat{c}} \newcommand{\hd}{\Hat{d}} % \newcommand{\he}{\Hat{e}} \newcommand{\hf}{\Hat{f}} \newcommand{\hg}{\Hat{g}} \newcommand{\hh}{\Hat{h}} \newcommand{\hi}{\Hat{i}} \newcommand{\hj}{\Hat{j}} \newcommand{\hk}{\Hat{k}} \newcommand{\hl}{\Hat{l}} \newcommand{\hm}{\Hat{m}} \newcommand{\hn}{\Hat{n}} \newcommand{\ho}{\Hat{o}} \newcommand{\hp}{\Hat{p}} \newcommand{\hq}{\Hat{q}} \newcommand{\hr}{\Hat{r}} \newcommand{\hs}{\Hat{s}} \newcommand{\hT}{\Hat{t}} \newcommand{\hu}{\Hat{u}} \newcommand{\hv}{\Hat{v}} \newcommand{\hw}{\Hat{w}} \newcommand{\hx}{\Hat{x}} \newcommand{\hy}{\Hat{y}} \newcommand{\hz}{\Hat{z}} \newcommand{\he}{\Hat{\epsilon}} \newcommand{\htheta}{\Hat{\Theta}} \newcommand{\hphi}{\Hat{\phi}} \newcommand{\bx}{\bar{x}} \newcommand{\Z}{\sqrt{ \frac{\mu_0}{\epsilon_0} }} \newcommand{\Ylm}{Y_{\ell m}} \newcommand{\YL}{Y_L} \newcounter{short} \newcommand{\shortproblem}[1]{ \stepcounter{short} % \addcontentsline{toc}{subsection}{Short Problem \arabic{short}} \vspace{1cm} {\noindent \bf Short Problem \arabic{short}.} \vspace{0.2cm} \\ {\noindent #1} } \newcounter{true} \newcommand{\truefact}[1]{ \stepcounter{true} % \addcontentsline{toc}{subsection}{True Fact \arabic{true}} \vspace{1cm} {\noindent \bf True Fact \arabic{true}.} \vspace{0.2cm} \\ {\noindent #1} } % OLD shortproblem with minipage, which seems to block putting % figures inside... % \newcommand{\shortproblem}[1]{ % % \stepcounter{short} % \addcontentsline{toc}{subsection}{Short Problem \arabic{short}} % \vfill % \noindent % \begin{minipage}[c]{6in} % \vspace{0.2cm} % {\noindent \bf Short Problem \arabic{short}.} % \vspace{0.2cm} % % \noindent {#1} % \end{minipage} % \vfill % % } \newcounter{hwcnt} \newcommand{\homework}[1]{ \stepcounter{hwcnt} \vspace{1.0cm} {\noindent \bf Problem \arabic{hwcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{probcnt} \newcommand{\problem}[1]{ \stepcounter{probcnt} \vspace{1.0cm} {\noindent \bf Problem \arabic{probcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{quescnt} \newcommand{\question}[1]{ \stepcounter{quescnt} \vspace{1.0cm} {\noindent \bf Question \arabic{quescnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{testprobcnt} \newcommand{\testproblem}[2]{ \stepcounter{testprobcnt} \vspace{1.0cm} \noindent \textbf{Problem \arabic{testprobcnt}.}\quad({#1} points) \vspace{0.2cm} \noindent {#2} } \newcommand{\ahomework}[1]{ \stepcounter{hwcnt} \vspace{1.0cm} {\noindent \bf * Problem \arabic{hwcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{hardcnt} \newcommand{\hardproblem}[1]{ \stepcounter{hardcnt} \addcontentsline{toc}{subsection}{Essential Problem \arabic{week}.\arabic{hardcnt}} \vspace{1.0cm} {\noindent \bf Essential Problem \arabic{week}.\arabic{hardcnt}.} \vspace{0.2cm} \noindent {#1} \newpage } \newcommand{\week}[1]{ \stepcounter{chapter} \addcontentsline{toc}{chapter}{Week \arabic{chapter}: #1} \markboth{Week \arabic{chapter}: #1}{Week \arabic{chapter}: #1} \chapter*{Week \arabic{chapter}: #1} } ./manual/Makefile.am0000664000175000017500000000374513707046103012612 0ustar eddeddSOURCE = dieharder.tex VERSION = 0.1 RELEASE = 1 SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/dieharder SVNTIME = $(HOME/Src/Projects/dieharder/dieharder.svn.time) # The list of includes are things required for the build to work. Examples # might be included .tex or .sty files, embedded .eps files, and so forth. # Naturally, anything on this list should be in the SVN tree. # FIGS = $(shell ls *.fig 2>&1 | grep -v "No such file or directory" | sed -e "/\/bin\/ls:/d") # FEPS = $(FIGS:.fig=.eps) # INCLUDE = $(FIGS) # Source(s) and production objects. SOURCES = $(SOURCE) LOGS = $(SOURCE:.tex=.log) TOC = $(SOURCE:.tex=.toc) AUX = $(SOURCE:.tex=.aux) ERR = $(SOURCE:.tex=.err) DVI = $(SOURCE:.tex=.dvi) PS = $(SOURCE:.tex=.ps) PDF = $(SOURCE:.tex=.pdf) A4PS = $(SOURCE:.tex=.a4.ps) A4PDF = $(SOURCE:.tex=.a4.pdf) HTMLDIR = $(SOURCE:.tex=) # Build targets (from rules) all: $(PDF) ps: $(DVI) $(PS) pdf: $(DVI) $(PS) $(PDF) a4ps: $(DVI) $(A4PS) a4pdf: $(DVI) $(A4PS) $(A4PDF) tar: $(TAR) tgz: $(TGZ) # # These should run in the doc directory, although a commit one level up # will work too... # svn: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) # Clean up all the junk build files and output formats to save space. clean: rm -f $(DVI) $(AUX) $(LOGS) $(TOC) $(ERR) $(PS) $(PDF) install: $(PDF) cp $(PDF) .. # # RULES FOR BUILDING STANDARD TARGETS # # Rule for making dvi out of tex. Do it twice to build table of contents # and resolve forward references. %.dvi:%.tex $(SOURCES) latex $< $@ latex $< $@ # Rule for making postscript image %.ps:%.dvi dvips -Pamz -Pcmz -o $@ $< # Rule for making pdf image %.pdf:%.ps ps2pdf $< # Rule for making postscript image %.a4.ps:%.dvi dvips -Pamz -Pcmz -t A4 -o $@ $< # Rule for making pdf image %.a4.pdf:%.a4.ps ps2pdf $< # Rule for making .fig->.eps %.eps:%.fig fig2dev -L eps $< > $@ ./manual/crown_quarto.tex0000664000175000017500000000514113707046103014013 0ustar eddedd\usepackage{epsfig} \usepackage{html} \usepackage{geometry} \usepackage{hyperref} % Standard 6x9 trade paperback % This layout works "perfectly" for lulu. % Set paper size \geometry{paperwidth=7.444in,paperheight=9.681in} % set left/right margins for binding \geometry{twoside} % Specify the four OUTER margins, only -- let header, footer, etc live % within this space and do not otherwise specify them. \geometry{left=1.60in,right=0.5in,top=0.75in,bottom=0.75in} % I'm not certain, but I think that this helps with fonts and passing % the pagesize through to ps2pdf. \geometry{dvips} % The following are individual preferences, adjust to taste. % I like a small gap between paragraphs to improve readability. \parskip = 0.075in % This penalizes breaking things at the end of pages. \widowpenalty=300 \clubpenalty=300 % Similarly, I like having a bit more than single spacing to improve % readability. \renewcommand{\baselinestretch}{1.1} % I find the following to be useful in text layout. \newcommand{\ind}{\hspace{5 em}} \newcommand{\vsfill}{\vspace*{\fill}} \newcommand{\pagefill}{\vsfill \newpage \vsfill} % \blankpage is more than useful, it is essential. A lulu book needs % the FIRST page to be a TITLE page, probably laid out by hand % (\maketitle just doesn't do very well with it). \pagestyle should be % empty. Page TWO should be BLANK. Page THREE should be a COPYRIGHT % page, plus any acknowledgements or license restrictions desired. Page % FOUR should be BLANK. Alternate odd (content) even (blank) pages up % to the table of contents. Turn on \pagestyle headings, and % choose \pagenumbering{roman} for the TOC and possibly the preface, if % any. Make sure that TOC starts on an odd page (facing the reader on % the right hand page) -- add blank page(s) as needed to pad things out % so that this works out. ONCE YOU ARE IN THE MAIN TEXT, the \chapter % macro will arrange this for you and you can stop. Finally, when you % start the main text, reset the page counter to 1, set page numbering % to arabic, and deal with page headers however you like. The default % is often ok, but there are nice styles you can include to give you % better (even complete) control of the headers. I personally favor % having a "free" web version of the book available clearly marked "for % on-screen viewing only" that directs a user to the lulu site for % possible book purchase in the header or footer, for example... but % only in the online PDF. This may require the use of autoconf or % make/sed to hack a line or two in this very style file to accomplish % automagically. \newcommand{\blankpage}{\newpage \vsfill \newpage} ./manual/OPL.tex0000664000175000017500000001625213707046103011727 0ustar eddedd\newpage \appendix \chapter{License Terms} \section{General Terms} License is granted to copy or use `` for ``Dieharder, a Gnu Public License Random Number Generator Tester'' according to the Open Public License (OPL, enclosed below), which is a Public License, developed by the GNU Foundation, which applies to ``open source'' generic documents. There are two modifications to the general OPL given below: \begin{enumerate} \item Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. (This is to prevent errors from being introduced which would reflect badly on the author's professional abilities.) \item Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder. (This is so that the author can make at least some money if this work is republished as a book and sold commercially for -- somebody's -- profit.) \end{enumerate} Electronic versions of the \die manual can be freely redistributed, and of course any user of \die is welcome to print out such a version for their own use if they so desire. However, if such a user wishes to contribute in a small way to the development of the tool, they should consider buying a paper or electronic copy of the book if and when they are distributed by the author in forms that can be sold. \section{OPEN PUBLICATION LICENSE Draft v0.4, 8 June 1999} {\bf I. REQUIREMENTS ON BOTH UNMODIFIED AND MODIFIED VERSIONS} The Open Publication works may be reproduced and distributed in whole or in part, in any medium physical or electronic, provided that the terms of this license are adhered to, and that this license or an incorporation of it by reference (with any options elected by the author(s) and/or publisher) is displayed in the reproduction. Proper form for an incorporation by reference is as follows: Copyright (c) $<$year$>$ by $<$author's name or designee$>$. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, vX.Y or later (the latest version is presently available at http://www.opencontent.org/openpub/). The reference must be immediately followed with any options elected by the author(s) and/or publisher of the document (see section VI). Commercial redistribution of Open Publication-licensed material is permitted. Any publication in standard (paper) book form shall require the citation of the original publisher and author. The publisher and author's names shall appear on all outer surfaces of the book. On all outer surfaces of the book the original publisher's name shall be as large as the title of the work and cited as possessive with respect to the title. {\bf II. COPYRIGHT} The copyright to each Open Publication is owned by its author(s) or designee. {\bf III. SCOPE OF LICENSE} The following license terms apply to all Open Publication works, unless otherwise explicitly stated in the document. Mere aggregation of Open Publication works or a portion of an Open Publication work with other works or programs on the same media shall not cause this license to apply to those other works. The aggregate work shall contain a notice specifying the inclusion of the Open Publication material and appropriate copyright notice. SEVERABILITY. If any part of this license is found to be unenforceable in any jurisdiction, the remaining portions of the license remain in force. NO WARRANTY. Open Publication works are licensed and provided "as is" without warranty of any kind, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose or a warranty of non-infringement. {\bf IV. REQUIREMENTS ON MODIFIED WORKS} All modified versions of documents covered by this license, including translations, anthologies, compilations and partial documents, must meet the following requirements: \begin{enumerate} \item The modified version must be labeled as such. \item The person making the modifications must be identified and the modifications dated. \item Acknowledgement of the original author and publisher if applicable must be retained according to normal academic citation practices. \item The location of the original unmodified document must be identified. \item The original author's (or authors') name(s) may not be used to assert or imply endorsement of the resulting document without the original author's (or authors') permission. \end{enumerate} {\bf V. GOOD-PRACTICE RECOMMENDATIONS} In addition to the requirements of this license, it is requested from and strongly recommended of redistributors that: \begin{enumerate} \item If you are distributing Open Publication works on hardcopy or CD-ROM, you provide email notification to the authors of your intent to redistribute at least thirty days before your manuscript or media freeze, to give the authors time to provide updated documents. This notification should describe modifications, if any, made to the document. \item All substantive modifications (including deletions) be either clearly marked up in the document or else described in an attachment to the document. \end{enumerate} Finally, while it is not mandatory under this license, it is considered good form to offer a free copy of any hardcopy and CD-ROM expression of an Open Publication-licensed work to its author(s). {\bf VI. LICENSE OPTIONS} The author(s) and/or publisher of an Open Publication-licensed document may elect certain options by appending language to the reference to or copy of the license. These options are considered part of the license instance and must be included with the license (or its incorporation by reference) in derived works. A. To prohibit distribution of substantively modified versions without the explicit permission of the author(s). "Substantive modification" is defined as a change to the semantic content of the document, and excludes mere changes in format or typographical corrections. To accomplish this, add the phrase `Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder.' to the license reference or copy. B. To prohibit any publication of this work or derivative works in whole or in part in standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. To accomplish this, add the phrase 'Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder.' to the license reference or copy. {\bf OPEN PUBLICATION POLICY APPENDIX:} (This is not considered part of the license.) Open Publication works are available in source format via the Open Publication home page at http://works.opencontent.org/. Open Publication authors who want to include their own license on Open Publication works may do so, as long as their terms are not more restrictive than the Open Publication license. If you have questions about the Open Publication License, please contact TBD, and/or the Open Publication Authors' List at opal@opencontent.org, via email. \vspace*{\fill} \newpage ./manual/dieharder.tex0000664000175000017500000111340513707046103013223 0ustar eddedd\documentclass{book} \usepackage{graphicx} \usepackage{epsfig} \usepackage{html} \usepackage{latexsym} \input crown_quarto.tex \input macros.tex \begin{document} % Uncomment this for web-publication where appropriate. % \title{Equations du Jour: Introductory Physics II} % \author{Robert G. Brown} % \maketitle % % To publish on lulu we pretty much have to roll our own title page. % \pagestyle{empty} \vsfill \centerline{\huge \bf Die{\em Harder:}} \bigskip \bigskip \centerline{\Large \bf A Gnu Public License Random Number Tester} \vsfill \centerline{\large by} \bigskip \centerline{\Large Robert G. Brown} \bigskip \centerline{Duke University Physics Department} \centerline{Durham, NC 27708-0305} \centerline{rgb@phy.duke.edu} \vsfill \blankpage \vsfill \centerline{\large \bf Copyright Notice} \centerline{Copyright Robert G. Brown 2006} \centerline{Current version: \version} % \centerline{ISBN: } \blankpage \centerline{\Large \bf Notice} This is documentation for the \die random number generator test suite. As the project itself is uses a Gnu Public License (GPL), the documentation uses an Open Publication License (OPL). The precise terms of the OPL can be read in an appendix at the end of the manual, and should be adhered to if you wish to make changes to this work. The current snapshot of this documentation is available for free online at: \medskip \centerline{\link{http://www.phy.duke.edu/$\sim$rgb/General/dieharder.php}{http://www.phy.duke.edu/~rgb/General/dieharder.php}} \medskip \noindent It will be made available in an inexpensive print version (probably via Lulu press) as soon as it is in a sufficiently polished and complete state. As a ``live'' document describing a dynamic and sophisticated tool, this book no doubt has errors great and small and may or may not be up to date (and hence correctly describe the latest release of \die) at any given time. I apologize for this -- my only excuse is that I'm very busy and it's all I can do to keep up with the bug reports, suggestions for extensions, and my own plans for it, and sometimes documentation takes a back seat to progress. It is, of course, an open source project and any reader who is so motivated is welcome to join in. I cherish good-hearted communication from \die users pointing out errors or suggesting new content (and have in the past done my best to implement many such corrections or suggestions). Open source projects of this sort generate useful collaborations. Although many people have contributed to \die at this point with corrections, new tests, new generators to test, and permission to use their code, my greatest debt is to my co-developers and partners, Dirk Eddelbeuttel (who maintains the ready-to-install Debian version of \die as well as the R interface) and David Bauer, who has contributed numerous fixes to critical components (such as the ks-test program that is at the heart of the way \die works with many of the tests incorporated from their descriptions in diehard and other sources), the ``gold standard'' AES and Threefish RNGs that are of great use in testing \die, and many new tests. \newpage \tableofcontents \newpage \chapter{Introduction} Random numbers are of tremendous value in many computational contexts. In importance sampling Monte Carlo, random numbers permit the sampling of the relevant part of an extremely large (high-dimensional) phase space in order to determine (for example) the thermal equilibrium properties of a physical system near a critical point. In games, random numbers ensure a unique and fair (in the sense of being unbiased) playing experience. Random numbers play a critical role in cryptography, which is more or less the fundamental basis or {\em sine qua non} of Internet commerce. Random numbers are of considerable interest to mathematicians and statisticians in contexts that range from the purely theoretical to the very much applied. There is, alas, a {\em fundamental problem} with this, and several related sub-problems. The fundamental problem is that it is not possible to {\em generate} truly random numbers by means of any mathematical algorithm. The very term ``random number generator'' (RNG) is a mathematical or computational oxymoron. Even in physics, sources of true randomness are rare. There is a very, very old argument about whether even quantum experiments produce results that are truly {\em random} at a fundamental level or whether experimental results in quantum theory that produce seemingly random outcomes reflect the {\em entropy} inherent in the measuring apparatus. This is a non-trivial problem with no simple or obviously true answer even today, since it is fundamentally connected to whether the Universe is open or closed. Both relativity theory and the Generalized Master Equation that is perhaps the most general way of describing the quantum measurement process of an open system embedded in a closed quantum universe suggest that what appears to be irreversibility and randomness in laboratory experiments is due to a projection of the {\em stationary} quantum description of the universe onto the much smaller quantum description of the ``system'' that is supposed to produce the random result (such as photon emission due to spontaneous decay of an excited atom into the ground state). The ``randomness'' of the apparent result follows from taking a statistical trace over the excluded degrees of freedom, which introduces what amounts to a random phase approximation that washes out the actual correlations inherent in the extended fully correlated state. Focussing on issues of ``hidden variables'' within any give quantum subsystem obscures the actual problem, which is {\em strictly} the impossibility of treating {\em both} the quantum subsystem being studied {\em and} the (necessarily classical) measuring apparatus (which is really the rest of the quantum mechanical universe) on an equal quantum mechanical footing. If one does, all trace of randomness disappears as the quantum time evolution operator for the complete system is fully deterministic. Ultimately, it seems to be difficult to differentiate true randomness in physical processes from mere entropy, a lack of knowledge of some aspect or another of the system. Only by systematically analyzing a series of experimental results for ``randomness'' can one make a judgement on whether or not the underlying process is truly random, or merely {\em unpredictable}. Note well that unpredictable and random are often used as synonyms, but they are not really the same thing. A thing may be unpredictable due to entropy -- our lack of the data required to make it predictable. Examples of this sort of randomness abound in {\em classical} statistical mechanics or the theory of deterministic chaos. We will therefore leave the question about whether any given physical process is in fact random open, a thing to be {\em experimentally addressed} by applying tests for randomness, and not a fundamental given. For this reason, purists often refer to software-based RNGs as {\em pseudo-}random number generators to emphasize the fact that the numbers they produce are not, in fact, ``random''. As one can see from the discussion above, hardware-based RNGs are equally susceptible to being ``pseudo'' in their randomness or (however unpredictable they might be) they may well have a distribution that is not perfectly flat and hence does not conform to the requirements of an ideal RNG. At the very least they are as likely to need to be subjected to randomness tests as software generators and should not be assumed to be ``truly random''. The purpose of {\em Dieharder} is to provide a suite of tests, as systematic as possible, to which ``random number generators'' of all sorts can be subjected. For this reason we will, for brevity's sake, omit the word ``pseudo'' when discussing RNGs but it should nevertheless be understood. Another problem associated with random numbers in the context of modern computing is that numerical simulations can consume a {\em lot} of e.g. random uniform deviates, random unsigned integers, random bits, random numbers of all sorts. Simulations on a large compute cluster can consume close to Avogadro's number of uniform deviates in a single extended computation over the course of months to years. Over such a long sequence, problems can emerge even with generators that appear to pass many tests that sample only a few millions of random numbers (less than a billion bits, say). Many random number generators are in fact state-periodic and repeat a single sequence after a certain number of returns. Older generators often had a very short period. This meant that simulations that consumed more random numbers than this period in fact reproduced the same sample sequence over and over again instead of generating the independent, identically distributed ({\em iid}) samples that the author of the simulation probably intended. A related issue is associated with the dimensionality of the correlation. Many generators produce numbers that are subtly patterned (e.g. distributed on hyperplanes) but only in a space of high dimensionality. A number of tests only reveal a lack of randomness by constructing a statistic that measures the non-uniformity of the distribution of random coordinate $N$-tuplets in an $N$ dimensional space. This non-uniformity can only be resolved when the space begins to be filled with points at some density. Unfortunately, the number of points required to {\em fill} such a space scales like the power of the dimension, meaning that it is very difficult to resolve this particular kind of correlation by filling a space of more than a very few dimensions. For all of these reasons, the development and implementation of tests for the randomness of number sequences produced by various RNGs with real or imagined virtues is an important job in statistical computation and simulation theory. For roughly a decade, the most often cited test suite of this sort is one developed by George Marsaglia known as the ``Diehard Battery of Tests of Randomness''\cite{Marsaglia}. Indeed, a random number generator has not been thought to be strong unless it ``passes Diehard'' -- it has become the defining test of randomness, as it were. This reputation is not undeserved. Diehard contains a number of tests which test for very subtle non-randomness -- correlations or patterns in the numbers produced -- from the bit-sequence level to the level of distributions of uniform deviates. It has not proven {\em easy} for RNGs to pass Diehard, which has made it a relatively strong and lasting suite of tests. Even so-called ``truly random'' sources such as hardware RNGs based on e.g. thermal noise, entropy, and other supposedly ``random'' electromechanical or even quantum mechanical processes have been demonstrated to contain subtle non-random patterning by virtue of failing Diehard. One {\em weakness} of Diehard has been its relative lack of good tests for bitlevel randomness and cryptographic strength. This motivated the development, by the National Institute of Standards and Technology (NIST) of the {\em Statistical Test Suite} (STS): a Diehard-like collection of tests of the bitlevel randomness of bit sequences produced by RNGs\cite{STS}. There is small bit of redundancy with Diehard -- both include binary rank tests, for example -- but by in large the tests represent an extension of the methodology utilized extensively in Diehard to look for specific kinds of bitlevel correlations. In addition to these two well-known suites of tests, there are a number of other tests that have been described in the literature or implemented in code in various contexts. Perhaps the best-known remaining source of such tests is in Knuth's {\em The Art of Programming}\cite{Knuth}, where he devotes an entire section to both the generation and testing of random numbers. Some of the Diehard and STS tests are described here, for example. A second weakness in Diehard has been its lack of parametric variability. It has been used as a {\em standard} for RNGs to a {\em fault}, rather than being viewed as a tool for exploring the properties of RNGs in a systematic way. Anyone who actually works with any of the RNG testers to any significant extent, however, knows that the quality of a RNG is not such a cut and dried issue. A generator that is, in fact, weak can easily ``pass Diehard'' (or at least, pass any given test in Diehard) by virtue of producing $p$-values that are not less than 0.01 (or whatever else one determines the cut-off for failure to be). Of course a {\em good} RNG produces such a value one in a hundred trials, just as a {\em bad} RNG might well produce $p$-values greater than 0.01 98 out of 100 times for any given test size and still, ultimately be bad. To put it another way, although many tests in the Diehard suite are quite {\em sensitive} and are capable of demonstrating a lack of randomness in generators with particular kinds of internal correlations, it lacks the power of {\em clearly discriminating} the failures because in order to increase the discrimination of a test one usually has to increase sample sizes for the individual tests themselves and impose a Kolmogorov-Smirnov test on the distribution of $p$-values that results from many {\em independent} runs of the test to determine whether or not it is uniform. This is clearly demonstrated below -- parameterizing Diehard (where possible) and increasing its power of discrimination is a primary motivation of this work. The STS suite publication describes this quite elegantly, although it still falls short when it comes to implementing its tests with a clear mechanism for systematically improving the resolution (ability to detect a given kind of correlation as a RNG failure) and discrimination (ability to clearly and unambiguously and reproducibly demonstrate that failure for any given input RNG that does, in fact, possess one of the kinds of correlation that leads to failure). A strong requirement for this sort of parametric variation to achieve discrimination is that the test suite {\em integrate} any software RNG being tested so that it can be freely reseeded and so that sequences of random numbers of arbitrary length can be generated. Otherwise a test may by chance miss a failure that occurs only for certain seed moduli, or may not be able to generate enough samples within a test or repeat a test enough times to be able to clearly resolve a marginal failure. The remaining purpose of this work is to provide a readily available source code distribution of a {\em universal}, {\em modifiable} and {\em extensible} RNG test suite. Diehard was clearly copyrighted work of George Marsaglia, but the {\em licensing} of the actual program that implemented the suite (although it was openly distributed from the FSU website for close to a decade) was far from clear. STS is a government-sponsored NIST publication and is therefore explicitly in the public domain. Knuth's various tests are described in prose text but not implemented in any particular piece of code at all. In order to achieve the goals of universality, extensibility, and modifiability, it is essential that a software implementation of a RNG test suite have a very clear {\em public license} that explicitly protects the right of the user to access and modify the source, and that further guarantees that modifications to the source in turn become part of the open source project from which they are derived and cannot be ``co-opted'' into a commercial product. These, then, are the motivations for the creation of the {\em Dieharder} suite of random number tests -- intended to be the Swiss Army Knife of RNG tests or (if you prefer) the ``last suite you'll ever wear'' as far as RNG testing is concerned. Dieharder is from the beginning a {\em Gnu Public Licensed} (GPL)\cite{GPL} project and is hence guaranteed to be and remain an open source toolset. There can be no surprises in Dieharder, and for better or for worse the code is readily available for all to inspect or {\em modify} as problems are discovered or as individuals wish to experiment with new things. Dieharder contains all of the diehard tests, implemented wherever possible with variables that control the size of the sample space per test that contribute to the test's $p$-value, or the number of $p$-values that contribute to the final test on the {\em distribution} of $p$-values returned by many {\em independent} runs. Dieharder has as a design goal the encapsulation of all of the STS tests {\em as well} in the single consistent test framework. Dieharder will also implement selected tests from Knuth that thus far have failed to be implemented in either Diehard or the STS. Finally, Dieharder implements a {\em timing} test (as the cost in CPU time required to generate a uniform deviate is certainly highly relevant to the process of deciding which RNG to implement in any given piece of code), various tests invented by the author to investigate specific ways a generator might fail (documented below) and has a templated interface for "user contributed" tests where, basically, anybody can add tests of their own invention in a consistent way to the suite. These latter tests clearly demonstrate the {\em extensibility} of the suite -- it took only a few hours of programming and testing to add a simple test to the suite to serve as a template for future developers. Dieharder is tightly integrated with the {\em Gnu Scientific Library} (GSL), another GPL project that provides a universal, modifiable, and extensible numerical library in open source form. In particular, the GSL contains over 60 RNGs pre-encapsulated in a single common call environment, so that code can be written that permits any of these RNGs to be used to generate random numbers in any given block of code at run time by altering the value of a single variable in the program. Routines already encapsulated include many well-known generators that fail one or more Diehard tests, as well as several that are touted as having {\em passed} Diehard. As we shall see, that is a somewhat optimistic assertion -- it is rather fairer to say that Diehard could only rather weakly resolve their {\em failure} of certain tests. The GSL also provides access to various distributions and to other functions that are essential to any random number generator -- the error function or incomplete gamma function, for example -- and that are often poorly implemented in code when programmed by a non-expert. A final advantage of this integration with the GSL is that the GSL random number interface is easily {\em extensible} -- it is fairly straightforward to implement any proposed RNG algorithm inside the GSL RNG function prototypes and add new generators to the list of generators that can be selected within the common call framework by means of the runtime RNG index. The rest of the paper is organized as follows. In the next section the general methodology for testing a RNG is briefly described, both in general and specifically as it is implemented in Dieharder to achieve its design goals. This section is deliberately written to be easy to understand by a non-expert in statistics as conceptually testing is very simple. Diehard is then reviewed in some detail, and the ways the Diehard tests are extended in Dieharder are documented. Dieharder's general program design is then described, with the goal of informing individuals who might wish either to use Dieharder as is to test the generators already implemented in the GSL for their suitability for some purpose or to help guide individuals who wish to write their own tests or implement their own generators within its framework. A section then describes the {\em non}-Diehard tests thus far implemented (a selection subject to change as new tests are ported from e.g. the STS or the literature or invented and added). Finally the results of applying the test suite to a few selected RNGs are presented, demonstrating its improved power of discrimination. \chapter{Testing Random Number Generators} The basic idea of testing a RNG is very simple. Choose a process that uses as input a sequence of random numbers (in the form of a stream of bits e.g. 10100101..., a stream of integers in some range e.g. 12 17 4 9 1..., a stream of uniform deviates e.g. 0.273, 0.599, 0.527, 0.981, 0.194...) and that creates as a result a number or vector of numbers that are {\em known} if the sequence of numbers used as inputs is, in fact, random according to some measure of randomness. For example, if one adds $t$ uniform deviates (double precision random numbers from the range $[0,1)$) one expects (on average) that the mean value of the sum would be $\mu = 0.5 t$. For large $t$, the means for many independent, identically distributed ({\em iid}) sums thus formed should be normally distributed (from the Central Limit Theorem, (CLT)) with a standard deviation of $\sigma = \sqrt{t/12}$ (from the properties of the uniform distribution). {\em Each} such sum numerically generated with a RNG therefore makes up an experiment. Suppose the value of the sum for $t$ samples is $x$. The {\em probability} of obtaining this value for the mean from a {\em perfect} RNG (and actual random sequence) is determined according to the CLT from the error function as: \begin{equation} p = {\rm erfc}\left(\frac{|\mu - x|}{\sigma\sqrt{2}}\right) \end{equation} This is the $p$-value associated with the {\em null hypothesis}. We {\em assume} that the generator is good, create a statistic based on this assumption, determine the probability of obtaining that value for the statistic if the null hypothesis is correct, and then interpret the probability as success or failure of the null hypothesis. If the $p$-value is very, very low (say, less than $10^{-6}$) then we are pretty safe in rejecting the null hypothesis and concluding that the RNG is ``bad''. We could be wrong, but the chances are a million to one against a good generator producing the observed value of $p$. This is really the {\em only} circumstance that leads to a relatively unambiguous conclusion concerning the RNG. But suppose it isn't so close to 0. Suppose, in fact, that $p$ for the trial is a perfectly reasonable value. What can we conclude then? By itself the $p$-value from a single trial tells us little in most cases. Suppose it is 0.230. Does this mean that the RNG is good or bad? The correct answer is that it does not tell us that the RNG is likely to be bad. It is (if you prefer) insufficient evidence to reject the null hypothesis, but it is {\em also insufficient} to cause us to {\em accept} the null hypothesis as proven. That is, it is {\em incorrect} to assert that it means that the RNG is in fact ``good'' (unbiased) on the basis of this single test. After all, suppose that we repeated the test and got 0.230 a second time, and then repeated it a third time and got 0.241, and repeated it a hundred more times and got $p$-values that consistently lay within 0.015 or so of 0.230! In that case we'd be very safe in concluding that the RNG was a {\em bad} one that (for the given value of $t$) {\em always} summed up to pretty much the same number that is distributed {\em incorrectly}. We might well {\em reject} the null hypothesis. Suppose instead that we got 0.230, 0.001, 0.844, 0.569, 0.018, 0.970... as values for $p$. Once again, it is not at all obvious from looking at this whether we should conclude that the generator is good or bad. On the one hand, one of these values only occurs once in roughly 1000 trials by chance, and another occurs only one in maybe 50 trials -- it seems unlikely that they'd be in a sequence of $p$-values. On the other hand, it isn't {\em that} unlikely. One in a thousand chances happen, especially given some unknown number of tries! Given \emph{enough} tries they are nearly \emph{certain} to happen. Did they ``just happen'' this time, or are they indicative of a problem in the generator? It is difficult to know for sure. What we would like to do is take the guesswork out of our decision process. What is the probability that this particular sequence of $p$-values might occur {\em if} the underlying distribution of $p$-values is in fact uniform (as a {\em new} null hypothesis)? To answer this we apply a {\em Kolmogorov-Smirnov} (KS) test to the $p$-values observed to determine the probability of obtaining them in a random sampling of a uniform distribution. This is {\em itself} a $p$-value, but now it is a $p$-value that applies to the entire {\em series} of {\em iid} trials. This testing process now gives us two parameters we can tweak to obtain an unambiguous answer -- one that is very, very low, consistently -- or not. We can increase $t$, which increases the mean value relative to $\sigma$ and makes systematic deviations from the mean probability of 0.5 more obvious (but which makes a localized non-random clustering of values for {\em small} sample sizes {\em less} obvious) or we can increase the number of {\em iid} trials to see if the distribution of $p$-values for the sample size $t$ we're already using is not uniform. In either case, once we discover a combination of $t$ and the number of trials that consistently yields very low overall $p$-values (visible, as it were, as the $p$ of the distribution of $p$-values of the distribution of $p$-values of the experiment) we can safely reject the null hypothesis. If we cannot find such a set of parameters, we are at last tentatively justified in concluding that the RNG passes our very simple test. This does {\em not mean} that the null hypothesis is correct. It just means that we cannot prove it to be {\em incorrect} even though we worked pretty hard trying to do just that! This is the basic idea of nearly all RNG testers. Some tests generate a single number, normally distributed. Other tests generate a vector of numbers, and we might determine the $p$-value of the vector from the $\chi^2$ distribution according to the number of degrees of freedom represented in the vector (which in many cases will be smaller than the number of actual numbers in the vector). A few might generate numbers or vectors that are {\em not} normally distributed (and we might have to work very hard in these cases to generate a $p$-value -- the KS test itself is just such a case). In all cases in Dieharder, the $p$-values from any small sample of {\em iid} tests is held to be suspect in terms of supporting the acceptance or rejection of the null hypothesis unless and until a KS test of the uniformity of the distribution of $p$ itself yields an unambiguous $p$-value in a challenging application of the test method. In most cases it would be considered to be worthwhile to play with the parameters described above (number of samples, number of trials) to see if the $p$-value returned can be made to {\em consistently} exhibit failure with a very high degree of confidence, making at least the for-cause rejection of the null hypothesis a very safe bet. There is one test in Dieharder that does not generate a $p$-value per se. The {\em bit persistence} test is a bit-level test that basically does successive exclusive-or tests of succeeding (e.g.) unsigned integers returned by a RNG. After a remarkably few trials, the result of this is a {\em bitmask} of all bits that did not change from the value 1 throughout the sequence. A similar process is used to identify bit positions that a value of 0 that does not change. This test is actually quite useful (and is very fast). There are a number of generators that (for some seeds) have {\em less than} e.g. 32 bits that vary. In some cases the generators have fixed bits in the least significant portion of the number. in some cases they have fixed bits in the high end, or perhaps return a positive signed integer (31 bits) instead of 32. In any of these cases it is worthwhile to identify this very early on in the testing process as some of these problems will {\em inevitably} make the RNG fail later tests, often quite badly. If a test permits the number of significant bits in a presumed random integer to be varied or masked, one can even use the information to perform tests on the {\em significant} part of the numbers returned. \chapter{Evaluating $p$-values} Tests used in \die can produce a variety of statistics that can be used to produce a $p$-value \section{Xtest -- A Single Expected Value} \section{Vtest -- A Vector of Expected Values} It is appropriate to use a Vtest to evaluate the $p$-value of a single trial test (consisting as usual of $tsamples$ {\em iid} samples generated using a RNG presumed good according to $H_0$) in {\em Dieharder} when the test produces a related vector of statistics, such as a set of observed frequencies -- the number of samples that turned out to be one of a finite list of possible discrete target values. A classic example would be for a simulated die -- generate $tsamples$ random integers in in the range 1-6. For a ``perfect'' (unbiased) die, an $H_0$ die as it were, each integer should should occur with probability $P[i] = 1/6$ for $i\in [1,6]$. One therefore expects to observe an {\em average} of $tsamples/6$ in each bin over many runs of $tsamples$ each. Of course in any given random trial with a "perfect" die one would usually observe bin frequencies that vary somewhat from this in integer steps. This variation can't be too great or too small. Obviously observing all 6's in a large trial ($tsamples \gg 1$) would suggest that the die was "loaded" and not truly random because it is pretty unlikely that one would roll (say) twenty sixes in a row with an unbiased die. It can happen, of course -- one in about $3.66\times10^{15}$ trials, and $tsamples = 20$ is still pretty small. It is less obvious that observing {\em exactly} $tsamples/6 = 1,000,000$ in all bins over (say) $tsamples = 6,000,000$ rolls would ALSO suggest that the die was not random, because there are so many more ways for at least some fluctuation to occur compared to this very special outcome. The $chi^2$ distribution counts these possibilities once and for all for vector (binned) outcomes and determines the probability distribution of observing any given excursion from the expected value if the die is presumed to be an unbiased perfect die. From this one can determine the probability of having observed any given pattern of outcomes in a single trial subject to the null hypothesis $H_0$ -- the $p$-value. Evaluating $chi^2$ and $p$-value in a Vtest depends on the number of degrees of freedom in the vector -- basically how "related" the bin events are. Generally speaking, there is always at least one constraint, since the total number of throws of the die is tsamples, which must therefore equal the sum of all the bin frequencies. The sixth frequency is is therefore not an independent quantity (or in general, the contents of the $n$th (last) bin is not independent of the contents of the $n-1$ bins preceding it), so the default number of degrees of freedom is at most $n-1$. However, the number of degrees of freedom in the $chi^2$ distribution is tricky -- it can easily be {\em less} than this if the expected distribution has long "tails" -- bins where the expected value is approximately zero. The binned data only approaches the $chi^2$ distribution for bins that are have an expected value greater than (say) 10. The code below enforces this constraint, but in many tests (for example, the {\em Greatest Common Denominator} test) there may be a lot of {\em weight} aggregated in the neglected tail (of greatest common denominator frequencies for the larger factors). In these cases it is necessary to take further steps to pass in a "good" vector and not get an erroneous $p$-value. A common strategy is to {\em summing} the observed and expected values over the tail(s) of the distribution at some point where the bin frequencies are still larger than the cutoff, and turn them all into a single bin that now has a much {\em greater} occupancy than the cutoff. Ultimately, the $p$-value is evaluated as the incomplete gamma function for the observed $chi^2$ and either an input number of degrees of freedom or (the default) number of bins that have occupancy greater than the cutoff (minus 1). Numerically evaluating the incomplete gamma function {\em correctly} (in a way that converges efficiently to the correct value for all ranges of its arguments) is actually {\em not trivial to do} and is often done incorrectly in homemade code. This is one place where using the GSL is highly advantageous -- its routines were written and are regularly used and tested by people who know what they are doing, so its incomplete gamma function routine is relatively reliable and efficient. \die attempts to standardize as many aspects of performing a RNG test as possible, so that there are relatively few things to debug or validate. A Vtest therefore has a standardized ``Vtest object'' associated with it -- a struct defined in Vtest.h as: \begin{verbatim} typedef struct { unsigned int nvec; /* Length of x,y vectors */ unsigned int ndof; /* Number of degrees of freedom, default nvec-1 double *x; /* Vector of measurements */ double *y; /* Vector of expected values */ double chisq; /* Resulting Pearson's chisq */ double pvalue; /* Resulting p-value */ } Vtest; \end{verbatim} There are advantages associated with making this data struct into an "object" of sorts that is available to all tests, but not (frankly) to the point where its contents are opaque\footnote{Discussion of this point ultimately leads one into the C vs C++ wars. rgb is an unapologetic C-coder, but thinks that objects can be just lovely when they can be as opaque as you like when programming, not as opaque as the compiler designer thought they should be. 'Nuff said.} The code below thus contains simple constructor and destructor routines that can be used to allocate all the space required for a Vtest in one call, then free the allocated space in just the right order to avoid leaking memory. This can be done by hand, of course, and some tests involve vectors of Vtests and complicated things and may even {\em do} some of this stuff by hand, but in general this should be avoided whereever possible and it is nearly always possible. In summary, the strategy for a Vtest involves the following very generic steps, clearly visible in the actual code of many tests: \begin{itemize} \item Create/Allocate the Vtest struct(s) required to hold the vector of test outcomes. Note that there may be a vector of Vtests generated within a single test, if you like, if you are a skilled coder. \item Initialize the expected/target values, e.g {\tt \bv for(i=0;iy[i] = tsamples*p[i]; } \end{verbatim} } This can be done at any time before evaluating the trial's $p$-value. \item Run the trial. For example, loop $tsamples$ times, generating as a result a bin index. Increment that bin. {\tt \bv for(t=0;tx[index]++; } \end{verbatim} } Note again that there may well be some logic required to handle e.g. bin tails, evaluate the {\tt p[i]}'s (or they may be input as permanent data from the test include file). Or the test statistic may not be a bin frequency at all but some other number for which a Pearson $\chi^2$ is appropriate. \item Call {\tt Vtest\_eval()} to transform the test results into the trial $p$-value. \item As always, the trial is {\em repeated} $psamples$ times to generate a {\em vector} of $p$-values. As we noted above, any given trial can generate any given $p$-value. If you run a trial enough times, you will see very small $p$-values occur, very rarely. You will also see very large $p$-values, very rarely. In fact, you should {\em on average} see {\em all} $p$-values, {\em equally} rarely. $p$ itself should be distributed {\em uniformly}. To see if this {\em happened} within the limits imposed by probability and reason, we subject the distribution of $p$ to a final {\em Kolmogorov-Smirnov Test} that can reveal if the RNG produced results that were (on average) {\em too good} to be random, {\em too bad} to be random, or {\em just right} to be random\footnote{Think of it as ``The Goldilocks Test''.}. \end{itemize} \subsection{Kolmogorov-Smirnov Test} A Kolmogorov-Smirnov (KS) test is one that computes how much an observed probability distribution differs from a hypothesized one. Of course this isn't very useful -- {\em all} of the routines used to evaluate test statistics do precisely the same thing. Furthermore, it isn't terribly easy to turn a KS result into an actual $p$-value -- it tends to be more sensitive to one end or the other of an empirical distribution and has other difficulties\footnote{See for example the remarks at \\ \centerline{\link{http://www.itl.nist.gov/div898/handbook/eda/section3/eda35g.htm} {http://www.itl.nist.gov/div898/handbook/eda/section3/eda35g.htm}}}. For that reason, the KS statistic for the uniform distribution is usually evaluated with the {\em Anderson-Darling} goodness-of-fit test. Anderson-Darling KS is used throughout {\em Diehard}, for example, and it is similarly used in \die, but to a much higher degree. Note well that a final KS test on a {\em large} set (at least 100) of trial $p$-values is the {\em essential} last step of almost any \die test. It is otherwise simply impossible to look at $p$ from a single trial alone and assess whether or not the test ``fails'' unless that $p$-value is very, very low. Many of the original {\em Diehard} tests generated only a very few $p$-values (1-20) and ``passed'' many RNGs that in fact \die fails with a very obvious (in retrospect) non-uniformity in the final distribution of $p$. Some of its tests were also flawed (for example, the operm5 test) but the flaw was only visible if one rand the test many times and studied the distribution of $p$ with a KS test. \section{The Test Histogram} Although a KS test provides an objective and mathematically justified $p$-value for the entire test series, the human eye and human judgement are invaluable aids in the process of obtaining an unambiguous result for any test and for evaluating the quality of success or failure. For this reason \die also presents a visible histogram of the final $p$-value distribution. In the ASCII (text-based) version of \die this histogram is necessarily rather crude -- it presents binned deciles of the distribution in an autoscaling graph. Nevertheless, it makes it easy to see {\em why} the $p$-value of a test series is small. Sometimes it is obvious -- because all of the $p$-values are near zero because the RNG egregiously fails the test in every trial. Other times it is {\em very subtle} -- the test series produces $p$-values with a slight bias towards one end or the other of the region, nearly flat, that resolves into an unambiguous failure only when the number of trials contributing $p$-values is increased to as many as 500 or 1000. Here one has to judge carefully. Such an RNG isn't {\em very} bad with respect to the test at issue -- one has to work quite hard to show that it fails at all. Many applications might be totally insensitive to the small deviations from true randomness thus revealed. {\em Others}, however, might {\em not}. Modern simulations use a {\em lot} of random numbers and accumulate a {\em lot} of samples. If the statistic being sampled is ``like'' the one that fails the final KS test, erroneous results can be obtained. Usually it is fairly obvious when a test is marginal or likely to fail on the basis of a mix of the histogram and final KS $p$-value. If the latter is low, it may mean something or it may mean nothing -- visible inspection of the histogram helps one decide which. If it {\em might} be meaningful, usually repeating the test (possibly with a larger number of $p$-values used in the KS test and histogram) will usually suffice to make the failure unambiguous or (alternatively) show that the deviations in the first test were not systematic and the RNG actually does not fail the test\footnote{Noting that we carefully refrain from asserting that \die is a test suite that can be {\em passed}. The null hypothesis, by its nature, can never be proven to be true, it can only fail to be observed to fail. In this it greatly resembles both life and science: the laws of inference generally do not permit things like the Law of Universal Gravitation to be ``proven'', the best that we can say is that we have yet to observe a failure. \die is simply a numerical experimental tool that can be used empirically to develop a degree of confidence in any given RNG, not a ``validation'' tool that proves that any given RNG is suitable for some purpose or another.}. \chapter{Diehard} \section{The Original Diehard} The {\em Diehard Battery of Random Number Tests} consists of the following individual tests: \begin{enumerate} \item Birthdays \item Overlapping 5 Permutations \item 32x32 Binary Rank \item 6x8 Binary Rank \item Bitstream \item Overlapping Pairs Sparse Occupance (OPSO) \item Overlapping Quadruples Sparse Occupance (OQSO) \item DNA \item Count the 1s (stream) \item Count the 1s (byte) \item Parking Lot \item Minimum Distance (2D Spheres) \item 3D Spheres (minimum distance) \item Squeeze \item Sums \item Runs \item Craps \end{enumerate} The tests are grouped, to some extent, in families when possible; in particular the Binary Rank tests are similar, the Bitstream, OPSO, OQSO and DNA tests are very similar, as are the Parking Lot, the Minimum Distance, and the 3d Spheres tests. Nevertheless, one reason for the popularity of Diehard is the {\em diversity} of the kinds of correlations these tests reveal. They test for raw imbalances in the random numbers generated; they test for long and short distance autocorrelations; there are tests that will likely fail if a generator distributes points on 2 or 3 dimensional hyperplanes, there are tests that will fail if the generator is not random with respect to quite complex conditional patterns (such as those required to win a game of craps). The tests are not without their weaknesses, however. One weakness is that (as implemented in Diehard) they often utilize partially overlapping sequences of numbers to increase the number of ``samples'' one can draw from a relatively small input {\em file} of random numbers. Because they strictly utilize file-based random number sources, it is not easy to generate more random numbers if the number in the file turns out not to be adequate for any given test. Diehard has no adjustable parameters -- it was written to be a kind of a ``benchmark'' that would give you a pass or fail outcome per test per generator, not a testing tool that could be manipulated looking for an elusive failure or trying to resolve a marginal failure. Many of the tests in Diehard had no concluding KS test (or had a KS test based on a very small number of {\em iid} $p$-values and were hence almost as ambiguous as a single $p$-value would be unless the test series was run repeatedly on new files full of potential rands from the same generator. Diehard seems more focussed on validating relatively small files full of random numbers than it is on validating RNGs per se that are capable of generating many orders of magnitude more random numbers in far less time than a file can be read in and without the overhead or hassle of storing the file. A final criticism of the original Diehard program is that, while it was freely distributed, it was written in Fortran. Fortran is not the language of choice for programs written to run under a Unix-like operating system (such as Linux), and the code was not well structured or adequately commented {\em even} for fortran, making the understanding or modification of the code difficult. It has subsequently been ported to C\cite{hkproj} with somewhat better program structuring and commenting. Alas, both the original sources and the port are very ambiguous about their licensing. No explicit licensing statement occurs in the copyrighted code, and both the old diehard site at Florida State University and the new one at the Center for Information Security and Cryptography at the University of Hong Kong have (or had, in the case of FSU) distinctly commercial aspects, offering to sell one a CD-ROM with many pretested random numbers and the diehard program on it. \section{The Dieharder Modifications} \die has been deliberately written to try to fix most of these problems with Diehard while preserving all of its tests in default forms that are at {\em least} as functional as they are in Diehard itself. To this end: \begin{itemize} \item All \die Diehard tests have an outcome based on a single $p$-value from a KS test of the uniformity of many $p$-values returned by individual runs of each basic test. \item All \die tests have an adjustable parameter controlling the number of individual test runs that contribute $p$-values to the final KS test (with a default value of 100, much higher than any of the Diehard tests). \item All \die tests can optionall generate a simple histogram of these $p$-values so that their uniformity (or lack of it) can be {\em visually} assessed. The human eye is very good at identifying potentially significant patterns of deviation from uniformity, especially from several sequential runs of a test. \item Many of the basic Diehard tests in \die that have a final test statistic that is a computable function of the number of samples now have the number of samples as an adjustable parameter. Just as in the example above, one can increase or decrease the number of samples in a test and increase or decrease the number of test results that contribute to the final KS $p$-value. However, some Diehard tests to not permit this kind of variation, at least without a lot more work and the risk of a loss of resolution without warning. \item All tests are integrated with GSL random number generators and use GSL functions (where possible) that are thoroughly tested and supported by experts. For example, \die uses GSL versions of the error function, the incomplete gamma function, or to evaluate a binomial distribution of outcomes for some large space to use as a $\chi^2$ target vector. This presumably increases the reliability and maintainability of the code, and certainly increases its speed and flexibility relative to file based input. \item File based random number input is still possible in a number of formats, although the user should be aware that the (default) use of larger numbers of samples per test and larger numbers of tests per KS $p$-value requires far more random numbers and therefore far larger files than Diehard. If an inadequate number of random numbers is provided in a file, then (to avoid a time-consuming crash) it is automatically rewound mid-trial (and the rewind count recorded in the trial output as a warning). This, in turn, introduces a rather obvious sort of correlation that can lead to incorrect results! \item Certain tests which had additional numbers that could be parameterized as test variables were rewritten so that those variables could be set on the command line (but still default to the Diehard defaults, of course). \item Dieharder tests are {\em modularized} -- they are very nearly boilerplate {\em objects}, which makes it very easy to create new tests or work on old tests by copying or otherwise using existing tests as templates. \item All code was completely rewritten in well-commented C without direct reference to or the inclusion of either the original fortran code or any of the various attempted C ports of that code. Whereever possible the rewrite was done strictly on the basis of the prose test description. When that was not possible (because the prose description was inadequate to completely explain how to generate the test statistic) the original fortran Diehard code was examined to determine what test statistic actually was but was then implemented in original C. Tabular data and parametric data from the original code was reused in the new code, although of course it was not copied per se as a functional block of code. \item This code is packaged to be RPM installable on most Linux systems. It is also available as a compressed tar archive of the sources that is build ready on most Unix-like operating systems, subject only to the availability of the GSL on the target platform. \item The \die code is both copyrighted and 100\% Gnu Public Licensed -- anyone in the world can use it, resell it, modify it, or extend it -- as long as they obey the well-known terms of the license. \end{itemize} As one can easily see, \die has significantly extended the parametric utility of the original Diehard program (and thereby considerably increased its ability to discriminate marginal failures of many of the tests). It has done so in a clean, easy to build, publically licensed format that should encourage the further extension of the \die test suite. Next, let us look at the modular program design of \die to see how it works. \chapter{Dieharder's Modular Test Structure} Diehard's program organization is very simple. There is a toplevel program shell that parses the command line and initializes variables, installs additional (user added) RNGs so that the GSL can recognize them, and executes the primary work process. That process either executes each test known to Dieharder, one at a time, in a specific order or runs through a case switch to execute a single test. In the event that all the tests are run (using the {\tt -a} switch), most test parameters are ignored and a set of defaults are used. These standard parameters are chosen so that the tests will be ``reasonably'' sensitive and discriminating and hence can serve as a comparative RNG performance benchmark on the one hand and as a starting point for the parametric exploration of specific tests afterwards. A \die test consists of three subroutines. These test are named according to the scheme: {\tt \begin{verbatim} diehard\_birthday() diehard\_birthday\_test() help\_diehard\_birthday() \end{verbatim} } \noindent (collected into a single file, e.g. {\tt diehard\_birthday.c}, for the Diehard Birthday's test). These routines, together with the file {\tt diehard\_birthday.h}, and suitable (matching) prototypes and enums in the program-wide include file {\tt dieharder.h}, constitute a complete test. {\tt diehard\_birthday.h} contains a test struct where the test name, a short test description, and the two key default test parameters (the number of samples per test and number of test runs per KS $p$-value) are specified and made available to the test routines in a standarized way. This file also can contain any test-specific data in static local variables. The toplevel routine, {\tt diehard\_birthday()}, is called from the primary work routine executed right after startup if the test or is explicitly selected or the {\tt -a} flag is given on the command line. It is a very simple shell for the test itself -- it examines how it was started and if appropriate saves the two key test parameters and installs its internal default values for them, it allocates any required local memory used by the test (such as the vector that will hold the $p$-values required by the final KS test), it rewinds the test file if the test is using file input of random numbers instead of one of the generators, it prints out a standardized test header that includes the test description and the values of the common test parameters, and calls the main sampling routine. This routine calls the actual test routine {\tt diehard\_birthday\_test()} which evaluates and returns a single $p$ value and stores it in {\tt ks\_pvalue}, the vector of $p$ values passed to the final KS test routine. When the sample routine returns, a standard test report is generated that includes a histogram of the obtained values of $p$, the overall $p$-value of the test from the final KS test, and a tentative ``conclusion'' concerning the RNG. The workhorse routine, {\tt diehard\_birthday\_test()}, is responsible for running the actual test a single time to generate a single $p$-value. It uses for this purpose built-in data (e.g. precomputed values for numbers used in the generation of the test statistic) and parameters, common test variable parameters (where possible) such as the number of samples that contribute to the test statistic or user-specified parameters from the command line, and of course a supply of random numbers from the specified RNG or file. As described above, a very typical test uses a transformation and accumulation of the random numbers to generate a number (or vector of numbers) whose expected value (as a function of the test parameters) is known and to compare this expected value with the value ``experimentally'' obtained by the test run in terms of $\sigma$, the standard deviation associated with the expected value. This is then straightforward to transform into a $p$-value -- the probability that the experimental number was obtained {\em if} the null hypothesis (that the RNG is in fact a good one) is correct. This probability should be uniformly distributed on the range $[0,1)$ over many runs of the test -- significant deviations from this expected distribution (especially deviations where the test $p$-values are uniformly very small) indicate {\em failure} of the RNG to support the null hypothesis. The final routine, {\tt help\_diehard\_birthday()}, is completely standardized and exists only to allow the test description to be conveniently printed in the test header or when ``help'' for the test is invoked on the command line. \die provides a number of utility routines to make creating a test easier. If a test generates a single test statistic, a struct can be defined for the observed value, the expected value, and the standard deviation that can be passed to a routine that transforms it into a $p$-value in an entirely standard way using the error function. If a test generates a vector of test statistics that are expected to be distributed according to the $\chi^s$ distribution (independently normal for each degree of freedom for some specified number of degrees of freedom, typically one or two less than the number of participating points) there exists a set of routines for creating or destroying a struct to hold e.g. the vector of expected values or experimentally obtained values, or for evaluating the $p$-value of the experiment from this data. A set of routines is provided for performing bitlevel manipulations on bitstrings of specified length such as dumping a bit string to standard output so it can be visually examined, extracting a set of $n n'$ is {\em sufficient} to conclude that the sequence will also pass the test at $n'$. If a sequence has all four bit integers occurring with the expected frequencies ($\approx \frac{m}{16}$) within the bounds permitted by perfect randomness, then it {\em must} have the right number of 1's and 0's, the right number of 00, 01, 10, and 11 pairs, and the right number of 000, 001, 010, 011, 100, 101, 110 and 111 triplets, all within the bounds permitted by perfect randomness. The converse is {\em not} true -- we cannot conclude that if we pass the test at $n < n'$ we will also pass it at $n'$. Passing at $n$ is a {\em necessary condition} for passing at $n' > n$, but is not sufficient. From this we can conclude that if we accept the null hypothesis for the bit distribution test for $n = 4$ (hexadecimal values), we have {\em also accepted the null hypothesis} for the STS monobit test ($n = 1$), the STS runs test (slightly weaker than the bit distribution test for $n = 2$) and the bit distribution test for $n = 3$ (distribution of octal values). We have also satisfied a {\em necessary} condition for the $n = 8$ bit distribution test (uniform distribution of all random bytes, integers in the range 0-255), but of course the two hexadecimal digits that occur with the correct overall frequences could be {\em paired} in a biased way. The largest value $n_{\rm max}$ for which an RNG passes the bit distribution test is therefore an important descriptor of the quality of the RNG. We expect that we can {\em sort} RNGs according to their values of $n_{\rm max}$, saying that RNG A is ``random up to four bits'' while RNG B is ``random up to six bits''. This seems like it will serve as a useful {\em microbenchmark} of sorts for RNGs, an easy-to-understand test with a hierarchy of success or failure that can fairly easily be related to at least certain patterns of demands likely to be placed on an RNG in an actual application. The {\em mode} of failure is also likely to be very useful information, although Diehard is not yet equipped to prove it. For example it would be very interesting to sort the frequencies by their individual $p$-values (the probability of obtaining the frequency as the outcome of a binomial trial for just the single $n$-bit number) and look for potentially revealing patterns. It is also clear that there are {\em similar} hierarchical relations between the bit distribution test and a number of {\em other} tests from Diehard and the STS. For example, the DNA test looks at sequences of 20 bits (10 2 bit numbers). There are 1048576 distinct bit sequences containing 20 bits. Although it is memory intensive and difficult to do a bitdist test at this size, it is in principle possible. Doing so is a waste of time, however -- all RNGs will almost certainly fail, once the test is done with enough samples to be able to clearly resolve failure. Diehard instead looks at the number of {\em missing} 20 bit integers out of $2^{21}$ samples pulled from a bitstring a bit larger than this, with overlap. If the frequencies of all of the integers were correct, then of course the number of missing integers would come out correct as well. So passing the bit distribution test for $n = 20$ is a {\em sufficient} condition for passing Diehard's DNA test, while passing the DNA test is a necessary condition for passing the 20 bit distribution test. The same is more or less true for the other related Diehard tests. Bitstream, OPSO and OQSO all create overlapping 20 bit integers in slightly different ways from from a sample containing a hair over $2^{21}$ such integers and measure the number of numbers missing after examining all of those samples. Algorithmically they differ {\em only} in the way that they overlap and hence have the same expected number of missing numbers over the sample size with slightly different variances. Count the 1s is the final Diehard test related to the bitstream tests in a hierarchical way. It processes a byte stream and maps each byte into one of five numbers, and then create a five digit base 5 number out of the stream of those numbers. The probability of getting each of the five numbers out of an unbiased byte stream is easily determined, and so the probabilities of obtaining each of the $5^5$ five digit numbers can be computed. An (overlapping) stream of bytes is processed and the frequency of each number within that stream (compared to the expected value) for four digit and five digit words is converted into a test statistic. Clearly if the byte stream is random in the bit distribution test out to $n = 40$ (five bytes) then the Count the 1s test will be passed; a RNG that fails the Count the 1s test cannot pass the $n = 40$ bit distribution test. However here it is very clear that {\em performing} an $n = 40$ bit distribution test is all but impossible unless one uses a cluster to do so -- there are $2^40$ bins to tally, which exceeds the total active memory storage capacity of everything but a large cluster. However, such a test would never be necessary, as all RNGs currently known would almost certainly fail the bit distribution test at an $n$ considerably less than 40, probably as low as 8. \section{Future (Proposed or Planned) Tests} As noted above, eventually Dieharder should have {\em all} the STS and Diehard tests (where some effort may be expended making the the set ``minimal'' and not e.g. duplicating monobit and runs tests in the form of a bit distribution (series) test. Tests omitted from both suites but documented in e.g. Knuth will likely be added as well. At that point development and research energy will likely be directed into two very specific directions. First to discover additional hierarchical test series like the bit distribution test that provide very specific information about the {\em degree} to which a RNG is random and also provides some specific insight into the nature of its {\em failure} when at some point the null hypothesis is unambiguously rejected. These tests will be developed by way of providing Dieharder with an embedded microbenchmark suite -- a set of tests that all generators fail but that provide specific measures of the point at which randomness fails as they do so. Several of the STS tests (such as the {\em discrete Fourier transform} test) appear capable of providing this sort of information with at most a minor modification to cause them to be performed systematically in a series of tests to the point of failure. Others, such as a straightforward autocorrelation test, do not appear to be in any of the test suites we have examined so far although a number of complex tests are hierarchically related to it. The second place that Dieharder would benefit from the addition of new tests is in the arena of {\em application} level tests, specifically in the regime of Monte Carlo simulation. Monte Carlo often relies on several distinct measures of the quality of a RNG -- the uniformity of deviates returned (so that a Markov process advances with the correct local frequencies of transition), autocorrelations in the sequence returned (so that transitions one way or the other are not ``bunched'' or non-randomly patterned in other ways in the Markov process), sometimes even in patterning in random site selection in a high-dimensional space, the precise area of application where many generators are {\em known} to subtly fail even when they pass most tests for uniformity and local autocorrelation. Viewing a RNG as a form of iterated map with a discrete chaotic component, there may exist long-period cycles in a sufficiently high dimensional space such that the generator's state becomes weakly correlated after irregular but deterministic intervals, correlations that are only visible or measureable in certain projections of the data. It would certainly help numerical simulationists to have an application level tests series that permit them to at least weakly rank RNGs in terms of their likelihood of yielding a valid sampled result in any given computational context. The same is true for cryptographic applications, although the tendency in the STS has been to remove tests at this level and rely instead on microbenchmarks presumably redundant with the test for randomness represented by the application. Long before all of this ambitious work is performed, though, it is to be hoped that the Dieharder package produces the {\em real} effect intended by its author -- the provision of a useable testbed framework for researchers to write, and ultimately contribute, their own RNG tests (and candidate RNGs). Diehard and the STS {\em both} suffer from their very success -- they are ``finished products'' and written in such a way that makes it very difficult to {\em play} with their code or add your own code and ideas to them. Dieharder is written to {\em never be finished}. The framework exists to easily and consistently add new software generators, with a simple mechanism for merging those generators directly into the GSL should they prove to be as good or better (or just different) than existing generators the GSL already provides. The framework exists to easily and consistently add new tests for RNGs. Since nearly {\em any} random distribution can be used as the basis for a cleverly constructed test, one expects to see the framework used to build tests on top of pretty much all of the GSL built in random distribution functions, to simultaneously test RNGs used as the basic source of randomness and to test the code that produces the (supposedly) suitably distributed random variable. Either end of this proposition can be formulated as a null hypothesis, and the ability to trivially switch RNGs and hence sample the output distributions compared to the theoretical one for many RNGs adds an important dimension to the validation process both ways. The framework exists to tremendously increase the ability of the testing process to use available e.g. cluster computing resources to perform its tests. Many of the RNG tests are trivially partitionable or parallelizable. A single test or series of tests across a range can be initiated with a very short packet of information, and the return from the test can be anything from a single $p$-value to a vector of $p$-values to be centrally accumulated and subjected to a final KS test. The program thus has a fairly straightforward development path for a future that requires much more stringent tests of RNGs than are currently required or possible. \chapter{Results for Selected Generators} The following are results from applying the full suite of tests to three generators selected from the ones prebuilt into the GSL -- a good generator (mt19937\_1999), a bad generator (randu) and an {\em ugly} generator (slatec). \subsection{A Good Generator: mt19937\_1999} The following is the output from running {\tt dieharder -a -g 13}: \begin{verbatim} #================================================================== # rgb_timing # This test times the selected random number generator, only. #================================================================== #================================================================== # rgb_timing() test using the mt19937_1999 generator # Average time per rand = 3.530530e+01 nsec. # Rands per second = 2.832436e+07. #================================================================== # RGB Bit Persistence Test # This test generates 256 sequential samples of an random unsigned # integer from the given rng. Successive integers are logically # processed to extract a mask with 1's whereever bits do not # change. Since bits will NOT change when filling e.g. unsigned # ints with 16 bit ints, this mask logically &'d with the maximum # random number returned by the rng. All the remaining 1's in the # resulting mask are therefore significant -- they represent bits # that never change over the length of the test. These bits are # very likely the reason that certain rng's fail the monobit # test -- extra persistent e.g. 1's or 0's inevitably bias the # total bitcount. In many cases the particular bits repeated # appear to depend on the seed. If the -i flag is given, the # entire test is repeated with the rng reseeded to generate a mask # and the extracted mask cumulated to show all the possible bit # positions that might be repeated for different seeds. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 256 (test default is 256) # P-values in final KS test = 1 (test default is 1) # Samples per test run = 256, tsamples ignored # Test run 1 times to cumulate unchanged bit mask #================================================================== # Results # Results for mt19937_1999 rng, using its 32 valid bits: # (Cumulated mask of zero is good.) # cumulated_mask = 0 = 00000000000000000000000000000000 # randm_mask = 4294967295 = 11111111111111111111111111111111 # random_max = 4294967295 = 11111111111111111111111111111111 # rgb_persist test PASSED (no bits repeat) #================================================================== #================================================================== # RGB Bit Distribution Test # Accumulates the frequencies of all n-tuples of bits in a list # of random integers and compares the distribution thus generated # with the theoretical (binomial) histogram, forming chisq and the # associated p-value. In this test n-tuples are selected without # WITHOUT overlap (e.g. 01|10|10|01|11|00|01|10) so the samples # are independent. Every other sample is offset modulus of the # sample index and ntuple_max. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) # Testing ntuple = 1 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | |****| | |****| | | # 14| | | | |****| | |****| | | # | | | | |****| |****|****| | | # 12| | | | |****| |****|****| | | # | | |****| |****| |****|****| |****| # 10| | |****| |****| |****|****| |****| # |****| |****|****|****| |****|****| |****| # 8|****|****|****|****|****| |****|****| |****| # |****|****|****|****|****| |****|****| |****| # 6|****|****|****|****|****| |****|****| |****| # |****|****|****|****|****| |****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.940792 for RGB Bit Distribution Test # Assessment: # PASSED at > 5%. # Testing ntuple = 2 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | |****| | |****| | | # 14| | | | |****| | |****| | | # | | | |****|****| | |****| | | # 12| |****| |****|****| | |****| | | # |****|****| |****|****| | |****| | | # 10|****|****|****|****|****| | |****| | | # |****|****|****|****|****| | |****| |****| # 8|****|****|****|****|****| | |****|****|****| # |****|****|****|****|****| | |****|****|****| # 6|****|****|****|****|****| | |****|****|****| # |****|****|****|****|****| | |****|****|****| # 4|****|****|****|****|****| |****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.300792 for RGB Bit Distribution Test # Assessment: # PASSED at > 5%. # Testing ntuple = 3 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | |****| | | | | | # 16| | | | |****| | | | | | # | | | | |****| | | | | | # 14| | | | |****| | | | | | # | | | | |****| | | | | | # 12| |****|****| |****| | | | | | # | |****|****| |****|****| | | | | # 10|****|****|****| |****|****| | | | | # |****|****|****| |****|****| |****| |****| # 8|****|****|****|****|****|****| |****| |****| # |****|****|****|****|****|****| |****|****|****| # 6|****|****|****|****|****|****| |****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.331776 for RGB Bit Distribution Test # Assessment: # PASSED at > 5%. # Testing ntuple = 4 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | |****| | | | |****| | | # | | |****| |****|****| |****| | | # 12| | |****| |****|****| |****| | | # | | |****|****|****|****| |****| | | # 10| | |****|****|****|****| |****| | | # | | |****|****|****|****|****|****| | | # 8| | |****|****|****|****|****|****|****| | # |****| |****|****|****|****|****|****|****|****| # 6|****| |****|****|****|****|****|****|****|****| # |****| |****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.083786 for RGB Bit Distribution Test # Assessment: # PASSED at > 5%. # Testing ntuple = 5 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | |****| | # 14|****| |****| | | | | |****| | # |****| |****| | |****| | |****| | # 12|****| |****|****| |****| | |****| | # |****| |****|****| |****| | |****| | # 10|****| |****|****| |****| | |****| | # |****| |****|****| |****| | |****| | # 8|****| |****|****| |****| |****|****| | # |****| |****|****|****|****| |****|****|****| # 6|****| |****|****|****|****| |****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.789288 for RGB Bit Distribution Test # Assessment: # PASSED at > 5%. # Testing ntuple = 6 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for RGB Bit Distribution Test # Assessment: # FAILED at < 0.01%. # Generator mt19937_1999 FAILS at 0.01% for 6-tuplets. rgb_bitdist terminating. #================================================================== # Diehard "Birthdays" test (modified). # Each test determines the number of matching intervals from 512 # "birthdays" (by default) drawn on a 24-bit "year" (by # default). This is repeated 100 times (by default) and the # results cumulated in a histogram. Repeated intervals should be # distributed in a Poisson distribution if the underlying generator # is random enough, and a a chisq and p-value for the test are # evaluated relative to this null hypothesis. # # It is recommended that you run this at or near the original # 100 test samples per p-value with -t 100. # # Two additional parameters have been added. In diehard, nms=512 # but this CAN be varied and all Marsaglia's formulae still work. It # can be reset to different values with -x nmsvalue. # Similarly, nbits "should" 24, but we can really make it anything # we want that's less than or equal to rmax_bits = 32. It can be # reset to a new value with -y nbits. Both default to diehard's # values if no -x or -y options are used. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100 (test default is 100) # P-values in final KS test = 100 (test default is 100) # 512 samples drawn from 24-bit integers masked out of a # 32 bit random integer. lambda = 2.000000, kmax = 6, tsamples = 100 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # |****| | | | | | | | | | # 16|****| | | | | | | | | | # |****| | | | | | | | | | # 14|****|****| |****| | | | | | | # |****|****| |****| | |****| |****| | # 12|****|****| |****| | |****| |****| | # |****|****| |****| | |****| |****| | # 10|****|****| |****| | |****| |****| | # |****|****|****|****|****| |****| |****| | # 8|****|****|****|****|****| |****| |****| | # |****|****|****|****|****| |****| |****|****| # 6|****|****|****|****|****| |****| |****|****| # |****|****|****|****|****| |****| |****|****| # 4|****|****|****|****|****| |****| |****|****| # |****|****|****|****|****| |****| |****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.056099 for Diehard Birthdays Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Overlapping 5-{}Permutations Test. # This is the OPERM5 test. It looks at a sequence of one mill- # ion 32-bit random integers. Each set of five consecutive # integers can be in one of 120 states, for the 5! possible or- # derings of five numbers. Thus the 5th, 6th, 7th,...numbers # each provide a state. As many thousands of state transitions # are observed, cumulative counts are made of the number of # occurences of each state. Then the quadratic form in the # weak inverse of the 120x120 covariance matrix yields a test # equivalent to the likelihood ratio test that the 120 cell # counts came from the specified (asymptotically) normal dis- # tribution with the specified 120x120 covariance matrix (with # rank 99). This version uses 1,000,000 integers, twice. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 1000000 (test default is 1000000) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^28 for 100 samples. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # |****| | | | | | | | | | # 32|****| | | | | | | | | | # |****| | | | | | | | | | # 28|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 20|****| | | | | | | | |****| # |****| | | | | | | | |****| # 16|****| | | | | | | | |****| # |****| | | | | | | | |****| # 12|****| | | | | | | | |****| # |****| | | | | | | | |****| # 8|****| | | | | | |****| |****| # |****|****|****| | | | |****|****|****| # 4|****|****|****|****|****| |****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Overlapping 5-{}permutations Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard 32x32 Binary Rank Test # This is the BINARY RANK TEST for 31x31 matrices. The leftmost # 31 bits of 31 random integers from the test sequence are used # to form a 31x31 binary matrix over the field {0,1}. The rank # is determined. That rank can be from 0 to 31, but ranks< 28 # are rare, and their counts are pooled with those for rank 28. # Ranks are found for (default) 40,000 such random matrices and # a chisquare test is performed on counts for ranks 31,30,29 and # <=28. # # As always, the test is repeated and a KS test applied to the # resulting p-values to verify that they are approximately uniform. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 40000 (test default is 40000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | | | | | | | | | | # | | | | | | | | | | | # 12| | | | | | | | | | | # |****|****|****| | | |****| |****| | # 10|****|****|****| | |****|****|****|****| | # |****|****|****| | |****|****|****|****|****| # 8|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.929434 for Diehard 32x32 Rank Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard 6x8 Binary Rank Test # This is the BINARY RANK TEST for 6x8 matrices. From each of # six random 32-bit integers from the generator under test, a # specified byte is chosen, and the resulting six bytes form a # 6x8 binary matrix whose rank is determined. That rank can be # from 0 to 6, but ranks 0,1,2,3 are rare; their counts are # pooled with those for rank 4. Ranks are found for 100,000 # random matrices, and a chi-square test is performed on # counts for ranks 6,5 and <=4. # # As always, the test is repeated and a KS test applied to the # resulting p-values to verify that they are approximately uniform. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | | |****| | | | | | | # | | | |****|****| | | | | | # 12| |****| |****|****|****| | | | | # | |****| |****|****|****|****|****| | | # 10| |****| |****|****|****|****|****| | | # | |****| |****|****|****|****|****| | | # 8| |****|****|****|****|****|****|****| | | # |****|****|****|****|****|****|****|****|****| | # 6|****|****|****|****|****|****|****|****|****| | # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.364548 for Diehard 6x8 Binary Rank Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Bitstream Test. # The file under test is viewed as a stream of bits. Call them # b1,b2,... . Consider an alphabet with two "letters", 0 and 1 # and think of the stream of bits as a succession of 20-letter # "words", overlapping. Thus the first word is b1b2...b20, the # second is b2b3...b21, and so on. The bitstream test counts # the number of missing 20-letter (20-bit) words in a string of # 2^21 overlapping 20-letter words. There are 2^20 possible 20 # letter words. For a truly random string of 2^21+19 bits, the # number of missing words j should be (very close to) normally # distributed with mean 141,909 and sigma 428. Thus # (j-141909)/428 should be a standard normal variate (z score) # that leads to a uniform [0,1) p value. The test is repeated # twenty times. # # Note that of course we do not "restart file", when using gsl # generators, we just crank out the next random number. # We also do not bother to overlap the words. rands are cheap. # Finally, we repeat the test (usually) more than twenty time. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | | | | | | | # | | | | | | | | | | | # 28| | | | | | | | | | | # | | | | | | | | | | | # 24| | | | | | | | | | | # | | | | | | | |****| | | # 20| | | | | | | |****| | | # | | | | | | | |****| | | # 16| | | | | | | |****| | | # | | | | | | |****|****| |****| # 12| | | | | |****|****|****| |****| # | | | | | |****|****|****| |****| # 8| | |****| |****|****|****|****| |****| # | |****|****|****|****|****|****|****|****|****| # 4| |****|****|****|****|****|****|****|****|****| # | |****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.004456 for Diehard Bitstream Test # Assessment: # POOR at < 1%. # Recommendation: Repeat test to verify failure. #================================================================== # Diehard Overlapping Pairs Sparse Occupance (OPSO) # The OPSO test considers 2-letter words from an alphabet of # 1024 letters. Each letter is determined by a specified ten # bits from a 32-bit integer in the sequence to be tested. OPSO # generates 2^21 (overlapping) 2-letter words (from 2^21+1 # "keystrokes") and counts the number of missing words---that # is 2-letter words which do not appear in the entire sequence. # That count should be very close to normally distributed with # mean 141,909, sigma 290. Thus (missingwrds-141909)/290 should # be a standard normal variable. The OPSO test takes 32 bits at # a time from the test file and uses a designated set of ten # consecutive bits. It then restarts the file for the next de- # signated 10 bits, and so on. # # Note 2^21 = 2097152, tsamples cannot be varied. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | |****| | | | # 14| | | | | |****|****| | | | # | | | | |****|****|****| | | | # 12| | | | |****|****|****| | | | # | | |****| |****|****|****| |****| | # 10| | |****| |****|****|****| |****| | # | | |****| |****|****|****| |****| | # 8|****| |****| |****|****|****| |****| | # |****|****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.378389 for Diehard OPSO Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Overlapping Quadruples Sparce Occupancy (OQSO) Test # # Similar, to OPSO except that it considers 4-letter # words from an alphabet of 32 letters, each letter determined # by a designated string of 5 consecutive bits from the test # file, elements of which are assumed 32-bit random integers. # The mean number of missing words in a sequence of 2^21 four- # letter words, (2^21+3 "keystrokes"), is again 141909, with # sigma = 295. The mean is based on theory; sigma comes from # extensive simulation. # # Note 2^21 = 2097152, tsamples cannot be varied. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | |****| | | | | | # | | | | |****| | | | | | # 14| | | | |****| | | | | | # | | | | |****| |****| | | | # 12| | | | |****| |****| | | | # | |****| | |****| |****| |****| | # 10| |****| | |****| |****| |****| | # | |****| |****|****|****|****| |****| | # 8|****|****|****|****|****|****|****|****|****| | # |****|****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.393770 for Diehard OQSO Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard DNA Test. # # The DNA test considers an alphabet of 4 letters:: C,G,A,T, # determined by two designated bits in the sequence of random # integers being tested. It considers 10-letter words, so that # as in OPSO and OQSO, there are 2^20 possible words, and the # mean number of missing words from a string of 2^21 (over- # lapping) 10-letter words (2^21+9 "keystrokes") is 141909. # The standard deviation sigma=339 was determined as for OQSO # by simulation. (Sigma for OPSO, 290, is the true value (to # three places), not determined by simulation. # # Note 2^21 = 2097152 # Note also that we don't bother with overlapping keystrokes # (and sample more rands -- rands are now cheap). #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | |****| | | | | | # 16| | | | |****| | | | | | # | | | | |****| | | | | | # 14| | | | |****| | | | | | # | | | | |****| | | | | | # 12| | | | |****| | | | | | # |****| | | |****| | | | | | # 10|****| | |****|****|****| | | |****| # |****|****|****|****|****|****|****| |****|****| # 8|****|****|****|****|****|****|****| |****|****| # |****|****|****|****|****|****|****| |****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.696510 for Diehard DNA Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Count the 1s (stream) (modified) Test. # Consider the file under test as a stream of bytes (four per # 32 bit integer). Each byte can contain from 0 to 8 1's, # with probabilities 1,8,28,56,70,56,28,8,1 over 256. Now let # the stream of bytes provide a string of overlapping 5-letter # words, each "letter" taking values A,B,C,D,E. The letters are # determined by the number of 1's in a byte:: 0,1,or 2 yield A, # 3 yields B, 4 yields C, 5 yields D and 6,7 or 8 yield E. Thus # we have a monkey at a typewriter hitting five keys with vari- # ous probabilities (37,56,70,56,37 over 256). There are 5^5 # possible 5-letter words, and from a string of 256,000 (over- # lapping) 5-letter words, counts are made on the frequencies # for each word. The quadratic form in the weak inverse of # the covariance matrix of the cell counts provides a chisquare # test:: Q5-Q4, the difference of the naive Pearson sums of # (OBS-EXP)^2/EXP on counts for 5- and 4-letter cell counts. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 256000 (test default is 256000) # P-values in final KS test = 100 (test default is 100) # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | | | | | | | | | | # | | | | | | | | | | | # 12| | | | |****| |****|****| | | # | |****|****| |****| |****|****|****|****| # 10| |****|****|****|****| |****|****|****|****| # | |****|****|****|****| |****|****|****|****| # 8| |****|****|****|****| |****|****|****|****| # | |****|****|****|****| |****|****|****|****| # 6|****|****|****|****|****| |****|****|****|****| # |****|****|****|****|****| |****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.985250 for Diehard Count the 1s (stream) # Assessment: # PASSED at > 5%. #================================================================== # Diehard Count the 1s Test (byte) (modified). # This is the COUNT-THE-1's TEST for specific bytes. # Consider the file under test as a stream of 32-bit integers. # From each integer, a specific byte is chosen , say the left- # most:: bits 1 to 8. Each byte can contain from 0 to 8 1's, # with probabilitie 1,8,28,56,70,56,28,8,1 over 256. Now let # the specified bytes from successive integers provide a string # of (overlapping) 5-letter words, each "letter" taking values # A,B,C,D,E. The letters are determined by the number of 1's, # in that byte:: 0,1,or 2 ---> A, 3 ---> B, 4 ---> C, 5 ---> D, # and 6,7 or 8 ---> E. Thus we have a monkey at a typewriter # hitting five keys with with various probabilities:: 37,56,70, # 56,37 over 256. There are 5^5 possible 5-letter words, and # from a string of 256,000 (overlapping) 5-letter words, counts # are made on the frequencies for each word. The quadratic form # in the weak inverse of the covariance matrix of the cell # counts provides a chisquare test:: Q5-Q4, the difference of # the naive Pearson sums of (OBS-EXP)^2/EXP on counts for 5- # and 4-letter cell counts. # # Note: We actually cycle samples over all 0-31 bit offsets, so # that if there is a problem with any particular offset it has # a chance of being observed. One can imagine problems with odd # offsets but not even, for example, or only with the offset 7. # tsamples and psamples can be freely varied, but you'll likely # need tsamples >> 100,000 to have enough to get a reliable kstest # result. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 256000 (test default is 256000) # P-values in final KS test = 100 (test default is 100) # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | |****| | | | # 14| | | | | | |****| | | | # | | | |****| | |****| | | | # 12| | | |****| | |****| | | | # | | | |****| | |****|****| | | # 10| |****| |****| |****|****|****| | | # | |****|****|****|****|****|****|****| |****| # 8| |****|****|****|****|****|****|****|****|****| # | |****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.748440 for Diehard Count the 1s (byte) # Assessment: # PASSED at > 5%. #================================================================== # Diehard Parking Lot Test (modified). # This tests the distribution of attempts to randomly park a # square car of length 1 on a 100x100 parking lot without # crashing. We plot n (number of attempts) versus k (number of # attempts that didn't "crash" because the car squares # overlapped and compare to the expected result from a perfectly # random set of parking coordinates. This is, alas, not really # known on theoretical grounds so instead we compare to n=12,000 # where k should average 3523 with sigma 21.9 and is very close # to normally distributed. Thus (k-3523)/21.9 is a standard # normal variable, which converted to a uniform p-value, provides # input to a KS test with a default 100 samples. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 0 (test default is 0) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | | | | | | | | | | # | | | | |****| | | | | | # 12|****| |****| |****| | | | | | # |****|****|****| |****|****| |****| | | # 10|****|****|****| |****|****| |****| |****| # |****|****|****| |****|****|****|****| |****| # 8|****|****|****| |****|****|****|****| |****| # |****|****|****|****|****|****|****|****| |****| # 6|****|****|****|****|****|****|****|****| |****| # |****|****|****|****|****|****|****|****| |****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.379171 for Diehard Parking Lot Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Minimum Distance (2d Circle) Test # Generate 8000 points in a 10000^2 square. Determine the # the shortest nearest neighbor distance R. This should generate # p = 1.0 - exp(-R^2/0.995). Repeat for lots of samples, apply a # KS test to see if p is uniform. # # The number of samples is fixed -- tsamples is ignored. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # |****| | |****| | | | | | | # 14|****| | |****|****| | | | | | # |****| | |****|****| | | | | | # 12|****| | |****|****| | | |****| | # |****| | |****|****| | | |****| | # 10|****| | |****|****| | |****|****| | # |****| | |****|****| | |****|****| | # 8|****| |****|****|****| | |****|****| | # |****|****|****|****|****| |****|****|****| | # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.774383 for Diehard Minimum Distance (2d Circle) Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard 3d Sphere (Minimum Distance) Test # Choose 4000 random points in a cube of edge 1000. At each # point, center a sphere large enough to reach the next closest # point. Then the volume of the smallest such sphere is (very # close to) exponentially distributed with mean 120pi/3. Thus # the radius cubed is exponential with mean 30. (The mean is # obtained by extensive simulation). The 3DSPHERES test gener- # ates 4000 such spheres 20 times. Each min radius cubed leads # to a uniform variable by means of 1-exp(-r^3/30.), then a # KSTEST is done on the 20 p-values. # # This test ignores tsamples, and runs the usual default 100 # psamples to use in the final KS test. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 4000 (test default is 4000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | | | | | | | | | | # | | | | | | | | | | | # 12| | |****|****| | | |****| | | # |****| |****|****| | |****|****| | | # 10|****| |****|****| | |****|****| |****| # |****| |****|****|****| |****|****| |****| # 8|****|****|****|****|****| |****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.989677 for Diehard 3d Sphere (Minimum Distance) Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Squeeze Test. # Random integers are floated to get uniforms on [0,1). Start- # ing with k=2^31=2147483647, the test finds j, the number of # iterations necessary to reduce k to 1, using the reduction # k=ceiling(k*U), with U provided by floating integers from # the file being tested. Such j's are found 100,000 times, # then counts for the number of times j was <=6,7,...,47,>=48 # are used to provide a chi-square test for cell frequencies. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | |****| | | # 14| | | | | | | |****| |****| # | | | | | | | |****| |****| # 12| | | |****| | | |****| |****| # | | | |****| | | |****| |****| # 10|****|****|****|****| | | |****| |****| # |****|****|****|****| | | |****|****|****| # 8|****|****|****|****| | |****|****|****|****| # |****|****|****|****| |****|****|****|****|****| # 6|****|****|****|****| |****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.807374 for Diehard Squeeze Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Sums Test # Integers are floated to get a sequence U(1),U(2),... of uni- # form [0,1) variables. Then overlapping sums, # S(1)=U(1)+...+U(100), S2=U(2)+...+U(101),... are formed. # The S's are virtually normal with a certain covariance mat- # rix. A linear transformation of the S's converts them to a # sequence of independent standard normals, which are converted # to uniform variables for a KSTEST. The p-values from ten # KSTESTs are given still another KSTEST. # # Note well: -O causes the old diehard version to be run (more or # less). Omitting it causes non-overlapping sums to be used and # directly tests the overall balance of uniform rands. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100 (test default is 100) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | |****| # | | | | | | | | | |****| # 16| | | | | | | | | |****| # | | | | | | | | | |****| # 14| | | | | | | | | |****| # | | | | | | | | | |****| # 12| | | | | | | | | |****| # | |****| | | | |****| | |****| # 10| |****| |****| | |****| | |****| # |****|****| |****| |****|****|****| |****| # 8|****|****|****|****| |****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.557686 for Diehard Sums Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Runs Test # This is the RUNS test. It counts runs up, and runs down, # in a sequence of uniform [0,1) variables, obtained by float- # ing the 32-bit integers in the specified file. This example # shows how runs are counted: .123,.357,.789,.425,.224,.416,.95 # contains an up-run of length 3, a down-run of length 2 and an # up-run of (at least) 2, depending on the next values. The # covariance matrices for the runs-up and runs-down are well # known, leading to chisquare tests for quadratic forms in the # weak inverses of the covariance matrices. Runs are counted # for sequences of length 10,000. This is done ten times. Then # repeated. # # In Dieharder sequences of length tsamples = 100000 are used by # default, and 100 p-values thus generated are used in a final # KS test. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| |****| | | | | | | | | # | |****| | | |****| | |****| | # 12| |****| | | |****|****| |****| | # | |****| | | |****|****| |****|****| # 10| |****| | | |****|****|****|****|****| # | |****| | | |****|****|****|****|****| # 8|****|****| |****| |****|****|****|****|****| # |****|****|****|****| |****|****|****|****|****| # 6|****|****|****|****| |****|****|****|****|****| # |****|****|****|****| |****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.472238 for Runs (up) # Assessment: # PASSED at > 5%. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | |****| | | | # | | | | | | |****| | | | # 14| | | | | | |****| | | | # | | | | | | |****| | | | # 12| | | | | | |****| | |****| # |****|****| | | | |****|****| |****| # 10|****|****| | | |****|****|****| |****| # |****|****| | | |****|****|****| |****| # 8|****|****|****|****| |****|****|****| |****| # |****|****|****|****| |****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.682452 for Runs (down) # Assessment: # PASSED at > 5%. #================================================================== # Diehard Craps Test # This is the CRAPS TEST. It plays 200,000 games of craps, finds # the number of wins and the number of throws necessary to end # each game. The number of wins should be (very close to) a # normal with mean 200000p and variance 200000p(1-p), with # p=244/495. Throws necessary to complete the game can vary # from 1 to infinity, but counts for all>21 are lumped with 21. # A chi-square test is made on the no.-of-throws cell counts. # Each 32-bit integer from the test file provides the value for # the throw of a die, by floating to [0,1), multiplying by 6 # and taking 1 plus the integer part of the result. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 200000 (test default is 200000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | | | | |****|****| | | | # | | | | | |****|****| | |****| # 12| | | | | |****|****| | |****| # | | | |****| |****|****| | |****| # 10| | |****|****| |****|****| | |****| # | | |****|****| |****|****| |****|****| # 8| |****|****|****| |****|****|****|****|****| # | |****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.872210 for Craps Test (mean) # Assessment: # PASSED at > 5%. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16|****| | | | | | | | | | # |****| | | | | | | | | | # 14|****| | | | | | | | | | # |****| | |****| | | | | | | # 12|****| | |****|****| | | | | | # |****| |****|****|****| | | |****| | # 10|****| |****|****|****| | |****|****| | # |****| |****|****|****| | |****|****| | # 8|****| |****|****|****| |****|****|****| | # |****| |****|****|****|****|****|****|****| | # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.945661 for Craps Test (freq) # Assessment: # PASSED at > 5%. #================================================================== # STS Monobit Test # Very simple. Counts the 1 bits in a long string of random uints. # Compares to expected number, generates a p-value directly from # erfc(). Very effective at revealing overtly weak generators; # Not so good at determining where stronger ones eventually fail. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | |****| | | | | | # 14|****| | | |****| | | | | | # |****| | | |****| | | | | | # 12|****|****|****| |****| | |****| | | # |****|****|****| |****| | |****| | | # 10|****|****|****| |****| | |****|****| | # |****|****|****| |****| | |****|****| | # 8|****|****|****| |****| | |****|****| | # |****|****|****|****|****| | |****|****|****| # 6|****|****|****|****|****| |****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.286818 for STS Monobit Test # Assessment: # PASSED at > 5%. #================================================================== # STS Runs Test # Counts the total number of 0 runs + total number of 1 runs across # a sample of bits. Note that a 0 run must begin with 10 and end # with 01. Note that a 1 run must begin with 01 and end with a 10. # This test, run on a bitstring with cyclic boundary conditions, is # absolutely equivalent to just counting the 01 + 10 bit pairs. # It is therefore totally redundant with but not as good as the # rgb_bitdist() test for 2-tuples, which looks beyond the means to the # moments, testing an entire histogram of 00, 01, 10, and 11 counts # to see if it is binomially distributed with p = 0.25. #================================================================== # Run Details # Random number generator tested: mt19937_1999 # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | | |****| | | | | |****| # | | | |****|****| | | | |****| # 12| | | |****|****| | | | |****| # | | |****|****|****| | | | |****| # 10|****|****|****|****|****| |****| | |****| # |****|****|****|****|****| |****| | |****| # 8|****|****|****|****|****|****|****| | |****| # |****|****|****|****|****|****|****|****| |****| # 6|****|****|****|****|****|****|****|****| |****| # |****|****|****|****|****|****|****|****| |****| # 4|****|****|****|****|****|****|****|****| |****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.337260 for STS Runs Test # Assessment: # PASSED at > 5%. \end{verbatim} \subsection{Comments} This is the output from what is generally considered a ``good'' RNG -- one that is often touted as passing Diehard. As one can see from the output above, although it ``passed'' Diehard, it was a bit of a marginal pass and in fact when the number of test samples is increased a number of tests return $p$-values that are not terribly low but which {\em also} are not uniformly distributed, usually a sign of eventual failure. Let us quickly review these results and comment. The mt19937\_1999 is quite fast (at $28\times10^7$ rands per second on a 1.87 GHz laptop). The bit persistence test shows that all of its unsigned integer bits vary, which is good. The sequence of bit distributions tests that follow show that it is 5-bit random -- arbitrary pieces of the integers it returns that are 5 bits in length are uniformly distributed across all 32 integers thus represented, but {\em 6} bit chunks are {\em not} uniformly distributed over the 64 integers thus represented! This is interesting information. It means that this generator will not produce completely uniform results for any ntuplet of bits with 6 or more bits in it. If used to select random ascii letters, for example, it probably will not cover the alphabet uniformly within the expectations of statistics. It also points to a direction for further study of the generator. Why and how does the generator fail to be 6 bit random? What would happen if one took two mt19937\_1999 generators (with independent seeds) and ``shuffled'' their output in 5 bit chunks? We then begin on the Diehard tests. The test passes the birthday test, but examining the distribution produced we can see that the pass is a bit ``marginal'', in the sense that $p$ isn't terribly uniformly distributed. When this happens, one may want to rerun the particular test a few times to see if the features in the histogram vary or are systematic. Alternatively, rerunning it with a larger value of KS samples with e.g. {\tt -p 1000} or more may push it into unambiguous failure and in fact it does. This {\em is} a marginal result, and a sample of random numbers {\em far} smaller than what would be used in any numerical simulation will unambiguously fail the Diehard birthdays test. Surprisingly, we find that the generator {\em unambiguously} fails the Overlapping 5-{}Permutations test with the Dieharder defaults already! Note well that the original diehard test only produces {\em two} $p$-values, and there is a very good chance, of course, that at least one of those two will be well above the usual $p < 0.01$ criterion for rejecting the null hypothesis. Dieharder reveals a very systematic problem with mt19937\_1999 -- it has a tendency to produce long stretches of rands that are either a bit ``too random'' (too likely to precisely balance permutations) or ``too ordered'' (too likely to favor certain permutations over others). The two are nearly balanced so that {\em overall} the generator probably {\em does} balance the total number of permutations nicely, but the {\em bunching} of the permutations in samples of 1000000 random integers is non-random! mt19937\_1999 handily passes the binary rank tests. This is interesting, given that we have already determined the generator to be 5 bit random (but not 6). Apparently the binary rank tests are less sensitive to overt inhomogeneity in the ntuple bit distribution than the bit distribution test, or at least sample a {\em different} aspect of bitlevel randomness. We then begin the four bit distribution tests in Diehard: bitstream, OPSO, OQSO and DNA. All of these test the distribution of overlapping 20-bit integer substrings of an unsigned integer stream of random numbers, but they do so in different ways. mt19937\_1999 does ``poorly'' on the bitstream test, but passes the other three easily. Note once again that running the bitstream test only 20 times (the original Diehard default) and examining the resulting $p$-values by eye one would almost certainly have passed the generator, but now we have a {\em cumulative} $p$-value from an actual KS test less than 1\%, a point where most tests recommend rejecting the null hypothesis. The Dieharder recommendation is instead to {\em rerun the test} a few times (or up the number of samples in the KS test with {\tt -p 500} or the like)! This is especially reasonable given that the RNG passes the {\em other} three 20-bit tests, something that seems relatively unlikely if it fails bitstream. Doing so, we note that in fact mt19937\_1999 {\em fails} the Diehard bitstream test quite unambiguously at {\tt -p 500}. The $p$-values returned from the test are systematically {\em too good} (strongly biased towards higher values of $p$)! This in turn suggests that we rerun the {\em other} 20-bit tests with larger values of $p$. Perhaps we just got lucky and there are features in the histograms of $p$ that are systematic but not yet significant compared to the statistical noise still residual with only 100 samples. We try {\tt dieharder -d 6 -t 0 -p 500} to see how OPSO fares with a lot more $p$-values in the final KS test, and discover that yes, mt19937\_1999 {\em passes} OPSO while failing bitstream at the Dieharder (enhanced Diehard) level. The Diehard tests are {\em very good} at revealing certain kinds of non-randomness, and are even capable of some fairly subtle discrimination in that regard. mt19937\_1999 also passes the Diehard Count the 1s tests handily. Note that this tests something completely different from the STS monobit test or bit distribution test at $n = 1$ -- it is more concerned with detecting midrange bit correlations within the overlapping stream. Because we already know mt19937\_1999 is 5 bit random, this isn't a complete surprise -- even though the test uses all 8 bits of a byte, it is balanced in 1's overall and has the right frequency of bit patterns out through 5 bits, so a test like this that is primarily sensitive to having the right number of bits only on a bytewise basis seems likely to pass. The next three tests -- Diehard parking lot and minimum distance (in 2d and 3d) are tests that are at least weakly sensitive to the bunching of uniform deviates picked in coordinate ntuples on hyperplanes. The first attempts to cover an (integer) grid with non-overlapping ``cars'' and it is hoped that one will record an excess of crashes if the coordinates are bunched compared to truly random. It is most sensitive to gross deviations from uniformity, as the tiny deviations associated with hyperplane formation are likely block-averaged by the truncation process converting unsigned integers or uniform deviates into integers over a smaller range. The minimum distance tests are similar but instead of looking for excess crashes it picks random coordinates that are uniform deviates and looking for the minimum distance between all possible pairs. This test should be much {\em more} sensitive to hyperplanar bunching that occurs at the dimensionality of the fields being so filled, as one might reasonably expect that any such bunching will reduce the average minimum distance observed after some number of trials. Knuth suggests alternative ways of making the same determination (perhaps more accurately and reproducibly), and this {\em kind} of test should fairly clearly be carried out in a systematic study of higher dimension until a failure is observed as the bit distribution (STS series) test is above. In any event, mt19937\_1999 passes the parking lot and minimum distance test in 2d and 3d, suggesting that it is reasonably uniform through three dimensions. The Diehard squeeze test is another measure of the uniformity of the distribution, computing the {\em distribution} of the number of multiplications required to reduce the maximum signed integer 2147483647 to 1 by multiplying it by a uniform deviate and rounding the double precision result up to the next highest integer. This test is repeated many times and $\chi^2$ test on the frequency histogram used to generate a test $p$-value. mt19937\_1999 passes this test handily. The Diehard sums test also tests the distribution of uniform deviates by summing them 100 at a time and computing the distribution of totals, then reducing that distribution to a $p$-value. Dieharder performs a final KS test as usual on the results from 100 tests instead of the 10 that were the default in Diehard, and uses non-overlapping sums by default as well. mt19937\_1999 passes the sums test either way. The Diehard runs test counts the frequencies of up-runs and down-runs (sequences of random integers or uniform deviates that strictly increase or decrease) in a large sample sequence. Diehard used uniform deviates, but Dieharder uses random unsigned integers as examining them is much faster -- uniform deviates usually being formed by performing a division on random unsigned integers -- and obviously yield identical (but opposite) information with only the interpretation of up and down runs being interchanged. mt19937\_1999 passes the runs tests in both directions easily. Finally, mt19937\_1999 passes both aspects of the Diehard craps test, producing the correct overall probability of winning and the correct distribution for the throws required to end the game. As one expects, the mt19937\_1999 RNG passes both the STS monobit and runs tests, given that we have already determined that it is 5 bit random in the bit distribution test above (equivalent to STS series). In summary, mt19937\_1999 does {\em not} pass all the Dieharder tests derived from Diehard tests, failing both the bitstream and the overlapping 5-{}permutations test. In both cases the RNG produces ``reasonable'' $p$-values quite a lot of the time (permitting one to conclude that the Diehard suite of tests were all ``passed'' by this RNG). However, Dieharder has revealed that those $p$-values were produced systematically in the wrong {\em proportions} so that the final KS test is not passed and the null hypothesis must be rejected. Still, it is clear that for nearly all purposes, mt19937\_1999 is an excellent RNG -- as good as any available in the GSL. We will not make the mistake of stating that it ``passes Dieharder'' as we do not wish to imply that Dieharder is a benchmark test to be passed but rather a toolset that can be used to explore. Dieharder contains tests that {\em no} RNG we've tested is able to ``pass'', and we expect to add more. We would much prefer that Diehard return specific information about where, and how, any given RNG {\em fails} given that all of them are {\em pseudo}-random number generators and hence bound to fail in some respect or another. So much for good RNGs. What about bad ones? \section{A Bad Generator: randu} Let us look now at an ``infamously bad'' random number generator, randu. randu is a linear congruential generator that is {\em so} bad that it has its own Wikipedia page\cite{wiki_randu} extolling its complete lack of virtue. When successive points in a 3 dimensional space are selected with randu, they all fall on 15 distinct planes. Let us examine randu with Dieharder and see what it tells us about its suitability as a RNG. {\tt \begin{verbatim} #================================================================== # RGB Timing Test # # This test times the selected random number generator only. It is # generally run at the beginning of a run of -a(ll) the tests to provide # some measure of the relative time taken up generating random numbers # for the various generators and tests. #================================================================== #================================================================== # rgb_timing() test using the randu generator # Average time per rand = 2.538020e+01 nsec. # Rands per second = 3.940079e+07. #================================================================== # RGB Bit Persistence Test # This test generates 256 sequential samples of an random unsigned # integer from the given rng. Successive integers are logically # processed to extract a mask with 1's whereever bits do not # change. Since bits will NOT change when filling e.g. unsigned # ints with 16 bit ints, this mask logically &'d with the maximum # random number returned by the rng. All the remaining 1's in the # resulting mask are therefore significant -- they represent bits # that never change over the length of the test. These bits are # very likely the reason that certain rng's fail the monobit # test -- extra persistent e.g. 1's or 0's inevitably bias the # total bitcount. In many cases the particular bits repeated # appear to depend on the seed. If the -i flag is given, the # entire test is repeated with the rng reseeded to generate a mask # and the extracted mask cumulated to show all the possible bit # positions that might be repeated for different seeds. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 256 (test default is 256) # P-values in final KS test = 1 (test default is 1) # Samples per test run = 256, tsamples ignored # Test run 1 times to cumulate unchanged bit mask #================================================================== # Results # Results for randu rng, using its 31 valid bits: # (Cumulated mask of zero is good.) # cumulated_mask = 5 = 00000000000000000000000000000101 # randm_mask = 2147483647 = 01111111111111111111111111111111 # random_max = 2147483647 = 01111111111111111111111111111111 # rgb_persist test FAILED (bits repeat) #================================================================== #================================================================== # RGB Bit Distribution Test # Accumulates the frequencies of all n-tuples of bits in a list # of random integers and compares the distribution thus generated # with the theoretical (binomial) histogram, forming chisq and the # associated p-value. In this test n-tuples are selected without # WITHOUT overlap (e.g. 01|10|10|01|11|00|01|10) so the samples # are independent. Every other sample is offset modulus of the # sample index and ntuple_max. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) # Testing ntuple = 1 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for RGB Bit Distribution Test # Assessment: # FAILED at < 0.01%. # Generator randu FAILS at 0.01% for 1-tuplets. rgb_bitdist terminating. #================================================================== # Diehard "Birthdays" test (modified). # Each test determines the number of matching intervals from 512 # "birthdays" (by default) drawn on a 24-bit "year" (by # default). This is repeated 100 times (by default) and the # results cumulated in a histogram. Repeated intervals should be # distributed in a Poisson distribution if the underlying generator # is random enough, and a a chisq and p-value for the test are # evaluated relative to this null hypothesis. # # It is recommended that you run this at or near the original # 100 test samples per p-value with -t 100. # # Two additional parameters have been added. In diehard, nms=512 # but this CAN be varied and all Marsaglia's formulae still work. It # can be reset to different values with -x nmsvalue. # Similarly, nbits "should" 24, but we can really make it anything # we want that's less than or equal to rmax_bits = 32. It can be # reset to a new value with -y nbits. Both default to diehard's # values if no -x or -y options are used. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100 (test default is 100) # P-values in final KS test = 100 (test default is 100) # 512 samples drawn from 24-bit integers masked out of a # 31 bit random integer. lambda = 2.000000, kmax = 6, tsamples = 100 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | |****| | | | # | | | | | | |****| | | | # 14|****| | | | | |****| | | | # |****| | | | | |****| | | | # 12|****| | | | | |****|****| | | # |****|****| |****| | |****|****| |****| # 10|****|****| |****| | |****|****| |****| # |****|****| |****| | |****|****| |****| # 8|****|****| |****| | |****|****|****|****| # |****|****| |****| |****|****|****|****|****| # 6|****|****|****|****| |****|****|****|****|****| # |****|****|****|****| |****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.538138 for Diehard Birthdays Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Overlapping 5-{}Permutations Test. # This is the OPERM5 test. It looks at a sequence of one mill- # ion 32-bit random integers. Each set of five consecutive # integers can be in one of 120 states, for the 5! possible or- # derings of five numbers. Thus the 5th, 6th, 7th,...numbers # each provide a state. As many thousands of state transitions # are observed, cumulative counts are made of the number of # occurences of each state. Then the quadratic form in the # weak inverse of the 120x120 covariance matrix yields a test # equivalent to the likelihood ratio test that the 120 cell # counts came from the specified (asymptotically) normal dis- # tribution with the specified 120x120 covariance matrix (with # rank 99). This version uses 1,000,000 integers, twice. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^28 for 100 samples. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 32|****| | | | | | | | | | # |****| | | | | | | | | | # 28|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 20|****| | | | | | | | | | # |****| | | | | | | | | | # 16|****| | | | | | | | |****| # |****| | | | | | | | |****| # 12|****| | | | | | | | |****| # |****| | | | | | | | |****| # 8|****|****| |****| |****| | | |****| # |****|****|****|****| |****| | | |****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Overlapping 5-{}permutations Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard 32x32 Binary Rank Test # This is the BINARY RANK TEST for 31x31 matrices. The leftmost # 31 bits of 31 random integers from the test sequence are used # to form a 31x31 binary matrix over the field {0,1}. The rank # is determined. That rank can be from 0 to 31, but ranks< 28 # are rare, and their counts are pooled with those for rank 28. # Ranks are found for (default) 40,000 such random matrices and # a chisquare test is performed on counts for ranks 31,30,29 and # <=28. # # As always, the test is repeated and a KS test applied to the # resulting p-values to verify that they are approximately uniform. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 40000 (test default is 40000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard 32x32 Rank Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard 6x8 Binary Rank Test # This is the BINARY RANK TEST for 6x8 matrices. From each of # six random 32-bit integers from the generator under test, a # specified byte is chosen, and the resulting six bytes form a # 6x8 binary matrix whose rank is determined. That rank can be # from 0 to 6, but ranks 0,1,2,3 are rare; their counts are # pooled with those for rank 4. Ranks are found for 100,000 # random matrices, and a chi-square test is performed on # counts for ranks 6,5 and <=4. # # As always, the test is repeated and a KS test applied to the # resulting p-values to verify that they are approximately uniform. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 80| | | | | | | | | | | # | | | | | | | | | | | # 72| | | | | | | | | | | # |****| | | | | | | | | | # 64|****| | | | | | | | | | # |****| | | | | | | | | | # 56|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 40|****| | | | | | | | | | # |****| | | | | | | | | | # 32|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 16|****| | | | | | | | | | # |****| | | | | | | | | | # 8|****|****| | | | | | | | | # |****|****| | | |****| |****| | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard 6x8 Binary Rank Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Bitstream Test. # The file under test is viewed as a stream of bits. Call them # b1,b2,... . Consider an alphabet with two "letters", 0 and 1 # and think of the stream of bits as a succession of 20-letter # "words", overlapping. Thus the first word is b1b2...b20, the # second is b2b3...b21, and so on. The bitstream test counts # the number of missing 20-letter (20-bit) words in a string of # 2^21 overlapping 20-letter words. There are 2^20 possible 20 # letter words. For a truly random string of 2^21+19 bits, the # number of missing words j should be (very close to) normally # distributed with mean 141,909 and sigma 428. Thus # (j-141909)/428 should be a standard normal variate (z score) # that leads to a uniform [0,1) p value. The test is repeated # twenty times. # # Note that of course we do not "restart file", when using gsl # generators, we just crank out the next random number. # We also do not bother to overlap the words. rands are cheap. # Finally, we repeat the test (usually) more than twenty time. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Bitstream Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Overlapping Pairs Sparse Occupance (OPSO) # The OPSO test considers 2-letter words from an alphabet of # 1024 letters. Each letter is determined by a specified ten # bits from a 32-bit integer in the sequence to be tested. OPSO # generates 2^21 (overlapping) 2-letter words (from 2^21+1 # "keystrokes") and counts the number of missing words---that # is 2-letter words which do not appear in the entire sequence. # That count should be very close to normally distributed with # mean 141,909, sigma 290. Thus (missingwrds-141909)/290 should # be a standard normal variable. The OPSO test takes 32 bits at # a time from the test file and uses a designated set of ten # consecutive bits. It then restarts the file for the next de- # signated 10 bits, and so on. # # Note 2^21 = 2097152, tsamples cannot be varied. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard OPSO Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Overlapping Quadruples Sparce Occupancy (OQSO) Test # # Similar, to OPSO except that it considers 4-letter # words from an alphabet of 32 letters, each letter determined # by a designated string of 5 consecutive bits from the test # file, elements of which are assumed 32-bit random integers. # The mean number of missing words in a sequence of 2^21 four- # letter words, (2^21+3 "keystrokes"), is again 141909, with # sigma = 295. The mean is based on theory; sigma comes from # extensive simulation. # # Note 2^21 = 2097152, tsamples cannot be varied. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard OQSO Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard DNA Test. # # The DNA test considers an alphabet of 4 letters:: C,G,A,T, # determined by two designated bits in the sequence of random # integers being tested. It considers 10-letter words, so that # as in OPSO and OQSO, there are 2^20 possible words, and the # mean number of missing words from a string of 2^21 (over- # lapping) 10-letter words (2^21+9 "keystrokes") is 141909. # The standard deviation sigma=339 was determined as for OQSO # by simulation. (Sigma for OPSO, 290, is the true value (to # three places), not determined by simulation. # # Note 2^21 = 2097152 # Note also that we don't bother with overlapping keystrokes # (and sample more rands -- rands are now cheap). #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard DNA Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Count the 1s (stream) (modified) Test. # Consider the file under test as a stream of bytes (four per # 32 bit integer). Each byte can contain from 0 to 8 1's, # with probabilities 1,8,28,56,70,56,28,8,1 over 256. Now let # the stream of bytes provide a string of overlapping 5-letter # words, each "letter" taking values A,B,C,D,E. The letters are # determined by the number of 1's in a byte:: 0,1,or 2 yield A, # 3 yields B, 4 yields C, 5 yields D and 6,7 or 8 yield E. Thus # we have a monkey at a typewriter hitting five keys with vari- # ous probabilities (37,56,70,56,37 over 256). There are 5^5 # possible 5-letter words, and from a string of 256,000 (over- # lapping) 5-letter words, counts are made on the frequencies # for each word. The quadratic form in the weak inverse of # the covariance matrix of the cell counts provides a chisquare # test:: Q5-Q4, the difference of the naive Pearson sums of # (OBS-EXP)^2/EXP on counts for 5- and 4-letter cell counts. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 256000 (test default is 256000) # P-values in final KS test = 100 (test default is 100) # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Count the 1s (stream) # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Count the 1s Test (byte) (modified). # This is the COUNT-THE-1's TEST for specific bytes. # Consider the file under test as a stream of 32-bit integers. # From each integer, a specific byte is chosen , say the left- # most:: bits 1 to 8. Each byte can contain from 0 to 8 1's, # with probabilitie 1,8,28,56,70,56,28,8,1 over 256. Now let # the specified bytes from successive integers provide a string # of (overlapping) 5-letter words, each "letter" taking values # A,B,C,D,E. The letters are determined by the number of 1's, # in that byte:: 0,1,or 2 ---> A, 3 ---> B, 4 ---> C, 5 ---> D, # and 6,7 or 8 ---> E. Thus we have a monkey at a typewriter # hitting five keys with with various probabilities:: 37,56,70, # 56,37 over 256. There are 5^5 possible 5-letter words, and # from a string of 256,000 (overlapping) 5-letter words, counts # are made on the frequencies for each word. The quadratic form # in the weak inverse of the covariance matrix of the cell # counts provides a chisquare test:: Q5-Q4, the difference of # the naive Pearson sums of (OBS-EXP)^2/EXP on counts for 5- # and 4-letter cell counts. # # Note: We actually cycle samples over all 0-31 bit offsets, so # that if there is a problem with any particular offset it has # a chance of being observed. One can imagine problems with odd # offsets but not even, for example, or only with the offset 7. # tsamples and psamples can be freely varied, but you'll likely # need tsamples >> 100,000 to have enough to get a reliable kstest # result. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 256000 (test default is 256000) # P-values in final KS test = 100 (test default is 100) # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Count the 1s (byte) # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Parking Lot Test (modified). # This tests the distribution of attempts to randomly park a # square car of length 1 on a 100x100 parking lot without # crashing. We plot n (number of attempts) versus k (number of # attempts that didn't "crash" because the car squares # overlapped and compare to the expected result from a perfectly # random set of parking coordinates. This is, alas, not really # known on theoretical grounds so instead we compare to n=12,000 # where k should average 3523 with sigma 21.9 and is very close # to normally distributed. Thus (k-3523)/21.9 is a standard # normal variable, which converted to a uniform p-value, provides # input to a KS test with a default 100 samples. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 0 (test default is 0) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | | | # | | | | | | | | | | | # 16| | | | | | | | | | | # | | | | | | | | | | | # 14| | | |****| | | | | | | # | | | |****| | | | | | | # 12| | | |****| | |****| | | | # | | | |****| | |****| | | | # 10|****| |****|****| | |****|****|****| | # |****| |****|****|****| |****|****|****|****| # 8|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.977990 for Diehard Parking Lot Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard Minimum Distance (2d Circle) Test # Generate 8000 points in a 10000^2 square. Determine the # the shortest nearest neighbor distance R. This should generate # p = 1.0 - exp(-R^2/0.995). Repeat for lots of samples, apply a # KS test to see if p is uniform. # # The number of samples is fixed -- tsamples is ignored. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 60| | | | | | | | | | | # | | | | | | | | | | | # 54| | | | | | | | | | | # | | | | | | | | | | | # 48| | | | | | | | | | | # | | | | | | | | | | | # 42| | |****| | | | | | | | # | | |****| | | | | | | | # 36| | |****| | | | | | | | # | | |****| | | | | | | | # 30| | |****| | | | | | | | # | | |****| | | | | | | | # 24| | |****| | | | | | | | # | | |****| | | | | | | | # 18| | |****| | | | | | | | # | | |****| | | | | | | | # 12| | |****| |****| | | |****|****| # | | |****| |****| |****| |****|****| # 6| | |****| |****|****|****| |****|****| # | | |****| |****|****|****| |****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Minimum Distance (2d Circle) Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Minimum Distance (2d Circle) Test # Generate 8000 points in a 10000^2 square. Determine the # the shortest nearest neighbor distance R. This should generate # p = 1.0 - exp(-R^2/0.995). Repeat for lots of samples, apply a # KS test to see if p is uniform. # # The number of samples is fixed -- tsamples is ignored. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | | | | | | | # | | | | | | | | | | | # 28| | | | | | | | | | | # | | | | | | | | | | | # 24| | | | | | | | | | | # | | | | | | | | | | | # 20|****| |****| | | | | | | | # |****| |****| | | | | | | | # 16|****| |****| | | | | | | | # |****| |****| | | | | | | | # 12|****|****|****|****|****| | | | | | # |****|****|****|****|****| | | | | | # 8|****|****|****|****|****| | | | | | # |****|****|****|****|****| | |****| | | # 4|****|****|****|****|****|****|****|****| | | # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000001 for Diehard 3d Sphere (Minimum Distance) Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Squeeze Test. # Random integers are floated to get uniforms on [0,1). Start- # ing with k=2^31=2147483647, the test finds j, the number of # iterations necessary to reduce k to 1, using the reduction # k=ceiling(k*U), with U provided by floating integers from # the file being tested. Such j's are found 100,000 times, # then counts for the number of times j was <=6,7,...,47,>=48 # are used to provide a chi-square test for cell frequencies. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | | | | | | | # | | | | | | | | | | | # 28| | | | | | | | | | | # | | | | | | | | | | | # 24| | | | | | | | | | | # | | | | | | | | | | | # 20|****| | | | | | | | | | # |****| | | | | | | | | | # 16|****|****| | | | | | | | | # |****|****| | | | | | | | | # 12|****|****| | | | | | | | | # |****|****|****|****| | | | |****| | # 8|****|****|****|****| |****|****| |****| | # |****|****|****|****|****|****|****| |****| | # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.013380 for Diehard Squeeze Test # Assessment: # POSSIBLY WEAK at < 5%. # Recommendation: Repeat test to verify failure. #================================================================== # Diehard Sums Test # Integers are floated to get a sequence U(1),U(2),... of uni- # form [0,1) variables. Then overlapping sums, # S(1)=U(1)+...+U(100), S2=U(2)+...+U(101),... are formed. # The S's are virtually normal with a certain covariance mat- # rix. A linear transformation of the S's converts them to a # sequence of independent standard normals, which are converted # to uniform variables for a KSTEST. The p-values from ten # KSTESTs are given still another KSTEST. # # Note well: -O causes the old diehard version to be run (more or # less). Omitting it causes non-overlapping sums to be used and # directly tests the overall balance of uniform rands. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100 (test default is 100) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18| | | | | | | | | |****| # | | | | | | | | | |****| # 16| | | | | | | | | |****| # | | | | | | | | |****|****| # 14| | | | | | | | |****|****| # | | | | | | | | |****|****| # 12| | | | | | | | |****|****| # | | | | | | |****| |****|****| # 10| |****| | | | |****| |****|****| # |****|****| | | | |****| |****|****| # 8|****|****| |****| | |****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.214757 for Diehard Sums Test # Assessment: # PASSED at > 5%. #================================================================== # Diehard "runs" test (modified). # This tests the distribution of increasing and decreasing runs # of integers. If called with reasonable parameters e.g. -s 100 # or greater and -n 100000 or greater, it will compute a vector # of p-values for up and down and verify that the proportion # of these values less than 0.01 is consistent with a uniform # distribution. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # |****| | | | | | | | | | # 18|****| | | | | | | | | | # |****| | | | | | | | | | # 16|****| | | | | | | | | | # |****| | | | | | | | | | # 14|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| |****| | | | | | | | # 10|****| |****|****| | |****| | | | # |****|****|****|****|****|****|****|****| | | # 8|****|****|****|****|****|****|****|****|****| | # |****|****|****|****|****|****|****|****|****| | # 6|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.599644 for Runs (up) # Assessment: # PASSED at > 5%. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 20| | | | | | | | | | | # | | | | | | | | | | | # 18|****| | | | | | | | | | # |****| | | | | | | | | | # 16|****| |****| | | | | | | | # |****| |****| | | | | | | | # 14|****| |****| | | | | | | | # |****| |****| | | |****| | | | # 12|****| |****| | | |****| | | | # |****| |****| | | |****| |****| | # 10|****| |****| | | |****| |****| | # |****|****|****| | | |****| |****| | # 8|****|****|****|****| | |****|****|****| | # |****|****|****|****| |****|****|****|****| | # 6|****|****|****|****| |****|****|****|****| | # |****|****|****|****|****|****|****|****|****|****| # 4|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # 2|****|****|****|****|****|****|****|****|****|****| # |****|****|****|****|****|****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.316433 for Runs (down) # Assessment: # PASSED at > 5%. #================================================================== # Diehard Craps Test # This is the CRAPS TEST. It plays 200,000 games of craps, finds # the number of wins and the number of throws necessary to end # each game. The number of wins should be (very close to) a # normal with mean 200000p and variance 200000p(1-p), with # p=244/495. Throws necessary to complete the game can vary # from 1 to infinity, but counts for all>21 are lumped with 21. # A chi-square test is made on the no.-of-throws cell counts. # Each 32-bit integer from the test file provides the value for # the throw of a die, by floating to [0,1), multiplying by 6 # and taking 1 plus the integer part of the result. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 200000 (test default is 200000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Craps Test (mean) # Assessment: # FAILED at < 0.01%. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Craps Test (freq) # Assessment: # FAILED at < 0.01%. #================================================================== # STS Monobit Test # Very simple. Counts the 1 bits in a long string of random uints. # Compares to expected number, generates a p-value directly from # erfc(). Very effective at revealing overtly weak generators; # Not so good at determining where stronger ones eventually fail. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 80| | | | | | | | | | | # | | | | | | | | | | | # 72| | | | | | | | | | | # |****| | | | | | | | | | # 64|****| | | | | | | | | | # |****| | | | | | | | | | # 56|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 40|****| | | | | | | | | | # |****| | | | | | | | | | # 32|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 16|****| | | | | | | | | | # |****| | | | | | | | | | # 8|****| | | | | | | | | | # |****| | | | |****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for STS Monobit Test # Assessment: # FAILED at < 0.01%. #================================================================== # STS Runs Test # Counts the total number of 0 runs + total number of 1 runs across # a sample of bits. Note that a 0 run must begin with 10 and end # with 01. Note that a 1 run must begin with 01 and end with a 10. # This test, run on a bitstring with cyclic boundary conditions, is # absolutely equivalent to just counting the 01 + 10 bit pairs. # It is therefore totally redundant with but not as good as the # rgb_bitdist() test for 2-tuples, which looks beyond the means to the # moments, testing an entire histogram of 00, 01, 10, and 11 counts # to see if it is binomially distributed with p = 0.25. #================================================================== # Run Details # Random number generator tested: randu # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 80| | | | | | | | | | | # | | | | | | | | | | | # 72| | | | | | | | | | | # | | | | | | | | | | | # 64| | | | | | | | | | | # |****| | | | | | | | | | # 56|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 40|****| | | | | | | | | | # |****| | | | | | | | | | # 32|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 16|****| | | | | | | | | | # |****| | | | | | | | | | # 8|****| | | | | | | | |****| # |****| | | |****|****| |****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for STS Runs Test # Assessment: # FAILED at < 0.01%. \end{verbatim} } We begin by noting that randu is about 40% faster than mt19937\_1999. After all, we should make every effort to explain why the RNG was quite popular and in widespread use back in the 70's. Then the bad news begins. The bit persistence test shows that randu has only 31 significant bits (signed integer) which is to be expected and not itself a problem. Howevere it {\em also} shows that the cumulated mask is not zero! Two of the three least significant bits produced by the randu iterated map {\em never change}. This is usually a very bad sign for a random number generator, as it means that the generator will very likely fail even the simplest tests for uniformity. randu does not disappoint us in this regard. It is not even 1 bit random according to the bit distribution series test. To put it bluntly, the generator produces an unbalanced number of 0's and 1's, meaning that it {\em cannot} produced balanced distributions of higher order numbers of bits. That does not mean, of course, that it will fail all the rest of the tests. There are usually at least {\em some} tests that are relatively insensitive to the particular kinds of correlations in nearly any RNG that was random ``enough'' to have been named and distributed as a RNG (and hence make it into the GSL). Indeed, as we look down the list we see that it {\em passes} the Diehard birthdays test, the parking lot test, and would have passed the squeeze test by the usual $p > 0.01$ condition (replaced in Dieharder by a ``answer cloudy, try again later'' sort of message, where one is advised to try again {\em harder} by increasing the number of samples in the final KS test with {\tt -p 500} or the like). It passes the sums test (apparently) and the runs test. It fails {\em all of the rest}, including of course both the monobit and STS runs test, most of them by directly producing nothing $p$-values very close to 0.0, making the final KS test moot. {\em Even this} RNG, well-known to be {\em terrible} for most purposes, is capable of producing sequences that are ``random enough'' to pass some of Diehard's {\em difficult} tests at the default Dieharder values, which in turn are invariably more challenging than those of Diehard. What happens if one cranks up the tests to to where they make a RNG die {\em harder}? In the case of randu, mostly it dies. For example the sums test fails without any doubt at 500 $p$-values. runs fails badly at 1000. The squeeze test fails at 300. Even parking lot fails at 2000 $p$-values. With randu, ``passing'' Diehard tests appears to be a matter more of how hard you look, not whether or not the result is truly random according to the test measure. In contrast, mt19937\_1999 still {\em passes} the runs test at {\em 10000} $p$-samples, although at that point the pass gets to be visibly marginal. We reiterate the previous observation concerning the true purpose of Dieharder with its variable controls: {\em The point isn't ``passing'' any given test, the point is determining where it fails in a quantitative way!} When this is done one can {\em compare} the performance of different RNGs in a meaningful way on a test by test basis. From the above we see that Dieharder correctly leads us to conclude that randu is a pretty poor generator that might well not even produce a zero-sum {\em coin flip game}, let alone produce an unbiased result for something like a state lottery. For all of that, randu is {\em not} the worst RNG in the GSL. Consider the following. \section{An Ugly Generator: slatec} slatec is the GSL encapsulation of the RAND function from the SLATEC Common Mathematical Library, still available from www.netlib.org\cite{slatec}. The meaning of the SLATEC acronym is lost in time -- one might guess that the ``S'' stands for ``Sandia'' or ``Scientific'', the ``LA'' likely stands for ``Los Alamos'' and the ``TEC'' conceivably refers to its presumed utility for technical applications (the only header information available in the archived sources suggest that it was developed by a consortium of DOE and DOD national laboratories). Again it is a linear congruential generator, this time one from Knuth that was subjected to a spectral test for certain multipliers to pick the ``best'' one. Again we may safely presume that slatec was used to perform much simulation work in the 80's, quite likely (given its sponsors) in the field of nuclear device design. Let us see what Dieharder makes of it: {\tt \begin{verbatim} #================================================================== # RGB Timing Test # # This test times the selected random number generator only. It is # generally run at the beginning of a run of -a(ll) the tests to provide # some measure of the relative time taken up generating random numbers # for the various generators and tests. #================================================================== #================================================================== # rgb_timing() test using the slatec generator # Average time per rand = 3.582940e+01 nsec. # Rands per second = 2.791004e+07. #================================================================== # RGB Bit Persistence Test # This test generates 256 sequential samples of an random unsigned # integer from the given rng. Successive integers are logically # processed to extract a mask with 1's whereever bits do not # change. Since bits will NOT change when filling e.g. unsigned # ints with 16 bit ints, this mask logically &'d with the maximum # random number returned by the rng. All the remaining 1's in the # resulting mask are therefore significant -- they represent bits # that never change over the length of the test. These bits are # very likely the reason that certain rng's fail the monobit # test -- extra persistent e.g. 1's or 0's inevitably bias the # total bitcount. In many cases the particular bits repeated # appear to depend on the seed. If the -i flag is given, the # entire test is repeated with the rng reseeded to generate a mask # and the extracted mask cumulated to show all the possible bit # positions that might be repeated for different seeds. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 256 (test default is 256) # P-values in final KS test = 1 (test default is 1) # Samples per test run = 256, tsamples ignored # Test run 1 times to cumulate unchanged bit mask #================================================================== # Results # Results for slatec rng, using its 22 valid bits: # (Cumulated mask of zero is good.) # cumulated_mask = 0 = 00000000000000000000000000000000 # randm_mask = 4194303 = 00000000001111111111111111111111 # random_max = 4194303 = 00000000001111111111111111111111 # rgb_persist test PASSED (no bits repeat) #================================================================== #================================================================== # RGB Bit Distribution Test # Accumulates the frequencies of all n-tuples of bits in a list # of random integers and compares the distribution thus generated # with the theoretical (binomial) histogram, forming chisq and the # associated p-value. In this test n-tuples are selected without # WITHOUT overlap (e.g. 01|10|10|01|11|00|01|10) so the samples # are independent. Every other sample is offset modulus of the # sample index and ntuple_max. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) # Testing ntuple = 1 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for RGB Bit Distribution Test # Assessment: # FAILED at < 0.01%. # Generator slatec FAILS at 0.01% for 1-tuplets. rgb_bitdist terminating. #================================================================== # Diehard "Birthdays" test (modified). # Each test determines the number of matching intervals from 512 # "birthdays" (by default) drawn on a 24-bit "year" (by # default). This is repeated 100 times (by default) and the # results cumulated in a histogram. Repeated intervals should be # distributed in a Poisson distribution if the underlying generator # is random enough, and a a chisq and p-value for the test are # evaluated relative to this null hypothesis. # # It is recommended that you run this at or near the original # 100 test samples per p-value with -t 100. # # Two additional parameters have been added. In diehard, nms=512 # but this CAN be varied and all Marsaglia's formulae still work. It # can be reset to different values with -x nmsvalue. # Similarly, nbits "should" 24, but we can really make it anything # we want that's less than or equal to rmax_bits = 32. It can be # reset to a new value with -y nbits. Both default to diehard's # values if no -x or -y options are used. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 100 (test default is 100) # P-values in final KS test = 100 (test default is 100) # 512 samples drawn from 22-bit integers masked out of a # 22 bit random integer. lambda = 8.000000, kmax = 2, tsamples = 100 #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 80| | | | | | | | | | | # | | | | | | | | | | | # 72| | | | | | | | | | | # | | | | | | | | | | | # 64| | | | | |****| | | | | # | | | | | |****| | | | | # 56| | | | | |****| | | | | # | | | | | |****| | | | | # 48| | | | | |****| | | | | # | | | | | |****| | | | | # 40| | | | | |****| | | | | # | | | | | |****| | | | | # 32| | | | | |****| | | | | # | | | | | |****| | | | | # 24|****| | | | |****| | | | | # |****| | | | |****| | | | | # 16|****| | | | |****| | | | | # |****| | | | |****| | | | | # 8|****| | | | |****| | | | | # |****|****| | | |****| | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Birthdays Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Overlapping 5-{}Permutations Test. # This is the OPERM5 test. It looks at a sequence of one mill- # ion 32-bit random integers. Each set of five consecutive # integers can be in one of 120 states, for the 5! possible or- # derings of five numbers. Thus the 5th, 6th, 7th,...numbers # each provide a state. As many thousands of state transitions # are observed, cumulative counts are made of the number of # occurences of each state. Then the quadratic form in the # weak inverse of the 120x120 covariance matrix yields a test # equivalent to the likelihood ratio test that the 120 cell # counts came from the specified (asymptotically) normal dis- # tribution with the specified 120x120 covariance matrix (with # rank 99). This version uses 1,000,000 integers, twice. # # Note that Dieharder runs the test 100 times, not twice, by # default. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 1000000 (test default is 1000000) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^28 for 100 samples. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 80| | | | | | | | | | | # | | | | | | | | | | | # 72| | | | | | | | | | | # | | | | | | | | | | | # 64| | | | | | | | | | | # | | | | | | | | | |****| # 56| | | | | | | | | |****| # | | | | | | | | | |****| # 48| | | | | | | | | |****| # | | | | | | | | | |****| # 40| | | | | | | | | |****| # | | | | | | | | | |****| # 32| | | | | | | | | |****| # | | | | | | | | | |****| # 24| | | | | | | | | |****| # | | | | | | | | | |****| # 16| | | | | | |****| | |****| # | | | | | | |****| | |****| # 8|****|****| | | | |****| | |****| # |****|****| | | | |****| | |****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Overlapping 5-{}permutations Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard 32x32 Binary Rank Test # This is the BINARY RANK TEST for 31x31 matrices. The leftmost # 31 bits of 31 random integers from the test sequence are used # to form a 31x31 binary matrix over the field {0,1}. The rank # is determined. That rank can be from 0 to 31, but ranks< 28 # are rare, and their counts are pooled with those for rank 28. # Ranks are found for (default) 40,000 such random matrices and # a chisquare test is performed on counts for ranks 31,30,29 and # <=28. # # As always, the test is repeated and a KS test applied to the # resulting p-values to verify that they are approximately uniform. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 40000 (test default is 40000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard 32x32 Rank Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard 6x8 Binary Rank Test # This is the BINARY RANK TEST for 6x8 matrices. From each of # six random 32-bit integers from the generator under test, a # specified byte is chosen, and the resulting six bytes form a # 6x8 binary matrix whose rank is determined. That rank can be # from 0 to 6, but ranks 0,1,2,3 are rare; their counts are # pooled with those for rank 4. Ranks are found for 100,000 # random matrices, and a chi-square test is performed on # counts for ranks 6,5 and <=4. # # As always, the test is repeated and a KS test applied to the # resulting p-values to verify that they are approximately uniform. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 100| | | | | | | | | | | # | | | | | | | | | | | # 90| | | | | | | | | | | # | | | | | | | | | | | # 80|****| | | | | | | | | | # |****| | | | | | | | | | # 70|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 50|****| | | | | | | | | | # |****| | | | | | | | | | # 40|****| | | | | | | | | | # |****| | | | | | | | | | # 30|****| | | | | | | | | | # |****| | | | | | | | | | # 20|****| | | | | | | | |****| # |****| | | | | | | | |****| # 10|****| | | | | | | | |****| # |****| | | | | | | | |****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard 6x8 Binary Rank Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Bitstream Test. # The file under test is viewed as a stream of bits. Call them # b1,b2,... . Consider an alphabet with two "letters", 0 and 1 # and think of the stream of bits as a succession of 20-letter # "words", overlapping. Thus the first word is b1b2...b20, the # second is b2b3...b21, and so on. The bitstream test counts # the number of missing 20-letter (20-bit) words in a string of # 2^21 overlapping 20-letter words. There are 2^20 possible 20 # letter words. For a truly random string of 2^21+19 bits, the # number of missing words j should be (very close to) normally # distributed with mean 141,909 and sigma 428. Thus # (j-141909)/428 should be a standard normal variate (z score) # that leads to a uniform [0,1) p value. The test is repeated # twenty times. # # Note that of course we do not "restart file", when using gsl # generators, we just crank out the next random number. # We also do not bother to overlap the words. rands are cheap. # Finally, we repeat the test (usually) more than twenty time. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Bitstream Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Overlapping Pairs Sparse Occupance (OPSO) # The OPSO test considers 2-letter words from an alphabet of # 1024 letters. Each letter is determined by a specified ten # bits from a 32-bit integer in the sequence to be tested. OPSO # generates 2^21 (overlapping) 2-letter words (from 2^21+1 # "keystrokes") and counts the number of missing words---that # is 2-letter words which do not appear in the entire sequence. # That count should be very close to normally distributed with # mean 141,909, sigma 290. Thus (missingwrds-141909)/290 should # be a standard normal variable. The OPSO test takes 32 bits at # a time from the test file and uses a designated set of ten # consecutive bits. It then restarts the file for the next de- # signated 10 bits, and so on. # # Note 2^21 = 2097152, tsamples cannot be varied. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard OPSO Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Overlapping Quadruples Sparce Occupancy (OQSO) Test # # Similar, to OPSO except that it considers 4-letter # words from an alphabet of 32 letters, each letter determined # by a designated string of 5 consecutive bits from the test # file, elements of which are assumed 32-bit random integers. # The mean number of missing words in a sequence of 2^21 four- # letter words, (2^21+3 "keystrokes"), is again 141909, with # sigma = 295. The mean is based on theory; sigma comes from # extensive simulation. # # Note 2^21 = 2097152, tsamples cannot be varied. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard OQSO Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard DNA Test. # # The DNA test considers an alphabet of 4 letters:: C,G,A,T, # determined by two designated bits in the sequence of random # integers being tested. It considers 10-letter words, so that # as in OPSO and OQSO, there are 2^20 possible words, and the # mean number of missing words from a string of 2^21 (over- # lapping) 10-letter words (2^21+9 "keystrokes") is 141909. # The standard deviation sigma=339 was determined as for OQSO # by simulation. (Sigma for OPSO, 290, is the true value (to # three places), not determined by simulation. # # Note 2^21 = 2097152 # Note also that we don't bother with overlapping keystrokes # (and sample more rands -- rands are now cheap). #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 2097152 (test default is 2097152) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard DNA Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Count the 1s (stream) (modified) Test. # Consider the file under test as a stream of bytes (four per # 32 bit integer). Each byte can contain from 0 to 8 1's, # with probabilities 1,8,28,56,70,56,28,8,1 over 256. Now let # the stream of bytes provide a string of overlapping 5-letter # words, each "letter" taking values A,B,C,D,E. The letters are # determined by the number of 1's in a byte:: 0,1,or 2 yield A, # 3 yields B, 4 yields C, 5 yields D and 6,7 or 8 yield E. Thus # we have a monkey at a typewriter hitting five keys with vari- # ous probabilities (37,56,70,56,37 over 256). There are 5^5 # possible 5-letter words, and from a string of 256,000 (over- # lapping) 5-letter words, counts are made on the frequencies # for each word. The quadratic form in the weak inverse of # the covariance matrix of the cell counts provides a chisquare # test:: Q5-Q4, the difference of the naive Pearson sums of # (OBS-EXP)^2/EXP on counts for 5- and 4-letter cell counts. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 256000 (test default is 256000) # P-values in final KS test = 100 (test default is 100) # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Count the 1s (stream) # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Count the 1s Test (byte) (modified). # This is the COUNT-THE-1's TEST for specific bytes. # Consider the file under test as a stream of 32-bit integers. # From each integer, a specific byte is chosen , say the left- # most:: bits 1 to 8. Each byte can contain from 0 to 8 1's, # with probabilitie 1,8,28,56,70,56,28,8,1 over 256. Now let # the specified bytes from successive integers provide a string # of (overlapping) 5-letter words, each "letter" taking values # A,B,C,D,E. The letters are determined by the number of 1's, # in that byte:: 0,1,or 2 ---> A, 3 ---> B, 4 ---> C, 5 ---> D, # and 6,7 or 8 ---> E. Thus we have a monkey at a typewriter # hitting five keys with with various probabilities:: 37,56,70, # 56,37 over 256. There are 5^5 possible 5-letter words, and # from a string of 256,000 (overlapping) 5-letter words, counts # are made on the frequencies for each word. The quadratic form # in the weak inverse of the covariance matrix of the cell # counts provides a chisquare test:: Q5-Q4, the difference of # the naive Pearson sums of (OBS-EXP)^2/EXP on counts for 5- # and 4-letter cell counts. # # Note: We actually cycle samples over all 0-31 bit offsets, so # that if there is a problem with any particular offset it has # a chance of being observed. One can imagine problems with odd # offsets but not even, for example, or only with the offset 7. # tsamples and psamples can be freely varied, but you'll likely # need tsamples >> 100,000 to have enough to get a reliable kstest # result. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 256000 (test default is 256000) # P-values in final KS test = 100 (test default is 100) # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96|****| | | | | | | | | | # |****| | | | | | | | | | # 84|****| | | | | | | | | | # |****| | | | | | | | | | # 72|****| | | | | | | | | | # |****| | | | | | | | | | # 60|****| | | | | | | | | | # |****| | | | | | | | | | # 48|****| | | | | | | | | | # |****| | | | | | | | | | # 36|****| | | | | | | | | | # |****| | | | | | | | | | # 24|****| | | | | | | | | | # |****| | | | | | | | | | # 12|****| | | | | | | | | | # |****| | | | | | | | | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Count the 1s (byte) # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Parking Lot Test (modified). # This tests the distribution of attempts to randomly park a # square car of length 1 on a 100x100 parking lot without # crashing. We plot n (number of attempts) versus k (number of # attempts that didn't "crash" because the car squares # overlapped and compare to the expected result from a perfectly # random set of parking coordinates. This is, alas, not really # known on theoretical grounds so instead we compare to n=12,000 # where k should average 3523 with sigma 21.9 and is very close # to normally distributed. Thus (k-3523)/21.9 is a standard # normal variable, which converted to a uniform p-value, provides # input to a KS test with a default 100 samples. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 0 (test default is 0) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 60| | | | | | | | | | | # | | | | | | | | | | | # 54| | | | | | | | | | | # | | | | | | | | | | | # 48| | | | | | | | | | | # | | | | | | | | | | | # 42| | | | | | | | | | | # | | | | | | |****| | | | # 36| | | | | | |****| | | | # | | | | | | |****| | | | # 30| | | | | | |****|****| | | # | | | | | | |****|****| | | # 24| | | | | | |****|****| | | # | | | | | | |****|****| | | # 18| | | | | | |****|****| | | # | | | | | | |****|****| | | # 12| | | | | |****|****|****| | | # | | | |****| |****|****|****| | | # 6| | |****|****| |****|****|****| | | # | | |****|****| |****|****|****| | | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Parking Lot Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Minimum Distance (2d Circle) Test # It does this 100 times:: choose n=8000 random points in a # square of side 10000. Find d, the minimum distance between # the (n^2-n)/2 pairs of points. If the points are truly inde- # pendent uniform, then d^2, the square of the minimum distance # should be (very close to) exponentially distributed with mean # .995 . Thus 1-exp(-d^2/.995) should be uniform on [0,1) and # a KSTEST on the resulting 100 values serves as a test of uni- # formity for random points in the square. Test numbers=0 mod 5 # are printed but the KSTEST is based on the full set of 100 # random choices of 8000 points in the 10000x10000 square. # # This test uses a fixed number of samples -- tsamples is ignored. # It also uses the default value of 100 psamples in the final # KS test, for once agreeing precisely with Diehard. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 8000 (test default is 8000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96| | | | | | | | | |****| # | | | | | | | | | |****| # 84| | | | | | | | | |****| # | | | | | | | | | |****| # 72| | | | | | | | | |****| # | | | | | | | | | |****| # 60| | | | | | | | | |****| # | | | | | | | | | |****| # 48| | | | | | | | | |****| # | | | | | | | | | |****| # 36| | | | | | | | | |****| # | | | | | | | | | |****| # 24| | | | | | | | | |****| # | | | | | | | | | |****| # 12| | | | | | | | | |****| # | | | | | | | | | |****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Minimum Distance (2d Circle) Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard 3d Sphere (Minimum Distance) Test # Choose 4000 random points in a cube of edge 1000. At each # point, center a sphere large enough to reach the next closest # point. Then the volume of the smallest such sphere is (very # close to) exponentially distributed with mean 120pi/3. Thus # the radius cubed is exponential with mean 30. (The mean is # obtained by extensive simulation). The 3DSPHERES test gener- # ates 4000 such spheres 20 times. Each min radius cubed leads # to a uniform variable by means of 1-exp(-r^3/30.), then a # KSTEST is done on the 20 p-values. # # This test ignores tsamples, and runs the usual default 100 # psamples to use in the final KS test. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 4000 (test default is 4000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 120| | | | | | | | | | | # | | | | | | | | | | | # 108| | | | | | | | | | | # | | | | | | | | | | | # 96| | | | | | | | | |****| # | | | | | | | | | |****| # 84| | | | | | | | | |****| # | | | | | | | | | |****| # 72| | | | | | | | | |****| # | | | | | | | | | |****| # 60| | | | | | | | | |****| # | | | | | | | | | |****| # 48| | | | | | | | | |****| # | | | | | | | | | |****| # 36| | | | | | | | | |****| # | | | | | | | | | |****| # 24| | | | | | | | | |****| # | | | | | | | | | |****| # 12| | | | | | | | | |****| # | | | | | | | | | |****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard 3d Sphere (Minimum Distance) Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Squeeze Test. # Random integers are floated to get uniforms on [0,1). Start- # ing with k=2^31=2147483647, the test finds j, the number of # iterations necessary to reduce k to 1, using the reduction # k=ceiling(k*U), with U provided by floating integers from # the file being tested. Such j's are found 100,000 times, # then counts for the number of times j was <=6,7,...,47,>=48 # are used to provide a chi-square test for cell frequencies. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | | | | | | | # | | | | | | | | | | | # 28| | | | | | | | | | | # | | | | | | | | | |****| # 24| | | | | | | | | |****| # | | | | | | | | | |****| # 20| | |****| | | | | | |****| # | | |****| | | | | | |****| # 16| | |****| | | |****| | |****| # | | |****| | | |****|****| |****| # 12| | |****| |****| |****|****| |****| # | | |****| |****| |****|****| |****| # 8| |****|****| |****| |****|****| |****| # | |****|****| |****| |****|****| |****| # 4| |****|****| |****| |****|****| |****| # | |****|****| |****| |****|****| |****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Squeeze Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Sums Test # Integers are floated to get a sequence U(1),U(2),... of uni- # form [0,1) variables. Then overlapping sums, # S(1)=U(1)+...+U(100), S2=U(2)+...+U(101),... are formed. # The S's are virtually normal with a certain covariance mat- # rix. A linear transformation of the S's converts them to a # sequence of independent standard normals, which are converted # to uniform variables for a KSTEST. The p-values from ten # KSTESTs are given still another KSTEST. # # Note well: -O causes the old diehard version to be run (more or # less). Omitting it causes non-overlapping sums to be used and # directly tests the overall balance of uniform rands. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 100 (test default is 100) # P-values in final KS test = 100 (test default is 100) # Number of rands required is around 2^21 per psample. # Using non-overlapping samples (default). #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 80| | | | | | | | | | | # | | | | | | | | | |****| # 72| | | | | | | | | |****| # | | | | | | | | | |****| # 64| | | | | | | | | |****| # | | | | | | | | | |****| # 56| | | | | | | | | |****| # | | | | | | | | | |****| # 48| | | | | | | | | |****| # | | | | | | | | | |****| # 40| | | | | | | | | |****| # | | | | | | | | | |****| # 32| | | | | | | | | |****| # | | | | | | | | | |****| # 24| | | | | | | | | |****| # | | | | | | | | | |****| # 16| | | | | | | | | |****| # | | | | | | | | |****|****| # 8| | | | | | | |****|****|****| # | | | | | | | |****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Diehard Sums Test # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Runs Test # This is the RUNS test. It counts runs up, and runs down, # in a sequence of uniform [0,1) variables, obtained by float- # ing the 32-bit integers in the specified file. This example # shows how runs are counted: .123,.357,.789,.425,.224,.416,.95 # contains an up-run of length 3, a down-run of length 2 and an # up-run of (at least) 2, depending on the next values. The # covariance matrices for the runs-up and runs-down are well # known, leading to chisquare tests for quadratic forms in the # weak inverses of the covariance matrices. Runs are counted # for sequences of length 10,000. This is done ten times. Then # repeated. # # In Dieharder sequences of length tsamples = 100000 are used by # default, and 100 p-values thus generated are used in a final # KS test. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | | | | | | | # | | | | | | | | | | | # 28| | | | | | | | | | | # | | | | |****| | | | | | # 24| | | | |****| | | | | | # | | | | |****| | | | | | # 20| | | |****|****| | |****| | | # | | | |****|****| | |****| | | # 16| | | |****|****| |****|****| | | # | | | |****|****| |****|****| | | # 12| | | |****|****| |****|****| | | # | | | |****|****| |****|****| | | # 8| | |****|****|****| |****|****|****| | # | | |****|****|****| |****|****|****| | # 4| | |****|****|****| |****|****|****| | # | | |****|****|****| |****|****|****| | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Runs (up) # Assessment: # FAILED at < 0.01%. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | |****| | | | | # | | | | | |****| | | | | # 28| | | | | |****| | | | | # | | | | | |****| | | | | # 24| | | | | |****| | | | | # | | | | | |****| | | | | # 20| | | | | |****| | | | | # | | | | |****|****| | | | | # 16| | | | |****|****| | |****| | # | | | | |****|****| | |****| | # 12| | | | |****|****| |****|****| | # | | | |****|****|****| |****|****| | # 8|****| | |****|****|****| |****|****| | # |****| | |****|****|****| |****|****| | # 4|****| | |****|****|****| |****|****| | # |****| | |****|****|****| |****|****| | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Runs (down) # Assessment: # FAILED at < 0.01%. #================================================================== # Diehard Craps Test # This is the CRAPS TEST. It plays 200,000 games of craps, finds # the number of wins and the number of throws necessary to end # each game. The number of wins should be (very close to) a # normal with mean 200000p and variance 200000p(1-p), with # p=244/495. Throws necessary to complete the game can vary # from 1 to infinity, but counts for all>21 are lumped with 21. # A chi-square test is made on the no.-of-throws cell counts. # Each 32-bit integer from the test file provides the value for # the throw of a die, by floating to [0,1), multiplying by 6 # and taking 1 plus the integer part of the result. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 200000 (test default is 200000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | |****| | | | | | | # | | | |****| | | |****| | | # 32| | | |****| | | |****| | | # | | | |****| | | |****| | | # 28| | | |****| | | |****| | | # | | | |****| | | |****| | | # 24| | | |****| | | |****| | | # | | | |****| | | |****| | | # 20| | | |****| | | |****| | | # | | | |****| | | |****| | | # 16| | | |****| | | |****| | | # | | | |****| | | |****| |****| # 12| | | |****| | | |****| |****| # | | | |****| | | |****| |****| # 8| | | |****| | |****|****| |****| # | | | |****| | |****|****|****|****| # 4| | | |****| | |****|****|****|****| # | | | |****| | |****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Craps Test (mean) # Assessment: # FAILED at < 0.01%. #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | | | | | | | # | | | | | | | | |****| | # 28| | | | | | | | |****| | # | | | | | | | | |****| | # 24| | | | | | | |****|****| | # | | | | | |****| |****|****| | # 20| | | | | |****| |****|****| | # | | | | | |****| |****|****| | # 16| | | | | |****| |****|****| | # | | | | | |****|****|****|****| | # 12| | | | | |****|****|****|****| | # | | | | | |****|****|****|****| | # 8| | | | | |****|****|****|****| | # | | | | | |****|****|****|****|****| # 4| | | | | |****|****|****|****|****| # | | | | | |****|****|****|****|****| # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for Craps Test (freq) # Assessment: # FAILED at < 0.01%. #================================================================== # STS Monobit Test # Very simple. Counts the 1 bits in a long string of random uints. # Compares to expected number, generates a p-value directly from # erfc(). Very effective at revealing overtly weak generators; # Not so good at determining where stronger ones eventually fail. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | | | | | | | # | | | | | | | | | | | # 28| | | | | | | | | | | # | | |****| |****| | | | | | # 24| | |****| |****| | | | | | # | | |****| |****| | | | | | # 20| | |****| |****| | | | | | # | | |****| |****| | | | | | # 16| | |****| |****| | | | | | # | | |****| |****| | | | | | # 12| | |****|****|****| |****| | | | # | | |****|****|****|****|****| |****| | # 8| | |****|****|****|****|****| |****| | # | | |****|****|****|****|****| |****| | # 4| | |****|****|****|****|****| |****| | # | | |****|****|****|****|****| |****| | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for STS Monobit Test # Assessment: # FAILED at < 0.01%. #================================================================== # STS Runs Test # Counts the total number of 0 runs + total number of 1 runs across # a sample of bits. Note that a 0 run must begin with 10 and end # with 01. Note that a 1 run must begin with 01 and end with a 10. # This test, run on a bitstring with cyclic boundary conditions, is # absolutely equivalent to just counting the 01 + 10 bit pairs. # It is therefore totally redundant with but not as good as the # rgb_bitdist() test for 2-tuples, which looks beyond the means to the # moments, testing an entire histogram of 00, 01, 10, and 11 counts # to see if it is binomially distributed with p = 0.25. #================================================================== # Run Details # Random number generator tested: slatec # Samples per test pvalue = 100000 (test default is 100000) # P-values in final KS test = 100 (test default is 100) #================================================================== # Histogram of p-values # Counting histogram bins, binscale = 0.100000 # 40| | | | | | | | | | | # | | | | | | | | | | | # 36| | | | | | | | | | | # | | | | | | | | | | | # 32| | | | | | | | |****| | # | | | | | | | | |****| | # 28| | | | | | | | |****| | # | | | |****| | | | |****| | # 24| | | |****| | | |****|****| | # | | | |****| | | |****|****| | # 20| | | |****| | | |****|****| | # | | | |****| | | |****|****| | # 16| | | |****|****| | |****|****| | # | | | |****|****| | |****|****| | # 12| | | |****|****| | |****|****| | # | | | |****|****| | |****|****| | # 8| | | |****|****| | |****|****| | # | | | |****|****| | |****|****| | # 4| | | |****|****| | |****|****| | # | | | |****|****| | |****|****| | # |-------------------------------------------------- # | 0.1| 0.2| 0.3| 0.4| 0.5| 0.6| 0.7| 0.8| 0.9| 1.0| #================================================================== # Results # Kuiper KS: p = 0.000000 for STS Runs Test # Assessment: # FAILED at < 0.01%. \end{verbatim} } From the above we see that where randu was merely bad, slatec is downright {\em ugly}. It is about the same speed as mt19937\_1999. It has only {\em 22 bits} in the numbers it returns (a span of only about four million numbers!) It again fails to be even 1-bit random according to the bit distribution test. It then proceeds to fail {\em all of the tests for randomness!} Even tests that one might expect to be relatively insensitive to its small number of bits (such as the parking lot and runs test) are failed badly. Note that in a {\em number} of cases the failure is one that {\em requires} the final KS test of the returned test $p$-values. Those $p$-values themselves are not necessarily poor -- in the case of the Diehard sums test, for example, they are all very close to 1.0! They are just completely incorrectly distributed. The slatec RNG as implemented in the GSL holds a special place in my heart, as it is the perfect generator to use to demonstrate {\em failure} of the null hypothesis in a random number test. This is actually rather rare -- all but a very few of the RNGs incapsulated in the GSL will pass at least a few Diehard(er) tests with the defaults. slatec is a generator that I wouldn't hesitate to list {\em unsuitable for any purpose} -- except, of course, demonstrating the unambiguous failure of an RNG test in Dieharder. \chapter{Conclusions} The \die results presented above show the practical utility of adding controls to and generalizing RNG testing suites so that their ability to discriminate failure of a RNG (rejection of the null hypothesis) can be tuned to the needs of the user. \die has also showed the danger of treating the passing of any such suite of tests for fixed values and {\em lacking} such controls as the defining property of a ``good'' RNG. RNGs will all fail at least some tests for randomness at some point because the sequences they produce are not, in fact, truly random. However, a good RNG may have to be pushed {\em very hard} to demonstrate a failure of randomness, and even when pushed may only fail {\em some} tests. Indeed, at some point the validity of the tests themselves may fail because of numerical problems other than the quality of the RNG. Even in its infancy, \die has proven to be a useful tool for studying RNGs, and the encapsulation of RNGs that one might wish to study in the tightly-integrated GSL promises to facilitate many projects that study RNGs or wish to test library-based RNGs for suitability in some numerical application. Because it is a fully GPL tool, both the tool itself and all modifications of the tool that might be distributed must be provided {\em with immediate access to the source} so that one will never find oneself in the position of using a binary program as a ``black box'' and therefore uncertain as to whether some particular failure observed is due to a failure of the RNG or rather due to a bug in the program. Access to the code means that one can add input or output statements to any routine as required to {\em validate} the operation of any test. This can be very important; one might wish to be {\em certain} that a generator that is ``supposed'' to be random (perhaps one built on the basis of a quantum process believed to be random on theoretical grounds) but that fails some \die test indeed {\em does} fail that test. \die is indeed, though, still regrettably incomplete. Although all of the Diehard tests are encapsulated, many STS tests and many tests suggested by Knuth are not yet encapsulated. There is also no practical limit on the number of ways one {\em can} test RNGs, and the availability of a convenient and consistent interface for encapsulating new tests should, it is hoped, encourange the development of altogether new ones. In addition, \die will eventually be given a graphical user interface (likely inherited from $R$) and the ability to execute tests on a cluster. These two additions will both make the tool easier to play with and use and much faster, so that more complex tests can be performed on longer sequences of numbers. A graphical interface has additional advantages as well -- many random number generators fail because they decompose into hyperplanes in a high enough dimensionality. Although this can be tested for numerically, it is certainly desireable to be able to visualize it as well, and visualization may well reveal {\em new} patterns of RNG failure that are {\em not} detected by any known tests. Numerically generated random numbers play an increasingly important role in many statistical applications from business and gaming through physics and mathematics. Sophisticated tests are thereby required to validate RNGs for suitability in many different roles. \die is a good platform upon which to develop those tests, in addition to being a pretty good set of tests already. \input OPL.tex \end{document} ./manual/Makefile0000664000175000017500000004050213707057144012215 0ustar eddedd# Makefile.in generated by automake 1.16.1 from Makefile.am. # manual/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994-2018 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. am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/dieharder pkgincludedir = $(includedir)/dieharder pkglibdir = $(libdir)/dieharder pkglibexecdir = $(libexecdir)/dieharder am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = x86_64-pc-linux-gnu host_triplet = x86_64-pc-linux-gnu subdir = manual ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = macros.tex CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_$(V)) am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ am__v_at_1 = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/macros.tex.in \ $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = /bin/bash ./missing --run aclocal ACLOCAL_AMFLAGS = -I m4 ACTAR = /bin/bash ./missing --run tar AMTAR = $${TAR-tar} AM_DEFAULT_VERBOSITY = 1 AR = ar AUTOCONF = /bin/bash ./missing --run autoconf;echo "Run ./configure";exit AUTOHEADER = /bin/bash ./missing --run autoheader AUTOMAKE = /bin/bash ./missing --run automake --add-missing --copy --gnu AWK = gawk CC = ccache gcc-10 CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 CPP = ccache gcc-10 -E CPPFLAGS = CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DIEHARDER_CFLAGS = -I${prefix}/include DIEHARDER_LIBS = -L${exec_prefix}/lib -ldieharder DIEHARDER_LIB_VERSION = 3.31.1 DIEHARDER_LT_VERSION = 3:31:1 DLLTOOL = false DSYMUTIL = DUMPBIN = ECHO_C = ECHO_N = -n ECHO_T = EGREP = /bin/grep -E EXEEXT = FGREP = /bin/grep -F GREP = /bin/grep INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s LD = /usr/bin/ld -m elf_x86_64 LDFLAGS = LIBOBJS = LIBS = -lgsl -lgslcblas LIBTOOL = $(SHELL) $(top_builddir)/libtool LIBTOOL_DEPS = ./ltmain.sh LIPO = LITTLE_ENDIAN = 1 LN_S = ln -s LTLIBOBJS = LT_SYS_LIBRARY_PATH = MAKEINFO = ${SHELL} /home/edd/git/dieharder/missing makeinfo MANIFEST_TOOL = : MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = OBJDUMP = objdump OBJEXT = o OTOOL = OTOOL64 = PACKAGE = dieharder PACKAGE_BUGREPORT = PACKAGE_NAME = dieharder PACKAGE_STRING = dieharder 3.31.1 PACKAGE_TARNAME = dieharder PACKAGE_URL = PACKAGE_VERSION = 3.31.1 PATH_SEPARATOR = : RANLIB = ranlib RELEASE = 1 RELEASED = SED = /bin/sed SET_MAKE = SHELL = /bin/bash STRIP = strip VERSION = 0.1 abs_builddir = /home/edd/git/dieharder/manual abs_srcdir = /home/edd/git/dieharder/manual abs_top_builddir = /home/edd/git/dieharder abs_top_srcdir = /home/edd/git/dieharder ac_ct_AR = ar ac_ct_CC = ccache gcc-10 ac_ct_DUMPBIN = am__include = include am__leading_dot = . am__quote = am__tar = $${TAR-tar} chof - "$$tardir" am__untar = $${TAR-tar} xf - bindir = ${exec_prefix}/bin build = x86_64-pc-linux-gnu build_alias = build_cpu = x86_64 build_os = linux-gnu build_vendor = pc builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share dieharder_CFLAGS = -std=c99 -Wall -pedantic -I${prefix}/include docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} host = x86_64-pc-linux-gnu host_alias = host_cpu = x86_64 host_os = linux-gnu host_vendor = pc htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /home/edd/git/dieharder/install-sh libdieharder_lo_CFLAGS = -Wall -pedantic -I${prefix}/include libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = $(MKDIR_P) oldincludedir = /usr/include pdfdir = ${docdir} prefix = /usr/local program_transform_name = s,x,x, psdir = ${docdir} runstatedir = ${localstatedir}/run sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com srcdir = . sysconfdir = ${prefix}/etc target_alias = top_build_prefix = ../ top_builddir = .. top_srcdir = .. SOURCE = dieharder.tex SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/dieharder SVNTIME = $(HOME/Src/Projects/dieharder/dieharder.svn.time) # The list of includes are things required for the build to work. Examples # might be included .tex or .sty files, embedded .eps files, and so forth. # Naturally, anything on this list should be in the SVN tree. # FIGS = $(shell ls *.fig 2>&1 | grep -v "No such file or directory" | sed -e "/\/bin\/ls:/d") # FEPS = $(FIGS:.fig=.eps) # INCLUDE = $(FIGS) # Source(s) and production objects. SOURCES = $(SOURCE) LOGS = $(SOURCE:.tex=.log) TOC = $(SOURCE:.tex=.toc) AUX = $(SOURCE:.tex=.aux) ERR = $(SOURCE:.tex=.err) DVI = $(SOURCE:.tex=.dvi) PS = $(SOURCE:.tex=.ps) PDF = $(SOURCE:.tex=.pdf) A4PS = $(SOURCE:.tex=.a4.ps) A4PDF = $(SOURCE:.tex=.a4.pdf) HTMLDIR = $(SOURCE:.tex=) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu manual/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu manual/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): macros.tex: $(top_builddir)/config.status $(srcdir)/macros.tex.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf-am: ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # Build targets (from rules) all: $(PDF) ps: $(DVI) $(PS) pdf: $(DVI) $(PS) $(PDF) a4ps: $(DVI) $(A4PS) a4pdf: $(DVI) $(A4PS) $(A4PDF) tar: $(TAR) tgz: $(TGZ) # # These should run in the doc directory, although a commit one level up # will work too... # svn: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) # Clean up all the junk build files and output formats to save space. clean: rm -f $(DVI) $(AUX) $(LOGS) $(TOC) $(ERR) $(PS) $(PDF) install: $(PDF) cp $(PDF) .. # # RULES FOR BUILDING STANDARD TARGETS # # Rule for making dvi out of tex. Do it twice to build table of contents # and resolve forward references. %.dvi:%.tex $(SOURCES) latex $< $@ latex $< $@ # Rule for making postscript image %.ps:%.dvi dvips -Pamz -Pcmz -o $@ $< # Rule for making pdf image %.pdf:%.ps ps2pdf $< # Rule for making postscript image %.a4.ps:%.dvi dvips -Pamz -Pcmz -t A4 -o $@ $< # Rule for making pdf image %.a4.pdf:%.a4.ps ps2pdf $< # Rule for making .fig->.eps %.eps:%.fig fig2dev -L eps $< > $@ # 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: ./manual/dieharder.out0000664000175000017500000000273213707046103013231 0ustar eddedd\BOOKMARK [0][-]{chapter.1}{Introduction}{} \BOOKMARK [0][-]{chapter.2}{Testing Random Number Generators}{} \BOOKMARK [0][-]{chapter.3}{Evaluating p-values}{} \BOOKMARK [1][-]{section.3.1}{Xtest -- A Single Expected Value}{chapter.3} \BOOKMARK [1][-]{section.3.2}{Vtest -- A Vector of Expected Values}{chapter.3} \BOOKMARK [2][-]{subsection.3.2.1}{Kolmogorov-Smirnov Test}{section.3.2} \BOOKMARK [1][-]{section.3.3}{The Test Histogram}{chapter.3} \BOOKMARK [0][-]{chapter.4}{Diehard}{} \BOOKMARK [1][-]{section.4.1}{The Original Diehard}{chapter.4} \BOOKMARK [1][-]{section.4.2}{The Dieharder Modifications}{chapter.4} \BOOKMARK [0][-]{chapter.5}{Dieharder's Modular Test Structure}{} \BOOKMARK [0][-]{chapter.6}{Dieharder Extensions}{} \BOOKMARK [1][-]{section.6.1}{STS Tests}{chapter.6} \BOOKMARK [1][-]{section.6.2}{New Tests}{chapter.6} \BOOKMARK [1][-]{section.6.3}{Future \(Proposed or Planned\) Tests}{chapter.6} \BOOKMARK [0][-]{chapter.7}{Results for Selected Generators}{} \BOOKMARK [1][-]{subsection.7.0.1}{A Good Generator: mt19937\1371999}{chapter.7} \BOOKMARK [2][-]{subsection.7.0.2}{Comments}{subsection.7.0.1} \BOOKMARK [1][-]{section.7.1}{A Bad Generator: randu}{chapter.7} \BOOKMARK [1][-]{section.7.2}{An Ugly Generator: slatec}{chapter.7} \BOOKMARK [0][-]{chapter.8}{Conclusions}{} \BOOKMARK [0][-]{appendix.A}{License Terms}{} \BOOKMARK [1][-]{section.A.1}{General Terms}{appendix.A} \BOOKMARK [1][-]{section.A.2}{OPEN PUBLICATION LICENSE Draft v0.4, 8 June 1999}{appendix.A} ./manual/macros.tex0000664000175000017500000002060213707057144012562 0ustar eddedd% This file is filled in by ../configure. Do not edit this file by % hand! Make changes in macros.tex.in instead. % % Macros for dieharder.tex % % These macros basicallypermit one to shorten typing -- it is much easier % to type \be than \begin{equation}. Others encapsulate complex commands, % such as commands that add dynamic links to wikipedia content (which is % VERY USEFUL for online content! I'm quite proud of my "\wikinote{}" % below, as it is nearly a one-stop-shop for references these days. % \newcommand{\version}{3.31.1} %======================================================================== % These are some macros I find useful doing e.g. physics textbooks. % Some just shorten typing -- it is much easier to % type \be than \begin{equation}. Others encapsulate complex commands, % such as commands that add dynamic links to wikipedia content (which is % VERY USEFUL for online content! I'm quite proud of my "\wikinote{}" % below, as it is nearly a one-stop-shop for references these days. %======================================================================== \newcommand{\mb}[1]{\mbox{\boldmath $#1$}} \ifx \Vec \undefined \newcommand{\Vec}[1]{\mbox{\boldmath $\vec{#1}$}} \else \renewcommand{\Vec}[1]{\mbox{\boldmath $\vec{#1}$}} \fi \newcommand{\sVec}[1]{\mbox{\scriptsize \boldmath $#1$}} \newcommand{\Mat}[1]{\stackrel{\Leftrightarrow}{\mbox{\boldmath $#1$}}} \ifx \Hat \undefined \newcommand{\Hat}[1]{\mbox{\boldmath $\hat{#1}$}} \else \renewcommand{\Hat}[1]{\mbox{\boldmath $\hat{#1}$}} \fi \newcommand{\sHat}[1]{\hat{\mbox{\scriptsize \boldmath $#1$}}} \newcommand{\deriv}[2]{\frac{d #1}{d #2}} \newcommand{\ddt}[1]{\frac{d #1}{dt}} \newcommand{\dderiv}[2]{\frac{d^2 #1}{d #2^2}} \newcommand{\ddtsq}[1]{\frac{d^2 #1}{d t^2}} \newcommand{\partialdiv}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\ppartialdiv}[2]{\frac{\partial^2 #1}{\partial #2^2}} \newcommand{\del}{\Vec{\nabla}} \newcommand{\grad}{\Vec{\nabla}} \newcommand{\deldot}{\del \cdot} \newcommand{\curl}{\del \times} \newcommand{\lapl}{\nabla^2} \newcommand{\vsh}[2]{\Vec{Y}_{#1}^{#2}} \newcommand{\abs}[1]{\left| #1 \right|} \newcommand{\RE}{\rm I \hspace{-.180em} R} \newcommand{\be}{ \begin{equation} } \newcommand{\ee}{ \end{equation} } \newcommand{\bea}{ \begin{eqnarray} } \newcommand{\eea}{ \end{eqnarray} } \newcommand{\ba}{\begin{array}} \newcommand{\ea}{\end{array}} \newcommand{\ben}{ \begin{enumerate} } \newcommand{\een}{ \end{enumerate} } \newcommand{\bit}{ \begin{itemize} } \newcommand{\eit}{ \end{itemize} } \newcommand{\bv}{ \begin{verbatim} } % one cannot end verbatim with a macro, as the macro % is interpreted as verbatim text, duh... % Here's a useful one for the Dieharder book: \newcommand{\die}{\emph{Dieharder}\ } \newcommand{\spade}{\framebox{$\spadesuit$}} \newcommand{\heart}{\framebox{$\heartsuit$}} \renewcommand{\diamond}{\framebox{$\diamondsuit$}} \newcommand{\club}{\framebox{$\clubsuit$}} \newcommand{\notrump}{\framebox{\rule[2.75mm]{0cm}{0cm}\rule[-0.5mm]{0cm}{0cm}\ \ }} \newcommand{\half}{\frac{1}{2}} \newcommand{\tot}{ {\rm tot} } \newcommand{\link}[2]{\htmladdnormallink{#1}{#2}} \newcommand{\wikilink}[1]{Wikipedia: \htmladdnormallink{http://www.wikipedia.org/wiki/#1}{http://www.wikipedia.org/wiki/#1}} \newcommand{\GIYF}{ \htmladdnormallink{GIYF}{http://www.google.com} } \newcommand{\WIYF}{\htmladdnormallink{WIYF}{http://www.wikipedia.org} } \newcommand{\MWIYF}{\htmladdnormallink{MWIYF}{http://mathworld.wolfram.com}} \newcommand{\webnote}[2]{\footnote{Internet: \htmladdnormallink{#1 }{#1 } #2}} \newcommand{\wikinote}[2]{\footnote{Wikipedia: \htmladdnormallink{http://www.wikipedia.org/wiki/#1.}{http://www.wikipedia.org/wiki/#1} #2} } \newcommand{\googlenote}[2]{\footnote{GIYF: \htmladdnormallink{#1 }{http://www.google.com/search?hl=en&lr=&q=#1&btnG=Search} #2} } % Really I should just go ahead and define a bloody alphabet of the % defs below... \newcommand{\vbeta}{\Vec{\beta}} \newcommand{\vA}{\Vec{A}} \newcommand{\vB}{\Vec{B}} \newcommand{\vC}{\Vec{C}} \newcommand{\vD}{\Vec{D}} \newcommand{\vE}{\Vec{E}} \newcommand{\vF}{\Vec{F}} \newcommand{\vG}{\Vec{G}} \newcommand{\vH}{\Vec{H}} \newcommand{\vI}{\Vec{I}} \newcommand{\vJ}{\Vec{J}} \newcommand{\vL}{\Vec{L}} \newcommand{\vM}{\Vec{M}} \newcommand{\vN}{\Vec{N}} \newcommand{\vO}{\Vec{O}} \newcommand{\vP}{\Vec{P}} \newcommand{\vQ}{\Vec{Q}} \newcommand{\vR}{\Vec{R}} \newcommand{\vS}{\Vec{S}} \newcommand{\vT}{\Vec{T}} \newcommand{\vU}{\Vec{U}} \newcommand{\vV}{\Vec{V}} \newcommand{\vW}{\Vec{W}} \newcommand{\vX}{\Vec{X}} \newcommand{\vY}{\Vec{Y}} \newcommand{\vZ}{\Vec{Y}} \newcommand{\va}{\Vec{a}} \newcommand{\vb}{\Vec{b}} \newcommand{\vc}{\Vec{c}} \newcommand{\vd}{\Vec{d}} \newcommand{\ve}{\Vec{e}} \newcommand{\vf}{\Vec{f}} \newcommand{\vg}{\Vec{g}} \newcommand{\vh}{\Vec{h}} \newcommand{\vi}{\Vec{i}} \newcommand{\vj}{\Vec{j}} \newcommand{\vk}{\Vec{k}} \newcommand{\vl}{\Vec{l}} \newcommand{\vm}{\Vec{m}} \newcommand{\vn}{\Vec{n}} \newcommand{\vo}{\Vec{o}} \newcommand{\vp}{\Vec{p}} \newcommand{\vq}{\Vec{q}} \newcommand{\vr}{\Vec{r}} \newcommand{\vs}{\Vec{s}} \newcommand{\vt}{\Vec{t}} \newcommand{\vu}{\Vec{u}} \newcommand{\vv}{\Vec{v}} \newcommand{\vx}{\Vec{x}} \newcommand{\vy}{\Vec{y}} \newcommand{\vz}{\Vec{z}} \newcommand{\vell}{\Vec{\ell}} \newcommand{\valpha}{\Vec{\alpha}} \newcommand{\vtau}{\Vec{\tau}} \newcommand{\vomega}{\Vec{\omega}} \newcommand{\vOmega}{\Vec{\Omega}} \newcommand{\ha}{\Hat{a}} \newcommand{\hb}{\Hat{b}} \newcommand{\hc}{\Hat{c}} \newcommand{\hd}{\Hat{d}} % \newcommand{\he}{\Hat{e}} \newcommand{\hf}{\Hat{f}} \newcommand{\hg}{\Hat{g}} \newcommand{\hh}{\Hat{h}} \newcommand{\hi}{\Hat{i}} \newcommand{\hj}{\Hat{j}} \newcommand{\hk}{\Hat{k}} \newcommand{\hl}{\Hat{l}} \newcommand{\hm}{\Hat{m}} \newcommand{\hn}{\Hat{n}} \newcommand{\ho}{\Hat{o}} \newcommand{\hp}{\Hat{p}} \newcommand{\hq}{\Hat{q}} \newcommand{\hr}{\Hat{r}} \newcommand{\hs}{\Hat{s}} \newcommand{\hT}{\Hat{t}} \newcommand{\hu}{\Hat{u}} \newcommand{\hv}{\Hat{v}} \newcommand{\hw}{\Hat{w}} \newcommand{\hx}{\Hat{x}} \newcommand{\hy}{\Hat{y}} \newcommand{\hz}{\Hat{z}} \newcommand{\he}{\Hat{\epsilon}} \newcommand{\htheta}{\Hat{\Theta}} \newcommand{\hphi}{\Hat{\phi}} \newcommand{\bx}{\bar{x}} \newcommand{\Z}{\sqrt{ \frac{\mu_0}{\epsilon_0} }} \newcommand{\Ylm}{Y_{\ell m}} \newcommand{\YL}{Y_L} \newcounter{short} \newcommand{\shortproblem}[1]{ \stepcounter{short} % \addcontentsline{toc}{subsection}{Short Problem \arabic{short}} \vspace{1cm} {\noindent \bf Short Problem \arabic{short}.} \vspace{0.2cm} \\ {\noindent #1} } \newcounter{true} \newcommand{\truefact}[1]{ \stepcounter{true} % \addcontentsline{toc}{subsection}{True Fact \arabic{true}} \vspace{1cm} {\noindent \bf True Fact \arabic{true}.} \vspace{0.2cm} \\ {\noindent #1} } % OLD shortproblem with minipage, which seems to block putting % figures inside... % \newcommand{\shortproblem}[1]{ % % \stepcounter{short} % \addcontentsline{toc}{subsection}{Short Problem \arabic{short}} % \vfill % \noindent % \begin{minipage}[c]{6in} % \vspace{0.2cm} % {\noindent \bf Short Problem \arabic{short}.} % \vspace{0.2cm} % % \noindent {#1} % \end{minipage} % \vfill % % } \newcounter{hwcnt} \newcommand{\homework}[1]{ \stepcounter{hwcnt} \vspace{1.0cm} {\noindent \bf Problem \arabic{hwcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{probcnt} \newcommand{\problem}[1]{ \stepcounter{probcnt} \vspace{1.0cm} {\noindent \bf Problem \arabic{probcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{quescnt} \newcommand{\question}[1]{ \stepcounter{quescnt} \vspace{1.0cm} {\noindent \bf Question \arabic{quescnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{testprobcnt} \newcommand{\testproblem}[2]{ \stepcounter{testprobcnt} \vspace{1.0cm} \noindent \textbf{Problem \arabic{testprobcnt}.}\quad({#1} points) \vspace{0.2cm} \noindent {#2} } \newcommand{\ahomework}[1]{ \stepcounter{hwcnt} \vspace{1.0cm} {\noindent \bf * Problem \arabic{hwcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{hardcnt} \newcommand{\hardproblem}[1]{ \stepcounter{hardcnt} \addcontentsline{toc}{subsection}{Essential Problem \arabic{week}.\arabic{hardcnt}} \vspace{1.0cm} {\noindent \bf Essential Problem \arabic{week}.\arabic{hardcnt}.} \vspace{0.2cm} \noindent {#1} \newpage } \newcommand{\week}[1]{ \stepcounter{chapter} \addcontentsline{toc}{chapter}{Week \arabic{chapter}: #1} \markboth{Week \arabic{chapter}: #1}{Week \arabic{chapter}: #1} \chapter*{Week \arabic{chapter}: #1} } ./manual/macros.tex.in0000664000175000017500000002060513707046103013163 0ustar eddedd% This file is filled in by ../configure. Do not edit this file by % hand! Make changes in macros.tex.in instead. % % Macros for dieharder.tex % % These macros basicallypermit one to shorten typing -- it is much easier % to type \be than \begin{equation}. Others encapsulate complex commands, % such as commands that add dynamic links to wikipedia content (which is % VERY USEFUL for online content! I'm quite proud of my "\wikinote{}" % below, as it is nearly a one-stop-shop for references these days. % \newcommand{\version}{@VERSION@} %======================================================================== % These are some macros I find useful doing e.g. physics textbooks. % Some just shorten typing -- it is much easier to % type \be than \begin{equation}. Others encapsulate complex commands, % such as commands that add dynamic links to wikipedia content (which is % VERY USEFUL for online content! I'm quite proud of my "\wikinote{}" % below, as it is nearly a one-stop-shop for references these days. %======================================================================== \newcommand{\mb}[1]{\mbox{\boldmath $#1$}} \ifx \Vec \undefined \newcommand{\Vec}[1]{\mbox{\boldmath $\vec{#1}$}} \else \renewcommand{\Vec}[1]{\mbox{\boldmath $\vec{#1}$}} \fi \newcommand{\sVec}[1]{\mbox{\scriptsize \boldmath $#1$}} \newcommand{\Mat}[1]{\stackrel{\Leftrightarrow}{\mbox{\boldmath $#1$}}} \ifx \Hat \undefined \newcommand{\Hat}[1]{\mbox{\boldmath $\hat{#1}$}} \else \renewcommand{\Hat}[1]{\mbox{\boldmath $\hat{#1}$}} \fi \newcommand{\sHat}[1]{\hat{\mbox{\scriptsize \boldmath $#1$}}} \newcommand{\deriv}[2]{\frac{d #1}{d #2}} \newcommand{\ddt}[1]{\frac{d #1}{dt}} \newcommand{\dderiv}[2]{\frac{d^2 #1}{d #2^2}} \newcommand{\ddtsq}[1]{\frac{d^2 #1}{d t^2}} \newcommand{\partialdiv}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\ppartialdiv}[2]{\frac{\partial^2 #1}{\partial #2^2}} \newcommand{\del}{\Vec{\nabla}} \newcommand{\grad}{\Vec{\nabla}} \newcommand{\deldot}{\del \cdot} \newcommand{\curl}{\del \times} \newcommand{\lapl}{\nabla^2} \newcommand{\vsh}[2]{\Vec{Y}_{#1}^{#2}} \newcommand{\abs}[1]{\left| #1 \right|} \newcommand{\RE}{\rm I \hspace{-.180em} R} \newcommand{\be}{ \begin{equation} } \newcommand{\ee}{ \end{equation} } \newcommand{\bea}{ \begin{eqnarray} } \newcommand{\eea}{ \end{eqnarray} } \newcommand{\ba}{\begin{array}} \newcommand{\ea}{\end{array}} \newcommand{\ben}{ \begin{enumerate} } \newcommand{\een}{ \end{enumerate} } \newcommand{\bit}{ \begin{itemize} } \newcommand{\eit}{ \end{itemize} } \newcommand{\bv}{ \begin{verbatim} } % one cannot end verbatim with a macro, as the macro % is interpreted as verbatim text, duh... % Here's a useful one for the Dieharder book: \newcommand{\die}{\emph{Dieharder}\ } \newcommand{\spade}{\framebox{$\spadesuit$}} \newcommand{\heart}{\framebox{$\heartsuit$}} \renewcommand{\diamond}{\framebox{$\diamondsuit$}} \newcommand{\club}{\framebox{$\clubsuit$}} \newcommand{\notrump}{\framebox{\rule[2.75mm]{0cm}{0cm}\rule[-0.5mm]{0cm}{0cm}\ \ }} \newcommand{\half}{\frac{1}{2}} \newcommand{\tot}{ {\rm tot} } \newcommand{\link}[2]{\htmladdnormallink{#1}{#2}} \newcommand{\wikilink}[1]{Wikipedia: \htmladdnormallink{http://www.wikipedia.org/wiki/#1}{http://www.wikipedia.org/wiki/#1}} \newcommand{\GIYF}{ \htmladdnormallink{GIYF}{http://www.google.com} } \newcommand{\WIYF}{\htmladdnormallink{WIYF}{http://www.wikipedia.org} } \newcommand{\MWIYF}{\htmladdnormallink{MWIYF}{http://mathworld.wolfram.com}} \newcommand{\webnote}[2]{\footnote{Internet: \htmladdnormallink{#1 }{#1 } #2}} \newcommand{\wikinote}[2]{\footnote{Wikipedia: \htmladdnormallink{http://www.wikipedia.org/wiki/#1.}{http://www.wikipedia.org/wiki/#1} #2} } \newcommand{\googlenote}[2]{\footnote{GIYF: \htmladdnormallink{#1 }{http://www.google.com/search?hl=en&lr=&q=#1&btnG=Search} #2} } % Really I should just go ahead and define a bloody alphabet of the % defs below... \newcommand{\vbeta}{\Vec{\beta}} \newcommand{\vA}{\Vec{A}} \newcommand{\vB}{\Vec{B}} \newcommand{\vC}{\Vec{C}} \newcommand{\vD}{\Vec{D}} \newcommand{\vE}{\Vec{E}} \newcommand{\vF}{\Vec{F}} \newcommand{\vG}{\Vec{G}} \newcommand{\vH}{\Vec{H}} \newcommand{\vI}{\Vec{I}} \newcommand{\vJ}{\Vec{J}} \newcommand{\vL}{\Vec{L}} \newcommand{\vM}{\Vec{M}} \newcommand{\vN}{\Vec{N}} \newcommand{\vO}{\Vec{O}} \newcommand{\vP}{\Vec{P}} \newcommand{\vQ}{\Vec{Q}} \newcommand{\vR}{\Vec{R}} \newcommand{\vS}{\Vec{S}} \newcommand{\vT}{\Vec{T}} \newcommand{\vU}{\Vec{U}} \newcommand{\vV}{\Vec{V}} \newcommand{\vW}{\Vec{W}} \newcommand{\vX}{\Vec{X}} \newcommand{\vY}{\Vec{Y}} \newcommand{\vZ}{\Vec{Y}} \newcommand{\va}{\Vec{a}} \newcommand{\vb}{\Vec{b}} \newcommand{\vc}{\Vec{c}} \newcommand{\vd}{\Vec{d}} \newcommand{\ve}{\Vec{e}} \newcommand{\vf}{\Vec{f}} \newcommand{\vg}{\Vec{g}} \newcommand{\vh}{\Vec{h}} \newcommand{\vi}{\Vec{i}} \newcommand{\vj}{\Vec{j}} \newcommand{\vk}{\Vec{k}} \newcommand{\vl}{\Vec{l}} \newcommand{\vm}{\Vec{m}} \newcommand{\vn}{\Vec{n}} \newcommand{\vo}{\Vec{o}} \newcommand{\vp}{\Vec{p}} \newcommand{\vq}{\Vec{q}} \newcommand{\vr}{\Vec{r}} \newcommand{\vs}{\Vec{s}} \newcommand{\vt}{\Vec{t}} \newcommand{\vu}{\Vec{u}} \newcommand{\vv}{\Vec{v}} \newcommand{\vx}{\Vec{x}} \newcommand{\vy}{\Vec{y}} \newcommand{\vz}{\Vec{z}} \newcommand{\vell}{\Vec{\ell}} \newcommand{\valpha}{\Vec{\alpha}} \newcommand{\vtau}{\Vec{\tau}} \newcommand{\vomega}{\Vec{\omega}} \newcommand{\vOmega}{\Vec{\Omega}} \newcommand{\ha}{\Hat{a}} \newcommand{\hb}{\Hat{b}} \newcommand{\hc}{\Hat{c}} \newcommand{\hd}{\Hat{d}} % \newcommand{\he}{\Hat{e}} \newcommand{\hf}{\Hat{f}} \newcommand{\hg}{\Hat{g}} \newcommand{\hh}{\Hat{h}} \newcommand{\hi}{\Hat{i}} \newcommand{\hj}{\Hat{j}} \newcommand{\hk}{\Hat{k}} \newcommand{\hl}{\Hat{l}} \newcommand{\hm}{\Hat{m}} \newcommand{\hn}{\Hat{n}} \newcommand{\ho}{\Hat{o}} \newcommand{\hp}{\Hat{p}} \newcommand{\hq}{\Hat{q}} \newcommand{\hr}{\Hat{r}} \newcommand{\hs}{\Hat{s}} \newcommand{\hT}{\Hat{t}} \newcommand{\hu}{\Hat{u}} \newcommand{\hv}{\Hat{v}} \newcommand{\hw}{\Hat{w}} \newcommand{\hx}{\Hat{x}} \newcommand{\hy}{\Hat{y}} \newcommand{\hz}{\Hat{z}} \newcommand{\he}{\Hat{\epsilon}} \newcommand{\htheta}{\Hat{\Theta}} \newcommand{\hphi}{\Hat{\phi}} \newcommand{\bx}{\bar{x}} \newcommand{\Z}{\sqrt{ \frac{\mu_0}{\epsilon_0} }} \newcommand{\Ylm}{Y_{\ell m}} \newcommand{\YL}{Y_L} \newcounter{short} \newcommand{\shortproblem}[1]{ \stepcounter{short} % \addcontentsline{toc}{subsection}{Short Problem \arabic{short}} \vspace{1cm} {\noindent \bf Short Problem \arabic{short}.} \vspace{0.2cm} \\ {\noindent #1} } \newcounter{true} \newcommand{\truefact}[1]{ \stepcounter{true} % \addcontentsline{toc}{subsection}{True Fact \arabic{true}} \vspace{1cm} {\noindent \bf True Fact \arabic{true}.} \vspace{0.2cm} \\ {\noindent #1} } % OLD shortproblem with minipage, which seems to block putting % figures inside... % \newcommand{\shortproblem}[1]{ % % \stepcounter{short} % \addcontentsline{toc}{subsection}{Short Problem \arabic{short}} % \vfill % \noindent % \begin{minipage}[c]{6in} % \vspace{0.2cm} % {\noindent \bf Short Problem \arabic{short}.} % \vspace{0.2cm} % % \noindent {#1} % \end{minipage} % \vfill % % } \newcounter{hwcnt} \newcommand{\homework}[1]{ \stepcounter{hwcnt} \vspace{1.0cm} {\noindent \bf Problem \arabic{hwcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{probcnt} \newcommand{\problem}[1]{ \stepcounter{probcnt} \vspace{1.0cm} {\noindent \bf Problem \arabic{probcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{quescnt} \newcommand{\question}[1]{ \stepcounter{quescnt} \vspace{1.0cm} {\noindent \bf Question \arabic{quescnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{testprobcnt} \newcommand{\testproblem}[2]{ \stepcounter{testprobcnt} \vspace{1.0cm} \noindent \textbf{Problem \arabic{testprobcnt}.}\quad({#1} points) \vspace{0.2cm} \noindent {#2} } \newcommand{\ahomework}[1]{ \stepcounter{hwcnt} \vspace{1.0cm} {\noindent \bf * Problem \arabic{hwcnt}.} \vspace{0.2cm} \noindent {#1} } \newcounter{hardcnt} \newcommand{\hardproblem}[1]{ \stepcounter{hardcnt} \addcontentsline{toc}{subsection}{Essential Problem \arabic{week}.\arabic{hardcnt}} \vspace{1.0cm} {\noindent \bf Essential Problem \arabic{week}.\arabic{hardcnt}.} \vspace{0.2cm} \noindent {#1} \newpage } \newcommand{\week}[1]{ \stepcounter{chapter} \addcontentsline{toc}{chapter}{Week \arabic{chapter}: #1} \markboth{Week \arabic{chapter}: #1}{Week \arabic{chapter}: #1} \chapter*{Week \arabic{chapter}: #1} }