├── ChangeLog ├── Makefile.am ├── NEWS ├── src ├── Makefile.am ├── ministat.man ├── ministat.c └── Makefile.in ├── .gitignore ├── AUTHORS ├── examples ├── chameleon └── iguana ├── COPYING ├── configure.ac ├── README.md ├── missing ├── INSTALL ├── install-sh ├── depcomp ├── Makefile.in └── aclocal.m4 /ChangeLog: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS=src -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Now works with autoconf and automake, etc. -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS=ministat 2 | 3 | man1_MANS = ministat.man -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ministat 2 | *.o 3 | *.cache 4 | *.log 5 | *.status 6 | Makefile 7 | src/.deps -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Poul-Henning Kamp 2 | Coda Hale 3 | Jeff Mickey -------------------------------------------------------------------------------- /examples/chameleon: -------------------------------------------------------------------------------- 1 | # $FreeBSD: src/tools/tools/ministat/chameleon,v 1.1.30.1 2009/04/15 03:14:26 kensmith Exp $ 2 | 150 3 | 400 4 | 720 5 | 500 6 | 930 7 | -------------------------------------------------------------------------------- /examples/iguana: -------------------------------------------------------------------------------- 1 | # $FreeBSD: src/tools/tools/ministat/iguana,v 1.1.30.1 2009/04/15 03:14:26 kensmith Exp $ 2 | 50 3 | 200 4 | 150 5 | 400 6 | 750 7 | 400 8 | 150 9 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | "THE BEER-WARE LICENSE" (Revision 42): 2 | wrote this file. As long as you retain this notice you 3 | can do whatever you want with this stuff. If we meet some day, and you think 4 | this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ([2.50]) 2 | AC_INIT([ministat], [1.0], [coda.hale@gmail.com]) 3 | AC_CONFIG_SRCDIR([src/ministat.c]) 4 | 5 | AM_INIT_AUTOMAKE 6 | 7 | AC_PROG_CC 8 | AC_PROG_INSTALL 9 | 10 | AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h unistd.h]) 11 | 12 | AC_FUNC_MALLOC 13 | AC_FUNC_REALLOC 14 | AC_FUNC_STRTOD 15 | AC_CHECK_FUNCS([memset sqrt strdup strtol]) 16 | 17 | AC_CONFIG_FILES([Makefile 18 | src/Makefile]) 19 | AC_OUTPUT 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ministat 2 | ======== 3 | 4 | (A port of Poul-Henning Kamp's `ministat` for OS X.) 5 | 6 | A small tool to do the statistics legwork on benchmarks etc. 7 | 8 | Prepare your data into two files, one number per line 9 | run 10 | 11 | ./ministat data_before data_after 12 | 13 | and see what it says. 14 | 15 | You need at least three data points in each data set, but the more 16 | you have the better your result generally gets. 17 | 18 | Here are two typical outputs: 19 | 20 | x _1 21 | + _2 22 | +--------------------------------------------------------------------------+ 23 | |x + x+ x x x + ++ | 24 | | |_________|______AM_______________|__A___________M_______________|| 25 | +--------------------------------------------------------------------------+ 26 | N Min Max Median Avg Stddev 27 | x 5 36060 36138 36107 36105.6 31.165686 28 | + 5 36084 36187 36163 36142.6 49.952978 29 | No difference proven at 95.0% confidence 30 | 31 | Here nothing can be concluded from the numbers. It _may_ be possible to 32 | prove something if many more measurements are made, but with only five 33 | measurements, nothing is proven. 34 | 35 | 36 | x _1 37 | + _2 38 | +--------------------------------------------------------------------------+ 39 | | + | 40 | | x + +| 41 | |x x x x + +| 42 | | |_______________A_____M_________| |_M___A____| | 43 | +--------------------------------------------------------------------------+ 44 | N Min Max Median Avg Stddev 45 | x 5 0.133 0.137 0.136 0.1354 0.0015165751 46 | + 5 0.139 0.14 0.139 0.1394 0.00054772256 47 | Difference at 95.0% confidence 48 | 0.004 +/- 0.00166288 49 | 2.95421% +/- 1.22812% 50 | (Student's t, pooled s = 0.00114018) 51 | 52 | Here we have a clearcut difference, not very big, but clear and unambiguous. 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/ministat.man: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (c) 2007 Poul-Henning Kamp 3 | .\" All rights reserved. 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions 7 | .\" are met: 8 | .\" 1. Redistributions of source code must retain the above copyright 9 | .\" notice, this list of conditions and the following disclaimer. 10 | .\" 2. Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" 14 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | .\" SUCH DAMAGE. 25 | .\" 26 | .\" $FreeBSD: src/usr.bin/ministat/ministat.1,v 1.2 2008/03/12 00:13:49 peter Exp $ 27 | .\" 28 | .Dd December 20, 2007 29 | .Dt MINISTAT 1 30 | .Os 31 | .Sh NAME 32 | .Nm ministat 33 | .Nd statistics utility 34 | .Sh SYNOPSIS 35 | .Nm 36 | .Op Fl ns 37 | .Op Fl C Ar column 38 | .Op Fl c Ar confidence_level 39 | .Op Fl d Ar delimiter 40 | .Op Fl w Op width 41 | .Op Ar 42 | .Sh DESCRIPTION 43 | The 44 | .Nm 45 | command calculates fundamental statistical properties of numeric data 46 | in the specified files or, if no file is specified, standard input. 47 | .Pp 48 | The options are as follows: 49 | .Bl -tag -width Fl 50 | .It Fl n 51 | Just report the raw statistics of the input, suppress the ASCII-art plot 52 | and the relative comparisons. 53 | .It Fl s 54 | Print the average/median/stddev bars on separate lines in the ASCII-art 55 | plot, to avoid overlap. 56 | .It Fl C Ar column 57 | Specify which column of data to use. 58 | By default the first column in the input file(s) are used. 59 | .It Fl c Ar confidence_level 60 | Specify desired confidence level for Student's T analysis. 61 | Possible values are 80, 90, 95, 98, 99 and 99.5 % 62 | .It Fl d Ar delimiter 63 | Specifies the column delimiter characters, default is SPACE and TAB. 64 | See 65 | .Xr strtok 3 66 | for details. 67 | .It Fl w Ar width 68 | Width of ASCII-art plot in characters, default is 74. 69 | .El 70 | .Pp 71 | A sample output could look like this: 72 | .Bd -literal -offset indent 73 | $ ministat -s -w 60 iguana chameleon 74 | x iguana 75 | + chameleon 76 | +------------------------------------------------------------+ 77 | |x * x * + + x +| 78 | | |________M______A_______________| | 79 | | |________________M__A___________________| | 80 | +------------------------------------------------------------+ 81 | N Min Max Median Avg Stddev 82 | x 7 50 750 200 300 238.04761 83 | + 5 150 930 500 540 299.08193 84 | No difference proven at 95.0% confidence 85 | .Ed 86 | .Pp 87 | If 88 | .Nm 89 | tells you, as in the example above, that there is no difference 90 | proven at 95% confidence, the two data sets you gave it are for 91 | all statistical purposes identical. 92 | .Pp 93 | You have the option of lowering your standards by specifying a 94 | lower confidence level: 95 | .Bd -literal -offset indent 96 | $ ministat -c 80 iguana chameleon 97 | x iguana 98 | + chameleon 99 | +------------------------------------------------------------+ 100 | |x * x * + + x +| 101 | | |________M______A_______________| | 102 | | |________________M__A___________________| | 103 | +------------------------------------------------------------+ 104 | N Min Max Median Avg Stddev 105 | x 7 50 750 200 300 238.04761 106 | + 5 150 930 500 540 299.08193 107 | Difference at 80.0% confidence 108 | 240 +/- 212.215 109 | 80% +/- 70.7384% 110 | (Student's t, pooled s = 264.159) 111 | .Ed 112 | .Pp 113 | But a lower standard does not make your data any better, and the 114 | example is only included here to show the format of the output when 115 | a statistical difference is proven according to Student's T method. 116 | .Sh SEE ALSO 117 | Any mathematics text on basic statistics, for instances Larry Gonicks 118 | excellent "Cartoon Guide to Statistics" which supplied the above example. 119 | .Sh HISTORY 120 | The 121 | .Nm 122 | command was written by Poul-Henning Kamp out of frustration 123 | over all the bogus benchmark claims made by people with no 124 | understanding of the importance of uncertainty and statistics. 125 | .Pp 126 | From 127 | .Fx 5.2 128 | it has lived in the source tree as a developer tool, graduating 129 | to the installed system from 130 | .Fx 8.0 . 131 | -------------------------------------------------------------------------------- /missing: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Common stub for a few missing GNU programs while installing. 3 | 4 | scriptversion=2009-04-28.21; # UTC 5 | 6 | # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 7 | # 2008, 2009 Free Software Foundation, Inc. 8 | # Originally by Fran,cois Pinard , 1996. 9 | 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2, or (at your option) 13 | # any later version. 14 | 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program. If not, see . 22 | 23 | # As a special exception to the GNU General Public License, if you 24 | # distribute this file as part of a program that contains a 25 | # configuration script generated by Autoconf, you may include it under 26 | # the same distribution terms that you use for the rest of that program. 27 | 28 | if test $# -eq 0; then 29 | echo 1>&2 "Try \`$0 --help' for more information" 30 | exit 1 31 | fi 32 | 33 | run=: 34 | sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' 35 | sed_minuso='s/.* -o \([^ ]*\).*/\1/p' 36 | 37 | # In the cases where this matters, `missing' is being run in the 38 | # srcdir already. 39 | if test -f configure.ac; then 40 | configure_ac=configure.ac 41 | else 42 | configure_ac=configure.in 43 | fi 44 | 45 | msg="missing on your system" 46 | 47 | case $1 in 48 | --run) 49 | # Try to run requested program, and just exit if it succeeds. 50 | run= 51 | shift 52 | "$@" && exit 0 53 | # Exit code 63 means version mismatch. This often happens 54 | # when the user try to use an ancient version of a tool on 55 | # a file that requires a minimum version. In this case we 56 | # we should proceed has if the program had been absent, or 57 | # if --run hadn't been passed. 58 | if test $? = 63; then 59 | run=: 60 | msg="probably too old" 61 | fi 62 | ;; 63 | 64 | -h|--h|--he|--hel|--help) 65 | echo "\ 66 | $0 [OPTION]... PROGRAM [ARGUMENT]... 67 | 68 | Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an 69 | error status if there is no known handling for PROGRAM. 70 | 71 | Options: 72 | -h, --help display this help and exit 73 | -v, --version output version information and exit 74 | --run try to run the given command, and emulate it if it fails 75 | 76 | Supported PROGRAM values: 77 | aclocal touch file \`aclocal.m4' 78 | autoconf touch file \`configure' 79 | autoheader touch file \`config.h.in' 80 | autom4te touch the output file, or create a stub one 81 | automake touch all \`Makefile.in' files 82 | bison create \`y.tab.[ch]', if possible, from existing .[ch] 83 | flex create \`lex.yy.c', if possible, from existing .c 84 | help2man touch the output file 85 | lex create \`lex.yy.c', if possible, from existing .c 86 | makeinfo touch the output file 87 | tar try tar, gnutar, gtar, then tar without non-portable flags 88 | yacc create \`y.tab.[ch]', if possible, from existing .[ch] 89 | 90 | Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and 91 | \`g' are ignored when checking the name. 92 | 93 | Send bug reports to ." 94 | exit $? 95 | ;; 96 | 97 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 98 | echo "missing $scriptversion (GNU Automake)" 99 | exit $? 100 | ;; 101 | 102 | -*) 103 | echo 1>&2 "$0: Unknown \`$1' option" 104 | echo 1>&2 "Try \`$0 --help' for more information" 105 | exit 1 106 | ;; 107 | 108 | esac 109 | 110 | # normalize program name to check for. 111 | program=`echo "$1" | sed ' 112 | s/^gnu-//; t 113 | s/^gnu//; t 114 | s/^g//; t'` 115 | 116 | # Now exit if we have it, but it failed. Also exit now if we 117 | # don't have it and --version was passed (most likely to detect 118 | # the program). This is about non-GNU programs, so use $1 not 119 | # $program. 120 | case $1 in 121 | lex*|yacc*) 122 | # Not GNU programs, they don't have --version. 123 | ;; 124 | 125 | tar*) 126 | if test -n "$run"; then 127 | echo 1>&2 "ERROR: \`tar' requires --run" 128 | exit 1 129 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then 130 | exit 1 131 | fi 132 | ;; 133 | 134 | *) 135 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 136 | # We have it, but it failed. 137 | exit 1 138 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then 139 | # Could not run --version or --help. This is probably someone 140 | # running `$TOOL --version' or `$TOOL --help' to check whether 141 | # $TOOL exists and not knowing $TOOL uses missing. 142 | exit 1 143 | fi 144 | ;; 145 | esac 146 | 147 | # If it does not exist, or fails to run (possibly an outdated version), 148 | # try to emulate it. 149 | case $program in 150 | aclocal*) 151 | echo 1>&2 "\ 152 | WARNING: \`$1' is $msg. You should only need it if 153 | you modified \`acinclude.m4' or \`${configure_ac}'. You might want 154 | to install the \`Automake' and \`Perl' packages. Grab them from 155 | any GNU archive site." 156 | touch aclocal.m4 157 | ;; 158 | 159 | autoconf*) 160 | echo 1>&2 "\ 161 | WARNING: \`$1' is $msg. You should only need it if 162 | you modified \`${configure_ac}'. You might want to install the 163 | \`Autoconf' and \`GNU m4' packages. Grab them from any GNU 164 | archive site." 165 | touch configure 166 | ;; 167 | 168 | autoheader*) 169 | echo 1>&2 "\ 170 | WARNING: \`$1' is $msg. You should only need it if 171 | you modified \`acconfig.h' or \`${configure_ac}'. You might want 172 | to install the \`Autoconf' and \`GNU m4' packages. Grab them 173 | from any GNU archive site." 174 | files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` 175 | test -z "$files" && files="config.h" 176 | touch_files= 177 | for f in $files; do 178 | case $f in 179 | *:*) touch_files="$touch_files "`echo "$f" | 180 | sed -e 's/^[^:]*://' -e 's/:.*//'`;; 181 | *) touch_files="$touch_files $f.in";; 182 | esac 183 | done 184 | touch $touch_files 185 | ;; 186 | 187 | automake*) 188 | echo 1>&2 "\ 189 | WARNING: \`$1' is $msg. You should only need it if 190 | you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. 191 | You might want to install the \`Automake' and \`Perl' packages. 192 | Grab them from any GNU archive site." 193 | find . -type f -name Makefile.am -print | 194 | sed 's/\.am$/.in/' | 195 | while read f; do touch "$f"; done 196 | ;; 197 | 198 | autom4te*) 199 | echo 1>&2 "\ 200 | WARNING: \`$1' is needed, but is $msg. 201 | You might have modified some files without having the 202 | proper tools for further handling them. 203 | You can get \`$1' as part of \`Autoconf' from any GNU 204 | archive site." 205 | 206 | file=`echo "$*" | sed -n "$sed_output"` 207 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 208 | if test -f "$file"; then 209 | touch $file 210 | else 211 | test -z "$file" || exec >$file 212 | echo "#! /bin/sh" 213 | echo "# Created by GNU Automake missing as a replacement of" 214 | echo "# $ $@" 215 | echo "exit 0" 216 | chmod +x $file 217 | exit 1 218 | fi 219 | ;; 220 | 221 | bison*|yacc*) 222 | echo 1>&2 "\ 223 | WARNING: \`$1' $msg. You should only need it if 224 | you modified a \`.y' file. You may need the \`Bison' package 225 | in order for those modifications to take effect. You can get 226 | \`Bison' from any GNU archive site." 227 | rm -f y.tab.c y.tab.h 228 | if test $# -ne 1; then 229 | eval LASTARG="\${$#}" 230 | case $LASTARG in 231 | *.y) 232 | SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` 233 | if test -f "$SRCFILE"; then 234 | cp "$SRCFILE" y.tab.c 235 | fi 236 | SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` 237 | if test -f "$SRCFILE"; then 238 | cp "$SRCFILE" y.tab.h 239 | fi 240 | ;; 241 | esac 242 | fi 243 | if test ! -f y.tab.h; then 244 | echo >y.tab.h 245 | fi 246 | if test ! -f y.tab.c; then 247 | echo 'main() { return 0; }' >y.tab.c 248 | fi 249 | ;; 250 | 251 | lex*|flex*) 252 | echo 1>&2 "\ 253 | WARNING: \`$1' is $msg. You should only need it if 254 | you modified a \`.l' file. You may need the \`Flex' package 255 | in order for those modifications to take effect. You can get 256 | \`Flex' from any GNU archive site." 257 | rm -f lex.yy.c 258 | if test $# -ne 1; then 259 | eval LASTARG="\${$#}" 260 | case $LASTARG in 261 | *.l) 262 | SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` 263 | if test -f "$SRCFILE"; then 264 | cp "$SRCFILE" lex.yy.c 265 | fi 266 | ;; 267 | esac 268 | fi 269 | if test ! -f lex.yy.c; then 270 | echo 'main() { return 0; }' >lex.yy.c 271 | fi 272 | ;; 273 | 274 | help2man*) 275 | echo 1>&2 "\ 276 | WARNING: \`$1' is $msg. You should only need it if 277 | you modified a dependency of a manual page. You may need the 278 | \`Help2man' package in order for those modifications to take 279 | effect. You can get \`Help2man' from any GNU archive site." 280 | 281 | file=`echo "$*" | sed -n "$sed_output"` 282 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 283 | if test -f "$file"; then 284 | touch $file 285 | else 286 | test -z "$file" || exec >$file 287 | echo ".ab help2man is required to generate this page" 288 | exit $? 289 | fi 290 | ;; 291 | 292 | makeinfo*) 293 | echo 1>&2 "\ 294 | WARNING: \`$1' is $msg. You should only need it if 295 | you modified a \`.texi' or \`.texinfo' file, or any other file 296 | indirectly affecting the aspect of the manual. The spurious 297 | call might also be the consequence of using a buggy \`make' (AIX, 298 | DU, IRIX). You might want to install the \`Texinfo' package or 299 | the \`GNU make' package. Grab either from any GNU archive site." 300 | # The file to touch is that specified with -o ... 301 | file=`echo "$*" | sed -n "$sed_output"` 302 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 303 | if test -z "$file"; then 304 | # ... or it is the one specified with @setfilename ... 305 | infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` 306 | file=`sed -n ' 307 | /^@setfilename/{ 308 | s/.* \([^ ]*\) *$/\1/ 309 | p 310 | q 311 | }' $infile` 312 | # ... or it is derived from the source name (dir/f.texi becomes f.info) 313 | test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info 314 | fi 315 | # If the file does not exist, the user really needs makeinfo; 316 | # let's fail without touching anything. 317 | test -f $file || exit 1 318 | touch $file 319 | ;; 320 | 321 | tar*) 322 | shift 323 | 324 | # We have already tried tar in the generic part. 325 | # Look for gnutar/gtar before invocation to avoid ugly error 326 | # messages. 327 | if (gnutar --version > /dev/null 2>&1); then 328 | gnutar "$@" && exit 0 329 | fi 330 | if (gtar --version > /dev/null 2>&1); then 331 | gtar "$@" && exit 0 332 | fi 333 | firstarg="$1" 334 | if shift; then 335 | case $firstarg in 336 | *o*) 337 | firstarg=`echo "$firstarg" | sed s/o//` 338 | tar "$firstarg" "$@" && exit 0 339 | ;; 340 | esac 341 | case $firstarg in 342 | *h*) 343 | firstarg=`echo "$firstarg" | sed s/h//` 344 | tar "$firstarg" "$@" && exit 0 345 | ;; 346 | esac 347 | fi 348 | 349 | echo 1>&2 "\ 350 | WARNING: I can't seem to be able to run \`tar' with the given arguments. 351 | You may want to install GNU tar or Free paxutils, or check the 352 | command line arguments." 353 | exit 1 354 | ;; 355 | 356 | *) 357 | echo 1>&2 "\ 358 | WARNING: \`$1' is needed, and is $msg. 359 | You might have modified some files without having the 360 | proper tools for further handling them. Check the \`README' file, 361 | it often tells you about the needed prerequisites for installing 362 | this package. You may also peek at any GNU archive site, in case 363 | some other package would contain this missing \`$1' program." 364 | exit 1 365 | ;; 366 | esac 367 | 368 | exit 0 369 | 370 | # Local variables: 371 | # eval: (add-hook 'write-file-hooks 'time-stamp) 372 | # time-stamp-start: "scriptversion=" 373 | # time-stamp-format: "%:y-%02m-%02d.%02H" 374 | # time-stamp-time-zone: "UTC" 375 | # time-stamp-end: "; # UTC" 376 | # End: 377 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Installation Instructions 2 | ************************* 3 | 4 | Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5 | 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 6 | 7 | This file is free documentation; the Free Software Foundation gives 8 | unlimited permission to copy, distribute and modify it. 9 | 10 | Basic Installation 11 | ================== 12 | 13 | Briefly, the shell commands `./configure; make; make install' should 14 | configure, build, and install this package. The following 15 | more-detailed instructions are generic; see the `README' file for 16 | instructions specific to this package. 17 | 18 | The `configure' shell script attempts to guess correct values for 19 | various system-dependent variables used during compilation. It uses 20 | those values to create a `Makefile' in each directory of the package. 21 | It may also create one or more `.h' files containing system-dependent 22 | definitions. Finally, it creates a shell script `config.status' that 23 | you can run in the future to recreate the current configuration, and a 24 | file `config.log' containing compiler output (useful mainly for 25 | debugging `configure'). 26 | 27 | It can also use an optional file (typically called `config.cache' 28 | and enabled with `--cache-file=config.cache' or simply `-C') that saves 29 | the results of its tests to speed up reconfiguring. Caching is 30 | disabled by default to prevent problems with accidental use of stale 31 | cache files. 32 | 33 | If you need to do unusual things to compile the package, please try 34 | to figure out how `configure' could check whether to do them, and mail 35 | diffs or instructions to the address given in the `README' so they can 36 | be considered for the next release. If you are using the cache, and at 37 | some point `config.cache' contains results you don't want to keep, you 38 | may remove or edit it. 39 | 40 | The file `configure.ac' (or `configure.in') is used to create 41 | `configure' by a program called `autoconf'. You need `configure.ac' if 42 | you want to change it or regenerate `configure' using a newer version 43 | of `autoconf'. 44 | 45 | The simplest way to compile this package is: 46 | 47 | 1. `cd' to the directory containing the package's source code and type 48 | `./configure' to configure the package for your system. 49 | 50 | Running `configure' might take a while. While running, it prints 51 | some messages telling which features it is checking for. 52 | 53 | 2. Type `make' to compile the package. 54 | 55 | 3. Optionally, type `make check' to run any self-tests that come with 56 | the package. 57 | 58 | 4. Type `make install' to install the programs and any data files and 59 | documentation. 60 | 61 | 5. You can remove the program binaries and object files from the 62 | source code directory by typing `make clean'. To also remove the 63 | files that `configure' created (so you can compile the package for 64 | a different kind of computer), type `make distclean'. There is 65 | also a `make maintainer-clean' target, but that is intended mainly 66 | for the package's developers. If you use it, you may have to get 67 | all sorts of other programs in order to regenerate files that came 68 | with the distribution. 69 | 70 | 6. Often, you can also type `make uninstall' to remove the installed 71 | files again. 72 | 73 | Compilers and Options 74 | ===================== 75 | 76 | Some systems require unusual options for compilation or linking that 77 | the `configure' script does not know about. Run `./configure --help' 78 | for details on some of the pertinent environment variables. 79 | 80 | You can give `configure' initial values for configuration parameters 81 | by setting variables in the command line or in the environment. Here 82 | is an example: 83 | 84 | ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85 | 86 | *Note Defining Variables::, for more details. 87 | 88 | Compiling For Multiple Architectures 89 | ==================================== 90 | 91 | You can compile the package for more than one kind of computer at the 92 | same time, by placing the object files for each architecture in their 93 | own directory. To do this, you can use GNU `make'. `cd' to the 94 | directory where you want the object files and executables to go and run 95 | the `configure' script. `configure' automatically checks for the 96 | source code in the directory that `configure' is in and in `..'. 97 | 98 | With a non-GNU `make', it is safer to compile the package for one 99 | architecture at a time in the source code directory. After you have 100 | installed the package for one architecture, use `make distclean' before 101 | reconfiguring for another architecture. 102 | 103 | On MacOS X 10.5 and later systems, you can create libraries and 104 | executables that work on multiple system types--known as "fat" or 105 | "universal" binaries--by specifying multiple `-arch' options to the 106 | compiler but only a single `-arch' option to the preprocessor. Like 107 | this: 108 | 109 | ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110 | CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111 | CPP="gcc -E" CXXCPP="g++ -E" 112 | 113 | This is not guaranteed to produce working output in all cases, you 114 | may have to build one architecture at a time and combine the results 115 | using the `lipo' tool if you have problems. 116 | 117 | Installation Names 118 | ================== 119 | 120 | By default, `make install' installs the package's commands under 121 | `/usr/local/bin', include files under `/usr/local/include', etc. You 122 | can specify an installation prefix other than `/usr/local' by giving 123 | `configure' the option `--prefix=PREFIX'. 124 | 125 | You can specify separate installation prefixes for 126 | architecture-specific files and architecture-independent files. If you 127 | pass the option `--exec-prefix=PREFIX' to `configure', the package uses 128 | PREFIX as the prefix for installing programs and libraries. 129 | Documentation and other data files still use the regular prefix. 130 | 131 | In addition, if you use an unusual directory layout you can give 132 | options like `--bindir=DIR' to specify different values for particular 133 | kinds of files. Run `configure --help' for a list of the directories 134 | you can set and what kinds of files go in them. 135 | 136 | If the package supports it, you can cause programs to be installed 137 | with an extra prefix or suffix on their names by giving `configure' the 138 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139 | 140 | Optional Features 141 | ================= 142 | 143 | Some packages pay attention to `--enable-FEATURE' options to 144 | `configure', where FEATURE indicates an optional part of the package. 145 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE 146 | is something like `gnu-as' or `x' (for the X Window System). The 147 | `README' should mention any `--enable-' and `--with-' options that the 148 | package recognizes. 149 | 150 | For packages that use the X Window System, `configure' can usually 151 | find the X include and library files automatically, but if it doesn't, 152 | you can use the `configure' options `--x-includes=DIR' and 153 | `--x-libraries=DIR' to specify their locations. 154 | 155 | Particular systems 156 | ================== 157 | 158 | On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159 | CC is not installed, it is recommended to use the following options in 160 | order to use an ANSI C compiler: 161 | 162 | ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 163 | 164 | and if that doesn't work, install pre-built binaries of GCC for HP-UX. 165 | 166 | On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167 | parse its `' header file. The option `-nodtk' can be used as 168 | a workaround. If GNU CC is not installed, it is therefore recommended 169 | to try 170 | 171 | ./configure CC="cc" 172 | 173 | and if that doesn't work, try 174 | 175 | ./configure CC="cc -nodtk" 176 | 177 | On Solaris, don't put `/usr/ucb' early in your `PATH'. This 178 | directory contains several dysfunctional programs; working variants of 179 | these programs are available in `/usr/bin'. So, if you need `/usr/ucb' 180 | in your `PATH', put it _after_ `/usr/bin'. 181 | 182 | On Haiku, software installed for all users goes in `/boot/common', 183 | not `/usr/local'. It is recommended to use the following options: 184 | 185 | ./configure --prefix=/boot/common 186 | 187 | Specifying the System Type 188 | ========================== 189 | 190 | There may be some features `configure' cannot figure out 191 | automatically, but needs to determine by the type of machine the package 192 | will run on. Usually, assuming the package is built to be run on the 193 | _same_ architectures, `configure' can figure that out, but if it prints 194 | a message saying it cannot guess the machine type, give it the 195 | `--build=TYPE' option. TYPE can either be a short name for the system 196 | type, such as `sun4', or a canonical name which has the form: 197 | 198 | CPU-COMPANY-SYSTEM 199 | 200 | where SYSTEM can have one of these forms: 201 | 202 | OS 203 | KERNEL-OS 204 | 205 | See the file `config.sub' for the possible values of each field. If 206 | `config.sub' isn't included in this package, then this package doesn't 207 | need to know the machine type. 208 | 209 | If you are _building_ compiler tools for cross-compiling, you should 210 | use the option `--target=TYPE' to select the type of system they will 211 | produce code for. 212 | 213 | If you want to _use_ a cross compiler, that generates code for a 214 | platform different from the build platform, you should specify the 215 | "host" platform (i.e., that on which the generated programs will 216 | eventually be run) with `--host=TYPE'. 217 | 218 | Sharing Defaults 219 | ================ 220 | 221 | If you want to set default values for `configure' scripts to share, 222 | you can create a site shell script called `config.site' that gives 223 | default values for variables like `CC', `cache_file', and `prefix'. 224 | `configure' looks for `PREFIX/share/config.site' if it exists, then 225 | `PREFIX/etc/config.site' if it exists. Or, you can set the 226 | `CONFIG_SITE' environment variable to the location of the site script. 227 | A warning: not all `configure' scripts look for a site script. 228 | 229 | Defining Variables 230 | ================== 231 | 232 | Variables not defined in a site shell script can be set in the 233 | environment passed to `configure'. However, some packages may run 234 | configure again during the build, and the customized values of these 235 | variables may be lost. In order to avoid this problem, you should set 236 | them in the `configure' command line, using `VAR=value'. For example: 237 | 238 | ./configure CC=/usr/local2/bin/gcc 239 | 240 | causes the specified `gcc' to be used as the C compiler (unless it is 241 | overridden in the site shell script). 242 | 243 | Unfortunately, this technique does not work for `CONFIG_SHELL' due to 244 | an Autoconf bug. Until the bug is fixed you can use this workaround: 245 | 246 | CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 247 | 248 | `configure' Invocation 249 | ====================== 250 | 251 | `configure' recognizes the following options to control how it 252 | operates. 253 | 254 | `--help' 255 | `-h' 256 | Print a summary of all of the options to `configure', and exit. 257 | 258 | `--help=short' 259 | `--help=recursive' 260 | Print a summary of the options unique to this package's 261 | `configure', and exit. The `short' variant lists options used 262 | only in the top level, while the `recursive' variant lists options 263 | also present in any nested packages. 264 | 265 | `--version' 266 | `-V' 267 | Print the version of Autoconf used to generate the `configure' 268 | script, and exit. 269 | 270 | `--cache-file=FILE' 271 | Enable the cache: use and save the results of the tests in FILE, 272 | traditionally `config.cache'. FILE defaults to `/dev/null' to 273 | disable caching. 274 | 275 | `--config-cache' 276 | `-C' 277 | Alias for `--cache-file=config.cache'. 278 | 279 | `--quiet' 280 | `--silent' 281 | `-q' 282 | Do not print messages saying which checks are being made. To 283 | suppress all normal output, redirect it to `/dev/null' (any error 284 | messages will still be shown). 285 | 286 | `--srcdir=DIR' 287 | Look for the package's source code in directory DIR. Usually 288 | `configure' can determine that directory automatically. 289 | 290 | `--prefix=DIR' 291 | Use DIR as the installation prefix. *Note Installation Names:: 292 | for more details, including other options available for fine-tuning 293 | the installation locations. 294 | 295 | `--no-create' 296 | `-n' 297 | Run the configure checks, but stop before creating any output 298 | files. 299 | 300 | `configure' also accepts some other, not widely useful, options. Run 301 | `configure --help' for more details. 302 | 303 | -------------------------------------------------------------------------------- /install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2009-04-28.21; # UTC 5 | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was 7 | # later released in X11R6 (xc/config/util/install.sh) with the 8 | # following copyright and license. 9 | # 10 | # Copyright (C) 1994 X Consortium 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to 14 | # deal in the Software without restriction, including without limitation the 15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 16 | # sell copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name of the X Consortium shall not 30 | # be used in advertising or otherwise to promote the sale, use or other deal- 31 | # ings in this Software without prior written authorization from the X Consor- 32 | # tium. 33 | # 34 | # 35 | # FSF changes to this file are in the public domain. 36 | # 37 | # Calling this script install-sh is preferred over install.sh, to prevent 38 | # `make' implicit rules from creating a file called install from it 39 | # when there is no Makefile. 40 | # 41 | # This script is compatible with the BSD install script, but was written 42 | # from scratch. 43 | 44 | nl=' 45 | ' 46 | IFS=" "" $nl" 47 | 48 | # set DOITPROG to echo to test this script 49 | 50 | # Don't use :- since 4.3BSD and earlier shells don't like it. 51 | doit=${DOITPROG-} 52 | if test -z "$doit"; then 53 | doit_exec=exec 54 | else 55 | doit_exec=$doit 56 | fi 57 | 58 | # Put in absolute file names if you don't have them in your path; 59 | # or use environment vars. 60 | 61 | chgrpprog=${CHGRPPROG-chgrp} 62 | chmodprog=${CHMODPROG-chmod} 63 | chownprog=${CHOWNPROG-chown} 64 | cmpprog=${CMPPROG-cmp} 65 | cpprog=${CPPROG-cp} 66 | mkdirprog=${MKDIRPROG-mkdir} 67 | mvprog=${MVPROG-mv} 68 | rmprog=${RMPROG-rm} 69 | stripprog=${STRIPPROG-strip} 70 | 71 | posix_glob='?' 72 | initialize_posix_glob=' 73 | test "$posix_glob" != "?" || { 74 | if (set -f) 2>/dev/null; then 75 | posix_glob= 76 | else 77 | posix_glob=: 78 | fi 79 | } 80 | ' 81 | 82 | posix_mkdir= 83 | 84 | # Desired mode of installed file. 85 | mode=0755 86 | 87 | chgrpcmd= 88 | chmodcmd=$chmodprog 89 | chowncmd= 90 | mvcmd=$mvprog 91 | rmcmd="$rmprog -f" 92 | stripcmd= 93 | 94 | src= 95 | dst= 96 | dir_arg= 97 | dst_arg= 98 | 99 | copy_on_change=false 100 | no_target_directory= 101 | 102 | usage="\ 103 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE 104 | or: $0 [OPTION]... SRCFILES... DIRECTORY 105 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... 106 | or: $0 [OPTION]... -d DIRECTORIES... 107 | 108 | In the 1st form, copy SRCFILE to DSTFILE. 109 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. 110 | In the 4th, create DIRECTORIES. 111 | 112 | Options: 113 | --help display this help and exit. 114 | --version display version info and exit. 115 | 116 | -c (ignored) 117 | -C install only if different (preserve the last data modification time) 118 | -d create directories instead of installing files. 119 | -g GROUP $chgrpprog installed files to GROUP. 120 | -m MODE $chmodprog installed files to MODE. 121 | -o USER $chownprog installed files to USER. 122 | -s $stripprog installed files. 123 | -t DIRECTORY install into DIRECTORY. 124 | -T report an error if DSTFILE is a directory. 125 | 126 | Environment variables override the default commands: 127 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG 128 | RMPROG STRIPPROG 129 | " 130 | 131 | while test $# -ne 0; do 132 | case $1 in 133 | -c) ;; 134 | 135 | -C) copy_on_change=true;; 136 | 137 | -d) dir_arg=true;; 138 | 139 | -g) chgrpcmd="$chgrpprog $2" 140 | shift;; 141 | 142 | --help) echo "$usage"; exit $?;; 143 | 144 | -m) mode=$2 145 | case $mode in 146 | *' '* | *' '* | *' 147 | '* | *'*'* | *'?'* | *'['*) 148 | echo "$0: invalid mode: $mode" >&2 149 | exit 1;; 150 | esac 151 | shift;; 152 | 153 | -o) chowncmd="$chownprog $2" 154 | shift;; 155 | 156 | -s) stripcmd=$stripprog;; 157 | 158 | -t) dst_arg=$2 159 | shift;; 160 | 161 | -T) no_target_directory=true;; 162 | 163 | --version) echo "$0 $scriptversion"; exit $?;; 164 | 165 | --) shift 166 | break;; 167 | 168 | -*) echo "$0: invalid option: $1" >&2 169 | exit 1;; 170 | 171 | *) break;; 172 | esac 173 | shift 174 | done 175 | 176 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then 177 | # When -d is used, all remaining arguments are directories to create. 178 | # When -t is used, the destination is already specified. 179 | # Otherwise, the last argument is the destination. Remove it from $@. 180 | for arg 181 | do 182 | if test -n "$dst_arg"; then 183 | # $@ is not empty: it contains at least $arg. 184 | set fnord "$@" "$dst_arg" 185 | shift # fnord 186 | fi 187 | shift # arg 188 | dst_arg=$arg 189 | done 190 | fi 191 | 192 | if test $# -eq 0; then 193 | if test -z "$dir_arg"; then 194 | echo "$0: no input file specified." >&2 195 | exit 1 196 | fi 197 | # It's OK to call `install-sh -d' without argument. 198 | # This can happen when creating conditional directories. 199 | exit 0 200 | fi 201 | 202 | if test -z "$dir_arg"; then 203 | trap '(exit $?); exit' 1 2 13 15 204 | 205 | # Set umask so as not to create temps with too-generous modes. 206 | # However, 'strip' requires both read and write access to temps. 207 | case $mode in 208 | # Optimize common cases. 209 | *644) cp_umask=133;; 210 | *755) cp_umask=22;; 211 | 212 | *[0-7]) 213 | if test -z "$stripcmd"; then 214 | u_plus_rw= 215 | else 216 | u_plus_rw='% 200' 217 | fi 218 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; 219 | *) 220 | if test -z "$stripcmd"; then 221 | u_plus_rw= 222 | else 223 | u_plus_rw=,u+rw 224 | fi 225 | cp_umask=$mode$u_plus_rw;; 226 | esac 227 | fi 228 | 229 | for src 230 | do 231 | # Protect names starting with `-'. 232 | case $src in 233 | -*) src=./$src;; 234 | esac 235 | 236 | if test -n "$dir_arg"; then 237 | dst=$src 238 | dstdir=$dst 239 | test -d "$dstdir" 240 | dstdir_status=$? 241 | else 242 | 243 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command 244 | # might cause directories to be created, which would be especially bad 245 | # if $src (and thus $dsttmp) contains '*'. 246 | if test ! -f "$src" && test ! -d "$src"; then 247 | echo "$0: $src does not exist." >&2 248 | exit 1 249 | fi 250 | 251 | if test -z "$dst_arg"; then 252 | echo "$0: no destination specified." >&2 253 | exit 1 254 | fi 255 | 256 | dst=$dst_arg 257 | # Protect names starting with `-'. 258 | case $dst in 259 | -*) dst=./$dst;; 260 | esac 261 | 262 | # If destination is a directory, append the input filename; won't work 263 | # if double slashes aren't ignored. 264 | if test -d "$dst"; then 265 | if test -n "$no_target_directory"; then 266 | echo "$0: $dst_arg: Is a directory" >&2 267 | exit 1 268 | fi 269 | dstdir=$dst 270 | dst=$dstdir/`basename "$src"` 271 | dstdir_status=0 272 | else 273 | # Prefer dirname, but fall back on a substitute if dirname fails. 274 | dstdir=` 275 | (dirname "$dst") 2>/dev/null || 276 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 277 | X"$dst" : 'X\(//\)[^/]' \| \ 278 | X"$dst" : 'X\(//\)$' \| \ 279 | X"$dst" : 'X\(/\)' \| . 2>/dev/null || 280 | echo X"$dst" | 281 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 282 | s//\1/ 283 | q 284 | } 285 | /^X\(\/\/\)[^/].*/{ 286 | s//\1/ 287 | q 288 | } 289 | /^X\(\/\/\)$/{ 290 | s//\1/ 291 | q 292 | } 293 | /^X\(\/\).*/{ 294 | s//\1/ 295 | q 296 | } 297 | s/.*/./; q' 298 | ` 299 | 300 | test -d "$dstdir" 301 | dstdir_status=$? 302 | fi 303 | fi 304 | 305 | obsolete_mkdir_used=false 306 | 307 | if test $dstdir_status != 0; then 308 | case $posix_mkdir in 309 | '') 310 | # Create intermediate dirs using mode 755 as modified by the umask. 311 | # This is like FreeBSD 'install' as of 1997-10-28. 312 | umask=`umask` 313 | case $stripcmd.$umask in 314 | # Optimize common cases. 315 | *[2367][2367]) mkdir_umask=$umask;; 316 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; 317 | 318 | *[0-7]) 319 | mkdir_umask=`expr $umask + 22 \ 320 | - $umask % 100 % 40 + $umask % 20 \ 321 | - $umask % 10 % 4 + $umask % 2 322 | `;; 323 | *) mkdir_umask=$umask,go-w;; 324 | esac 325 | 326 | # With -d, create the new directory with the user-specified mode. 327 | # Otherwise, rely on $mkdir_umask. 328 | if test -n "$dir_arg"; then 329 | mkdir_mode=-m$mode 330 | else 331 | mkdir_mode= 332 | fi 333 | 334 | posix_mkdir=false 335 | case $umask in 336 | *[123567][0-7][0-7]) 337 | # POSIX mkdir -p sets u+wx bits regardless of umask, which 338 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. 339 | ;; 340 | *) 341 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ 342 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 343 | 344 | if (umask $mkdir_umask && 345 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 346 | then 347 | if test -z "$dir_arg" || { 348 | # Check for POSIX incompatibilities with -m. 349 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or 350 | # other-writeable bit of parent directory when it shouldn't. 351 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. 352 | ls_ld_tmpdir=`ls -ld "$tmpdir"` 353 | case $ls_ld_tmpdir in 354 | d????-?r-*) different_mode=700;; 355 | d????-?--*) different_mode=755;; 356 | *) false;; 357 | esac && 358 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { 359 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` 360 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" 361 | } 362 | } 363 | then posix_mkdir=: 364 | fi 365 | rmdir "$tmpdir/d" "$tmpdir" 366 | else 367 | # Remove any dirs left behind by ancient mkdir implementations. 368 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null 369 | fi 370 | trap '' 0;; 371 | esac;; 372 | esac 373 | 374 | if 375 | $posix_mkdir && ( 376 | umask $mkdir_umask && 377 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" 378 | ) 379 | then : 380 | else 381 | 382 | # The umask is ridiculous, or mkdir does not conform to POSIX, 383 | # or it failed possibly due to a race condition. Create the 384 | # directory the slow way, step by step, checking for races as we go. 385 | 386 | case $dstdir in 387 | /*) prefix='/';; 388 | -*) prefix='./';; 389 | *) prefix='';; 390 | esac 391 | 392 | eval "$initialize_posix_glob" 393 | 394 | oIFS=$IFS 395 | IFS=/ 396 | $posix_glob set -f 397 | set fnord $dstdir 398 | shift 399 | $posix_glob set +f 400 | IFS=$oIFS 401 | 402 | prefixes= 403 | 404 | for d 405 | do 406 | test -z "$d" && continue 407 | 408 | prefix=$prefix$d 409 | if test -d "$prefix"; then 410 | prefixes= 411 | else 412 | if $posix_mkdir; then 413 | (umask=$mkdir_umask && 414 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break 415 | # Don't fail if two instances are running concurrently. 416 | test -d "$prefix" || exit 1 417 | else 418 | case $prefix in 419 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; 420 | *) qprefix=$prefix;; 421 | esac 422 | prefixes="$prefixes '$qprefix'" 423 | fi 424 | fi 425 | prefix=$prefix/ 426 | done 427 | 428 | if test -n "$prefixes"; then 429 | # Don't fail if two instances are running concurrently. 430 | (umask $mkdir_umask && 431 | eval "\$doit_exec \$mkdirprog $prefixes") || 432 | test -d "$dstdir" || exit 1 433 | obsolete_mkdir_used=true 434 | fi 435 | fi 436 | fi 437 | 438 | if test -n "$dir_arg"; then 439 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && 440 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && 441 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || 442 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 443 | else 444 | 445 | # Make a couple of temp file names in the proper directory. 446 | dsttmp=$dstdir/_inst.$$_ 447 | rmtmp=$dstdir/_rm.$$_ 448 | 449 | # Trap to clean up those temp files at exit. 450 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 451 | 452 | # Copy the file name to the temp name. 453 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && 454 | 455 | # and set any options; do chmod last to preserve setuid bits. 456 | # 457 | # If any of these fail, we abort the whole thing. If we want to 458 | # ignore errors from any of these, just make sure not to ignore 459 | # errors from the above "$doit $cpprog $src $dsttmp" command. 460 | # 461 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && 462 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && 463 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && 464 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && 465 | 466 | # If -C, don't bother to copy if it wouldn't change the file. 467 | if $copy_on_change && 468 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && 469 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && 470 | 471 | eval "$initialize_posix_glob" && 472 | $posix_glob set -f && 473 | set X $old && old=:$2:$4:$5:$6 && 474 | set X $new && new=:$2:$4:$5:$6 && 475 | $posix_glob set +f && 476 | 477 | test "$old" = "$new" && 478 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 479 | then 480 | rm -f "$dsttmp" 481 | else 482 | # Rename the file to the real destination. 483 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || 484 | 485 | # The rename failed, perhaps because mv can't rename something else 486 | # to itself, or perhaps because mv is so ancient that it does not 487 | # support -f. 488 | { 489 | # Now remove or move aside any old file at destination location. 490 | # We try this two ways since rm can't unlink itself on some 491 | # systems and the destination file might be busy for other 492 | # reasons. In this case, the final cleanup might fail but the new 493 | # file should still install successfully. 494 | { 495 | test ! -f "$dst" || 496 | $doit $rmcmd -f "$dst" 2>/dev/null || 497 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && 498 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } 499 | } || 500 | { echo "$0: cannot unlink or rename $dst" >&2 501 | (exit 1); exit 1 502 | } 503 | } && 504 | 505 | # Now rename the file to the real destination. 506 | $doit $mvcmd "$dsttmp" "$dst" 507 | } 508 | fi || exit 1 509 | 510 | trap '' 0 511 | fi 512 | done 513 | 514 | # Local variables: 515 | # eval: (add-hook 'write-file-hooks 'time-stamp) 516 | # time-stamp-start: "scriptversion=" 517 | # time-stamp-format: "%:y-%02m-%02d.%02H" 518 | # time-stamp-time-zone: "UTC" 519 | # time-stamp-end: "; # UTC" 520 | # End: 521 | -------------------------------------------------------------------------------- /src/ministat.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ---------------------------------------------------------------------------- 3 | * "THE BEER-WARE LICENSE" (Revision 42): 4 | * wrote this file. As long as you retain this notice you 5 | * can do whatever you want with this stuff. If we meet some day, and you think 6 | * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 | * ---------------------------------------------------------------------------- 8 | * 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #define NSTUDENT 100 21 | #define NCONF 6 22 | double const studentpct[] = { 80, 90, 95, 98, 99, 99.5 }; 23 | double student [NSTUDENT + 1][NCONF] = { 24 | /* inf */ { 1.282, 1.645, 1.960, 2.326, 2.576, 3.090 }, 25 | /* 1. */ { 3.078, 6.314, 12.706, 31.821, 63.657, 318.313 }, 26 | /* 2. */ { 1.886, 2.920, 4.303, 6.965, 9.925, 22.327 }, 27 | /* 3. */ { 1.638, 2.353, 3.182, 4.541, 5.841, 10.215 }, 28 | /* 4. */ { 1.533, 2.132, 2.776, 3.747, 4.604, 7.173 }, 29 | /* 5. */ { 1.476, 2.015, 2.571, 3.365, 4.032, 5.893 }, 30 | /* 6. */ { 1.440, 1.943, 2.447, 3.143, 3.707, 5.208 }, 31 | /* 7. */ { 1.415, 1.895, 2.365, 2.998, 3.499, 4.782 }, 32 | /* 8. */ { 1.397, 1.860, 2.306, 2.896, 3.355, 4.499 }, 33 | /* 9. */ { 1.383, 1.833, 2.262, 2.821, 3.250, 4.296 }, 34 | /* 10. */ { 1.372, 1.812, 2.228, 2.764, 3.169, 4.143 }, 35 | /* 11. */ { 1.363, 1.796, 2.201, 2.718, 3.106, 4.024 }, 36 | /* 12. */ { 1.356, 1.782, 2.179, 2.681, 3.055, 3.929 }, 37 | /* 13. */ { 1.350, 1.771, 2.160, 2.650, 3.012, 3.852 }, 38 | /* 14. */ { 1.345, 1.761, 2.145, 2.624, 2.977, 3.787 }, 39 | /* 15. */ { 1.341, 1.753, 2.131, 2.602, 2.947, 3.733 }, 40 | /* 16. */ { 1.337, 1.746, 2.120, 2.583, 2.921, 3.686 }, 41 | /* 17. */ { 1.333, 1.740, 2.110, 2.567, 2.898, 3.646 }, 42 | /* 18. */ { 1.330, 1.734, 2.101, 2.552, 2.878, 3.610 }, 43 | /* 19. */ { 1.328, 1.729, 2.093, 2.539, 2.861, 3.579 }, 44 | /* 20. */ { 1.325, 1.725, 2.086, 2.528, 2.845, 3.552 }, 45 | /* 21. */ { 1.323, 1.721, 2.080, 2.518, 2.831, 3.527 }, 46 | /* 22. */ { 1.321, 1.717, 2.074, 2.508, 2.819, 3.505 }, 47 | /* 23. */ { 1.319, 1.714, 2.069, 2.500, 2.807, 3.485 }, 48 | /* 24. */ { 1.318, 1.711, 2.064, 2.492, 2.797, 3.467 }, 49 | /* 25. */ { 1.316, 1.708, 2.060, 2.485, 2.787, 3.450 }, 50 | /* 26. */ { 1.315, 1.706, 2.056, 2.479, 2.779, 3.435 }, 51 | /* 27. */ { 1.314, 1.703, 2.052, 2.473, 2.771, 3.421 }, 52 | /* 28. */ { 1.313, 1.701, 2.048, 2.467, 2.763, 3.408 }, 53 | /* 29. */ { 1.311, 1.699, 2.045, 2.462, 2.756, 3.396 }, 54 | /* 30. */ { 1.310, 1.697, 2.042, 2.457, 2.750, 3.385 }, 55 | /* 31. */ { 1.309, 1.696, 2.040, 2.453, 2.744, 3.375 }, 56 | /* 32. */ { 1.309, 1.694, 2.037, 2.449, 2.738, 3.365 }, 57 | /* 33. */ { 1.308, 1.692, 2.035, 2.445, 2.733, 3.356 }, 58 | /* 34. */ { 1.307, 1.691, 2.032, 2.441, 2.728, 3.348 }, 59 | /* 35. */ { 1.306, 1.690, 2.030, 2.438, 2.724, 3.340 }, 60 | /* 36. */ { 1.306, 1.688, 2.028, 2.434, 2.719, 3.333 }, 61 | /* 37. */ { 1.305, 1.687, 2.026, 2.431, 2.715, 3.326 }, 62 | /* 38. */ { 1.304, 1.686, 2.024, 2.429, 2.712, 3.319 }, 63 | /* 39. */ { 1.304, 1.685, 2.023, 2.426, 2.708, 3.313 }, 64 | /* 40. */ { 1.303, 1.684, 2.021, 2.423, 2.704, 3.307 }, 65 | /* 41. */ { 1.303, 1.683, 2.020, 2.421, 2.701, 3.301 }, 66 | /* 42. */ { 1.302, 1.682, 2.018, 2.418, 2.698, 3.296 }, 67 | /* 43. */ { 1.302, 1.681, 2.017, 2.416, 2.695, 3.291 }, 68 | /* 44. */ { 1.301, 1.680, 2.015, 2.414, 2.692, 3.286 }, 69 | /* 45. */ { 1.301, 1.679, 2.014, 2.412, 2.690, 3.281 }, 70 | /* 46. */ { 1.300, 1.679, 2.013, 2.410, 2.687, 3.277 }, 71 | /* 47. */ { 1.300, 1.678, 2.012, 2.408, 2.685, 3.273 }, 72 | /* 48. */ { 1.299, 1.677, 2.011, 2.407, 2.682, 3.269 }, 73 | /* 49. */ { 1.299, 1.677, 2.010, 2.405, 2.680, 3.265 }, 74 | /* 50. */ { 1.299, 1.676, 2.009, 2.403, 2.678, 3.261 }, 75 | /* 51. */ { 1.298, 1.675, 2.008, 2.402, 2.676, 3.258 }, 76 | /* 52. */ { 1.298, 1.675, 2.007, 2.400, 2.674, 3.255 }, 77 | /* 53. */ { 1.298, 1.674, 2.006, 2.399, 2.672, 3.251 }, 78 | /* 54. */ { 1.297, 1.674, 2.005, 2.397, 2.670, 3.248 }, 79 | /* 55. */ { 1.297, 1.673, 2.004, 2.396, 2.668, 3.245 }, 80 | /* 56. */ { 1.297, 1.673, 2.003, 2.395, 2.667, 3.242 }, 81 | /* 57. */ { 1.297, 1.672, 2.002, 2.394, 2.665, 3.239 }, 82 | /* 58. */ { 1.296, 1.672, 2.002, 2.392, 2.663, 3.237 }, 83 | /* 59. */ { 1.296, 1.671, 2.001, 2.391, 2.662, 3.234 }, 84 | /* 60. */ { 1.296, 1.671, 2.000, 2.390, 2.660, 3.232 }, 85 | /* 61. */ { 1.296, 1.670, 2.000, 2.389, 2.659, 3.229 }, 86 | /* 62. */ { 1.295, 1.670, 1.999, 2.388, 2.657, 3.227 }, 87 | /* 63. */ { 1.295, 1.669, 1.998, 2.387, 2.656, 3.225 }, 88 | /* 64. */ { 1.295, 1.669, 1.998, 2.386, 2.655, 3.223 }, 89 | /* 65. */ { 1.295, 1.669, 1.997, 2.385, 2.654, 3.220 }, 90 | /* 66. */ { 1.295, 1.668, 1.997, 2.384, 2.652, 3.218 }, 91 | /* 67. */ { 1.294, 1.668, 1.996, 2.383, 2.651, 3.216 }, 92 | /* 68. */ { 1.294, 1.668, 1.995, 2.382, 2.650, 3.214 }, 93 | /* 69. */ { 1.294, 1.667, 1.995, 2.382, 2.649, 3.213 }, 94 | /* 70. */ { 1.294, 1.667, 1.994, 2.381, 2.648, 3.211 }, 95 | /* 71. */ { 1.294, 1.667, 1.994, 2.380, 2.647, 3.209 }, 96 | /* 72. */ { 1.293, 1.666, 1.993, 2.379, 2.646, 3.207 }, 97 | /* 73. */ { 1.293, 1.666, 1.993, 2.379, 2.645, 3.206 }, 98 | /* 74. */ { 1.293, 1.666, 1.993, 2.378, 2.644, 3.204 }, 99 | /* 75. */ { 1.293, 1.665, 1.992, 2.377, 2.643, 3.202 }, 100 | /* 76. */ { 1.293, 1.665, 1.992, 2.376, 2.642, 3.201 }, 101 | /* 77. */ { 1.293, 1.665, 1.991, 2.376, 2.641, 3.199 }, 102 | /* 78. */ { 1.292, 1.665, 1.991, 2.375, 2.640, 3.198 }, 103 | /* 79. */ { 1.292, 1.664, 1.990, 2.374, 2.640, 3.197 }, 104 | /* 80. */ { 1.292, 1.664, 1.990, 2.374, 2.639, 3.195 }, 105 | /* 81. */ { 1.292, 1.664, 1.990, 2.373, 2.638, 3.194 }, 106 | /* 82. */ { 1.292, 1.664, 1.989, 2.373, 2.637, 3.193 }, 107 | /* 83. */ { 1.292, 1.663, 1.989, 2.372, 2.636, 3.191 }, 108 | /* 84. */ { 1.292, 1.663, 1.989, 2.372, 2.636, 3.190 }, 109 | /* 85. */ { 1.292, 1.663, 1.988, 2.371, 2.635, 3.189 }, 110 | /* 86. */ { 1.291, 1.663, 1.988, 2.370, 2.634, 3.188 }, 111 | /* 87. */ { 1.291, 1.663, 1.988, 2.370, 2.634, 3.187 }, 112 | /* 88. */ { 1.291, 1.662, 1.987, 2.369, 2.633, 3.185 }, 113 | /* 89. */ { 1.291, 1.662, 1.987, 2.369, 2.632, 3.184 }, 114 | /* 90. */ { 1.291, 1.662, 1.987, 2.368, 2.632, 3.183 }, 115 | /* 91. */ { 1.291, 1.662, 1.986, 2.368, 2.631, 3.182 }, 116 | /* 92. */ { 1.291, 1.662, 1.986, 2.368, 2.630, 3.181 }, 117 | /* 93. */ { 1.291, 1.661, 1.986, 2.367, 2.630, 3.180 }, 118 | /* 94. */ { 1.291, 1.661, 1.986, 2.367, 2.629, 3.179 }, 119 | /* 95. */ { 1.291, 1.661, 1.985, 2.366, 2.629, 3.178 }, 120 | /* 96. */ { 1.290, 1.661, 1.985, 2.366, 2.628, 3.177 }, 121 | /* 97. */ { 1.290, 1.661, 1.985, 2.365, 2.627, 3.176 }, 122 | /* 98. */ { 1.290, 1.661, 1.984, 2.365, 2.627, 3.175 }, 123 | /* 99. */ { 1.290, 1.660, 1.984, 2.365, 2.626, 3.175 }, 124 | /* 100. */ { 1.290, 1.660, 1.984, 2.364, 2.626, 3.174 } 125 | }; 126 | 127 | #define MAX_DS 8 128 | static char symbol[MAX_DS] = { ' ', 'x', '+', '*', '%', '#', '@', 'O' }; 129 | 130 | TAILQ_HEAD(pointlist, point); 131 | 132 | struct dataset { 133 | char *name; 134 | struct pointlist list; 135 | double sy, syy; 136 | int n; 137 | }; 138 | 139 | static struct dataset * 140 | NewSet(void) 141 | { 142 | struct dataset *ds; 143 | 144 | ds = calloc(1, sizeof *ds); 145 | TAILQ_INIT(&ds->list); 146 | return(ds); 147 | } 148 | 149 | struct point { 150 | TAILQ_ENTRY(point) list; 151 | double val; 152 | }; 153 | 154 | static void 155 | AddPoint(struct dataset *ds, double a) 156 | { 157 | struct point *pp, *pp2; 158 | 159 | pp = calloc(1, sizeof *pp); 160 | pp->val = a; 161 | 162 | ds->n++; 163 | ds->sy += a; 164 | ds->syy += a * a; 165 | if (TAILQ_EMPTY(&ds->list)) { 166 | TAILQ_INSERT_HEAD(&ds->list, pp, list); 167 | return; 168 | } 169 | TAILQ_FOREACH(pp2, &ds->list, list) { 170 | if (pp->val < pp2->val) { 171 | TAILQ_INSERT_BEFORE(pp2, pp, list); 172 | return; 173 | } 174 | } 175 | TAILQ_INSERT_TAIL(&ds->list, pp, list); 176 | } 177 | 178 | static double 179 | Min(struct dataset *ds) 180 | { 181 | 182 | return (TAILQ_FIRST(&ds->list)->val); 183 | } 184 | 185 | static double 186 | Max(struct dataset *ds) 187 | { 188 | 189 | return(TAILQ_LAST(&ds->list, pointlist)->val); 190 | } 191 | 192 | static double 193 | Avg(struct dataset *ds) 194 | { 195 | 196 | return(ds->sy / ds->n); 197 | } 198 | 199 | static double 200 | Median(struct dataset *ds) 201 | { 202 | int even, i; 203 | struct point *p1, *p2; 204 | 205 | if ((ds->n % 2) == 1) { 206 | i = (ds->n / 2) + 1; 207 | even = 0; 208 | } else { 209 | i = ds->n / 2; 210 | even = 1; 211 | } 212 | TAILQ_FOREACH(p1, &ds->list, list) { 213 | --i; 214 | if (i == 0) 215 | break; 216 | } 217 | if (even) { 218 | p2 = TAILQ_NEXT(p1, list); 219 | return ((p2->val + p1->val) / 2); 220 | } 221 | return (p1->val); 222 | } 223 | 224 | static double 225 | Var(struct dataset *ds) 226 | { 227 | 228 | return (ds->syy - ds->sy * ds->sy / ds->n) / (ds->n - 1.0); 229 | } 230 | 231 | static double 232 | Stddev(struct dataset *ds) 233 | { 234 | 235 | return sqrt(Var(ds)); 236 | } 237 | 238 | static void 239 | VitalsHead(void) 240 | { 241 | 242 | printf(" N Min Max Median Avg Stddev\n"); 243 | } 244 | 245 | static void 246 | Vitals(struct dataset *ds, int flag) 247 | { 248 | double a; 249 | 250 | printf("%c %3d %13.8g %13.8g %13.8g %13.8g %13.8g", symbol[flag], 251 | ds->n, Min(ds), Max(ds), Median(ds), Avg(ds), Stddev(ds)); 252 | printf("\n"); 253 | } 254 | 255 | static void 256 | Relative(struct dataset *ds, struct dataset *rs, int confidx) 257 | { 258 | double spool, s, d, e, t; 259 | int i, c; 260 | 261 | i = ds->n + rs->n - 2; 262 | if (i > NSTUDENT) 263 | t = student[0][confidx]; 264 | else 265 | t = student[i][confidx]; 266 | spool = (ds->n - 1) * Var(ds) + (rs->n - 1) * Var(rs); 267 | spool /= ds->n + rs->n - 2; 268 | spool = sqrt(spool); 269 | s = spool * sqrt(1.0 / ds->n + 1.0 / rs->n); 270 | d = Avg(ds) - Avg(rs); 271 | e = t * s; 272 | 273 | if (fabs(d) > e) { 274 | 275 | printf("Difference at %.1f%% confidence\n", studentpct[confidx]); 276 | printf(" %g +/- %g\n", d, e); 277 | printf(" %g%% +/- %g%%\n", d * 100 / Avg(rs), e * 100 / Avg(rs)); 278 | printf(" (Student's t, pooled s = %g)\n", spool); 279 | } else { 280 | printf("No difference proven at %.1f%% confidence\n", 281 | studentpct[confidx]); 282 | } 283 | } 284 | 285 | struct plot { 286 | double min; 287 | double max; 288 | double span; 289 | int width; 290 | 291 | double x0, dx; 292 | int height; 293 | char *data; 294 | char **bar; 295 | int separate_bars; 296 | int num_datasets; 297 | }; 298 | 299 | static struct plot plot; 300 | 301 | static void 302 | SetupPlot(int width, int separate, int num_datasets) 303 | { 304 | struct plot *pl; 305 | 306 | pl = &plot; 307 | pl->width = width; 308 | pl->height = 0; 309 | pl->data = NULL; 310 | pl->bar = NULL; 311 | pl->separate_bars = separate; 312 | pl->num_datasets = num_datasets; 313 | pl->min = 999e99; 314 | pl->max = -999e99; 315 | } 316 | 317 | static void 318 | AdjPlot(double a) 319 | { 320 | struct plot *pl; 321 | 322 | pl = &plot; 323 | if (a < pl->min) 324 | pl->min = a; 325 | if (a > pl->max) 326 | pl->max = a; 327 | pl->span = pl->max - pl->min; 328 | pl->dx = pl->span / (pl->width - 1.0); 329 | pl->x0 = pl->min - .5 * pl->dx; 330 | } 331 | 332 | static void 333 | DimPlot(struct dataset *ds) 334 | { 335 | AdjPlot(Min(ds)); 336 | AdjPlot(Max(ds)); 337 | AdjPlot(Avg(ds) - Stddev(ds)); 338 | AdjPlot(Avg(ds) + Stddev(ds)); 339 | } 340 | 341 | static void 342 | PlotSet(struct dataset *ds, int val) 343 | { 344 | struct plot *pl; 345 | struct point *pp; 346 | int i, j, m, x; 347 | int bar; 348 | 349 | pl = &plot; 350 | if (pl->span == 0) 351 | return; 352 | 353 | if (pl->separate_bars) 354 | bar = val-1; 355 | else 356 | bar = 0; 357 | 358 | if (pl->bar == NULL) { 359 | pl->bar = malloc(sizeof(char *) * pl->num_datasets); 360 | memset(pl->bar, 0, sizeof(char*) * pl->num_datasets); 361 | } 362 | if (pl->bar[bar] == NULL) { 363 | pl->bar[bar] = malloc(pl->width); 364 | memset(pl->bar[bar], 0, pl->width); 365 | } 366 | 367 | m = 1; 368 | i = -1; 369 | j = 0; 370 | TAILQ_FOREACH(pp, &ds->list, list) { 371 | x = (pp->val - pl->x0) / pl->dx; 372 | if (x == i) { 373 | j++; 374 | if (j > m) 375 | m = j; 376 | } else { 377 | j = 1; 378 | i = x; 379 | } 380 | } 381 | m += 1; 382 | if (m > pl->height) { 383 | pl->data = realloc(pl->data, pl->width * m); 384 | memset(pl->data + pl->height * pl->width, 0, 385 | (m - pl->height) * pl->width); 386 | } 387 | pl->height = m; 388 | i = -1; 389 | TAILQ_FOREACH(pp, &ds->list, list) { 390 | x = (pp->val - pl->x0) / pl->dx; 391 | if (x == i) { 392 | j++; 393 | } else { 394 | j = 1; 395 | i = x; 396 | } 397 | pl->data[j * pl->width + x] |= val; 398 | } 399 | if (!isnan(Stddev(ds))) { 400 | x = ((Avg(ds) - Stddev(ds)) - pl->x0) / pl->dx; 401 | m = ((Avg(ds) + Stddev(ds)) - pl->x0) / pl->dx; 402 | pl->bar[bar][m] = '|'; 403 | pl->bar[bar][x] = '|'; 404 | for (i = x + 1; i < m; i++) 405 | if (pl->bar[bar][i] == 0) 406 | pl->bar[bar][i] = '_'; 407 | } 408 | x = (Median(ds) - pl->x0) / pl->dx; 409 | pl->bar[bar][x] = 'M'; 410 | x = (Avg(ds) - pl->x0) / pl->dx; 411 | pl->bar[bar][x] = 'A'; 412 | } 413 | 414 | static void 415 | DumpPlot(void) 416 | { 417 | struct plot *pl; 418 | int i, j, k; 419 | 420 | pl = &plot; 421 | if (pl->span == 0) { 422 | printf("[no plot, span is zero width]\n"); 423 | return; 424 | } 425 | 426 | putchar('+'); 427 | for (i = 0; i < pl->width; i++) 428 | putchar('-'); 429 | putchar('+'); 430 | putchar('\n'); 431 | for (i = 1; i < pl->height; i++) { 432 | putchar('|'); 433 | for (j = 0; j < pl->width; j++) { 434 | k = pl->data[(pl->height - i) * pl->width + j]; 435 | if (k >= 0 && k < MAX_DS) 436 | putchar(symbol[k]); 437 | else 438 | printf("[%02x]", k); 439 | } 440 | putchar('|'); 441 | putchar('\n'); 442 | } 443 | for (i = 0; i < pl->num_datasets; i++) { 444 | if (pl->bar[i] == NULL) 445 | continue; 446 | putchar('|'); 447 | for (j = 0; j < pl->width; j++) { 448 | k = pl->bar[i][j]; 449 | if (k == 0) 450 | k = ' '; 451 | putchar(k); 452 | } 453 | putchar('|'); 454 | putchar('\n'); 455 | } 456 | putchar('+'); 457 | for (i = 0; i < pl->width; i++) 458 | putchar('-'); 459 | putchar('+'); 460 | putchar('\n'); 461 | } 462 | 463 | 464 | static struct dataset * 465 | ReadSet(char *n, int column, char *delim) 466 | { 467 | FILE *f; 468 | char buf[BUFSIZ], *p, *t; 469 | struct dataset *s; 470 | double d; 471 | int line; 472 | int i; 473 | 474 | if (n == NULL) { 475 | f = stdin; 476 | n = ""; 477 | } else if (!strcmp(n, "-")) { 478 | f = stdin; 479 | n = ""; 480 | } else { 481 | f = fopen(n, "r"); 482 | } 483 | if (f == NULL) 484 | err(1, "Cannot open %s", n); 485 | s = NewSet(); 486 | s->name = strdup(n); 487 | line = 0; 488 | while (fgets(buf, sizeof buf, f) != NULL) { 489 | line++; 490 | 491 | i = strlen(buf); 492 | if (buf[i-1] == '\n') 493 | buf[i-1] = '\0'; 494 | for (i = 1, t = strtok(buf, delim); 495 | t != NULL && *t != '#'; 496 | i++, t = strtok(NULL, delim)) { 497 | if (i == column) 498 | break; 499 | } 500 | if (t == NULL || *t == '#') 501 | continue; 502 | 503 | d = strtod(t, &p); 504 | if (p != NULL && *p != '\0') 505 | err(2, "Invalid data on line %d in %s\n", line, n); 506 | if (*buf != '\0') 507 | AddPoint(s, d); 508 | } 509 | fclose(f); 510 | if (s->n < 3) { 511 | fprintf(stderr, 512 | "Dataset %s must contain at least 3 data points\n", n); 513 | exit (2); 514 | } 515 | return (s); 516 | } 517 | 518 | static void 519 | usage(char const *whine) 520 | { 521 | int i; 522 | 523 | fprintf(stderr, "%s\n", whine); 524 | fprintf(stderr, 525 | "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-ns] [-w width] [file [file ...]]\n"); 526 | fprintf(stderr, "\tconfidence = {"); 527 | for (i = 0; i < NCONF; i++) { 528 | fprintf(stderr, "%s%g%%", 529 | i ? ", " : "", 530 | studentpct[i]); 531 | } 532 | fprintf(stderr, "}\n"); 533 | fprintf(stderr, "\t-C : column number to extract (starts and defaults to 1)\n"); 534 | fprintf(stderr, "\t-d : delimiter(s) string, default to \" \\t\"\n"); 535 | fprintf(stderr, "\t-n : print summary statistics only, no graph/test\n"); 536 | fprintf(stderr, "\t-s : print avg/median/stddev bars on separate lines\n"); 537 | fprintf(stderr, "\t-w : width of graph/test output (default 74 or terminal width)\n"); 538 | exit (2); 539 | } 540 | 541 | int 542 | main(int argc, char **argv) 543 | { 544 | struct dataset *ds[7]; 545 | int nds; 546 | double a; 547 | char *delim = " \t"; 548 | char *p; 549 | int c, i, ci; 550 | int column = 1; 551 | int flag_s = 0; 552 | int flag_n = 0; 553 | int termwidth = 74; 554 | 555 | if (isatty(STDOUT_FILENO)) { 556 | struct winsize wsz; 557 | 558 | if ((p = getenv("COLUMNS")) != NULL && *p != '\0') 559 | termwidth = atoi(p); 560 | else if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &wsz) != -1 && 561 | wsz.ws_col > 0) 562 | termwidth = wsz.ws_col - 2; 563 | } 564 | 565 | ci = -1; 566 | while ((c = getopt(argc, argv, "C:c:d:snw:")) != -1) 567 | switch (c) { 568 | case 'C': 569 | column = strtol(optarg, &p, 10); 570 | if (p != NULL && *p != '\0') 571 | usage("Invalid column number."); 572 | if (column <= 0) 573 | usage("Column number should be positive."); 574 | break; 575 | case 'c': 576 | a = strtod(optarg, &p); 577 | if (p != NULL && *p != '\0') 578 | usage("Not a floating point number"); 579 | for (i = 0; i < NCONF; i++) 580 | if (a == studentpct[i]) 581 | ci = i; 582 | if (ci == -1) 583 | usage("No support for confidence level"); 584 | break; 585 | case 'd': 586 | if (*optarg == '\0') 587 | usage("Can't use empty delimiter string"); 588 | delim = optarg; 589 | break; 590 | case 'n': 591 | flag_n = 1; 592 | break; 593 | case 's': 594 | flag_s = 1; 595 | break; 596 | case 'w': 597 | termwidth = strtol(optarg, &p, 10); 598 | if (p != NULL && *p != '\0') 599 | usage("Invalid width, not a number."); 600 | if (termwidth < 0) 601 | usage("Unable to move beyond left margin."); 602 | break; 603 | default: 604 | usage("Unknown option"); 605 | break; 606 | } 607 | if (ci == -1) 608 | ci = 2; 609 | argc -= optind; 610 | argv += optind; 611 | 612 | if (argc == 0) { 613 | ds[0] = ReadSet("-", column, delim); 614 | nds = 1; 615 | } else { 616 | if (argc > (MAX_DS - 1)) 617 | usage("Too many datasets."); 618 | nds = argc; 619 | for (i = 0; i < nds; i++) 620 | ds[i] = ReadSet(argv[i], column, delim); 621 | } 622 | 623 | for (i = 0; i < nds; i++) 624 | printf("%c %s\n", symbol[i+1], ds[i]->name); 625 | 626 | if (!flag_n) { 627 | SetupPlot(termwidth, flag_s, nds); 628 | for (i = 0; i < nds; i++) 629 | DimPlot(ds[i]); 630 | for (i = 0; i < nds; i++) 631 | PlotSet(ds[i], i + 1); 632 | DumpPlot(); 633 | } 634 | VitalsHead(); 635 | Vitals(ds[0], 1); 636 | for (i = 1; i < nds; i++) { 637 | Vitals(ds[i], i + 1); 638 | if (!flag_n) 639 | Relative(ds[i], ds[0], ci); 640 | } 641 | exit(0); 642 | } 643 | -------------------------------------------------------------------------------- /src/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.11 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 6 | # Inc. 7 | # This Makefile.in is free software; the Free Software Foundation 8 | # gives unlimited permission to copy and/or distribute it, 9 | # with or without modifications, as long as this notice is preserved. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 | # PARTICULAR PURPOSE. 15 | 16 | @SET_MAKE@ 17 | 18 | VPATH = @srcdir@ 19 | pkgdatadir = $(datadir)/@PACKAGE@ 20 | pkgincludedir = $(includedir)/@PACKAGE@ 21 | pkglibdir = $(libdir)/@PACKAGE@ 22 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 24 | install_sh_DATA = $(install_sh) -c -m 644 25 | install_sh_PROGRAM = $(install_sh) -c 26 | install_sh_SCRIPT = $(install_sh) -c 27 | INSTALL_HEADER = $(INSTALL_DATA) 28 | transform = $(program_transform_name) 29 | NORMAL_INSTALL = : 30 | PRE_INSTALL = : 31 | POST_INSTALL = : 32 | NORMAL_UNINSTALL = : 33 | PRE_UNINSTALL = : 34 | POST_UNINSTALL = : 35 | bin_PROGRAMS = ministat$(EXEEXT) 36 | subdir = src 37 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 38 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 39 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 40 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 41 | $(ACLOCAL_M4) 42 | mkinstalldirs = $(install_sh) -d 43 | CONFIG_CLEAN_FILES = 44 | CONFIG_CLEAN_VPATH_FILES = 45 | am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" 46 | PROGRAMS = $(bin_PROGRAMS) 47 | ministat_SOURCES = ministat.c 48 | ministat_OBJECTS = ministat.$(OBJEXT) 49 | ministat_LDADD = $(LDADD) 50 | DEFAULT_INCLUDES = -I.@am__isrc@ 51 | depcomp = $(SHELL) $(top_srcdir)/depcomp 52 | am__depfiles_maybe = depfiles 53 | am__mv = mv -f 54 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 55 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 56 | CCLD = $(CC) 57 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 58 | SOURCES = ministat.c 59 | DIST_SOURCES = ministat.c 60 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 61 | am__vpath_adj = case $$p in \ 62 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 63 | *) f=$$p;; \ 64 | esac; 65 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 66 | am__install_max = 40 67 | am__nobase_strip_setup = \ 68 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 69 | am__nobase_strip = \ 70 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 71 | am__nobase_list = $(am__nobase_strip_setup); \ 72 | for p in $$list; do echo "$$p $$p"; done | \ 73 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 74 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 75 | if (++n[$$2] == $(am__install_max)) \ 76 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 77 | END { for (dir in files) print dir, files[dir] }' 78 | am__base_list = \ 79 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 80 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 81 | man1dir = $(mandir)/man1 82 | NROFF = nroff 83 | MANS = $(man1_MANS) 84 | ETAGS = etags 85 | CTAGS = ctags 86 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 87 | ACLOCAL = @ACLOCAL@ 88 | AMTAR = @AMTAR@ 89 | AUTOCONF = @AUTOCONF@ 90 | AUTOHEADER = @AUTOHEADER@ 91 | AUTOMAKE = @AUTOMAKE@ 92 | AWK = @AWK@ 93 | CC = @CC@ 94 | CCDEPMODE = @CCDEPMODE@ 95 | CFLAGS = @CFLAGS@ 96 | CPP = @CPP@ 97 | CPPFLAGS = @CPPFLAGS@ 98 | CYGPATH_W = @CYGPATH_W@ 99 | DEFS = @DEFS@ 100 | DEPDIR = @DEPDIR@ 101 | ECHO_C = @ECHO_C@ 102 | ECHO_N = @ECHO_N@ 103 | ECHO_T = @ECHO_T@ 104 | EGREP = @EGREP@ 105 | EXEEXT = @EXEEXT@ 106 | GREP = @GREP@ 107 | INSTALL = @INSTALL@ 108 | INSTALL_DATA = @INSTALL_DATA@ 109 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 110 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 111 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 112 | LDFLAGS = @LDFLAGS@ 113 | LIBOBJS = @LIBOBJS@ 114 | LIBS = @LIBS@ 115 | LTLIBOBJS = @LTLIBOBJS@ 116 | MAKEINFO = @MAKEINFO@ 117 | MKDIR_P = @MKDIR_P@ 118 | OBJEXT = @OBJEXT@ 119 | PACKAGE = @PACKAGE@ 120 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 121 | PACKAGE_NAME = @PACKAGE_NAME@ 122 | PACKAGE_STRING = @PACKAGE_STRING@ 123 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 124 | PACKAGE_URL = @PACKAGE_URL@ 125 | PACKAGE_VERSION = @PACKAGE_VERSION@ 126 | PATH_SEPARATOR = @PATH_SEPARATOR@ 127 | POW_LIB = @POW_LIB@ 128 | SET_MAKE = @SET_MAKE@ 129 | SHELL = @SHELL@ 130 | STRIP = @STRIP@ 131 | VERSION = @VERSION@ 132 | abs_builddir = @abs_builddir@ 133 | abs_srcdir = @abs_srcdir@ 134 | abs_top_builddir = @abs_top_builddir@ 135 | abs_top_srcdir = @abs_top_srcdir@ 136 | ac_ct_CC = @ac_ct_CC@ 137 | am__include = @am__include@ 138 | am__leading_dot = @am__leading_dot@ 139 | am__quote = @am__quote@ 140 | am__tar = @am__tar@ 141 | am__untar = @am__untar@ 142 | bindir = @bindir@ 143 | build_alias = @build_alias@ 144 | builddir = @builddir@ 145 | datadir = @datadir@ 146 | datarootdir = @datarootdir@ 147 | docdir = @docdir@ 148 | dvidir = @dvidir@ 149 | exec_prefix = @exec_prefix@ 150 | host_alias = @host_alias@ 151 | htmldir = @htmldir@ 152 | includedir = @includedir@ 153 | infodir = @infodir@ 154 | install_sh = @install_sh@ 155 | libdir = @libdir@ 156 | libexecdir = @libexecdir@ 157 | localedir = @localedir@ 158 | localstatedir = @localstatedir@ 159 | mandir = @mandir@ 160 | mkdir_p = @mkdir_p@ 161 | oldincludedir = @oldincludedir@ 162 | pdfdir = @pdfdir@ 163 | prefix = @prefix@ 164 | program_transform_name = @program_transform_name@ 165 | psdir = @psdir@ 166 | sbindir = @sbindir@ 167 | sharedstatedir = @sharedstatedir@ 168 | srcdir = @srcdir@ 169 | sysconfdir = @sysconfdir@ 170 | target_alias = @target_alias@ 171 | top_build_prefix = @top_build_prefix@ 172 | top_builddir = @top_builddir@ 173 | top_srcdir = @top_srcdir@ 174 | man1_MANS = ministat.man 175 | all: all-am 176 | 177 | .SUFFIXES: 178 | .SUFFIXES: .c .o .obj 179 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 180 | @for dep in $?; do \ 181 | case '$(am__configure_deps)' in \ 182 | *$$dep*) \ 183 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 184 | && { if test -f $@; then exit 0; else break; fi; }; \ 185 | exit 1;; \ 186 | esac; \ 187 | done; \ 188 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ 189 | $(am__cd) $(top_srcdir) && \ 190 | $(AUTOMAKE) --gnu src/Makefile 191 | .PRECIOUS: Makefile 192 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 193 | @case '$?' in \ 194 | *config.status*) \ 195 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 196 | *) \ 197 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 198 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 199 | esac; 200 | 201 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 202 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 203 | 204 | $(top_srcdir)/configure: $(am__configure_deps) 205 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 206 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 207 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 208 | $(am__aclocal_m4_deps): 209 | install-binPROGRAMS: $(bin_PROGRAMS) 210 | @$(NORMAL_INSTALL) 211 | test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" 212 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 213 | for p in $$list; do echo "$$p $$p"; done | \ 214 | sed 's/$(EXEEXT)$$//' | \ 215 | while read p p1; do if test -f $$p; \ 216 | then echo "$$p"; echo "$$p"; else :; fi; \ 217 | done | \ 218 | sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ 219 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 220 | sed 'N;N;N;s,\n, ,g' | \ 221 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 222 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 223 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ 224 | else { print "f", $$3 "/" $$4, $$1; } } \ 225 | END { for (d in files) print "f", d, files[d] }' | \ 226 | while read type dir files; do \ 227 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 228 | test -z "$$files" || { \ 229 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 230 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 231 | } \ 232 | ; done 233 | 234 | uninstall-binPROGRAMS: 235 | @$(NORMAL_UNINSTALL) 236 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 237 | files=`for p in $$list; do echo "$$p"; done | \ 238 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 239 | -e 's/$$/$(EXEEXT)/' `; \ 240 | test -n "$$list" || exit 0; \ 241 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 242 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 243 | 244 | clean-binPROGRAMS: 245 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 246 | ministat$(EXEEXT): $(ministat_OBJECTS) $(ministat_DEPENDENCIES) 247 | @rm -f ministat$(EXEEXT) 248 | $(LINK) $(ministat_OBJECTS) $(ministat_LDADD) $(LIBS) 249 | 250 | mostlyclean-compile: 251 | -rm -f *.$(OBJEXT) 252 | 253 | distclean-compile: 254 | -rm -f *.tab.c 255 | 256 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ministat.Po@am__quote@ 257 | 258 | .c.o: 259 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 260 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 261 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 262 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 263 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< 264 | 265 | .c.obj: 266 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 267 | @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 268 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 269 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 270 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` 271 | install-man1: $(man1_MANS) 272 | @$(NORMAL_INSTALL) 273 | test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" 274 | @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ 275 | { for i in $$list; do echo "$$i"; done; \ 276 | } | while read p; do \ 277 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 278 | echo "$$d$$p"; echo "$$p"; \ 279 | done | \ 280 | sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 281 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ 282 | sed 'N;N;s,\n, ,g' | { \ 283 | list=; while read file base inst; do \ 284 | if test "$$base" = "$$inst"; then list="$$list $$file"; else \ 285 | echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ 286 | $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ 287 | fi; \ 288 | done; \ 289 | for i in $$list; do echo "$$i"; done | $(am__base_list) | \ 290 | while read files; do \ 291 | test -z "$$files" || { \ 292 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ 293 | $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ 294 | done; } 295 | 296 | uninstall-man1: 297 | @$(NORMAL_UNINSTALL) 298 | @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ 299 | files=`{ for i in $$list; do echo "$$i"; done; \ 300 | } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 301 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ 302 | test -z "$$files" || { \ 303 | echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ 304 | cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } 305 | 306 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 307 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 308 | unique=`for i in $$list; do \ 309 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 310 | done | \ 311 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 312 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 313 | mkid -fID $$unique 314 | tags: TAGS 315 | 316 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 317 | $(TAGS_FILES) $(LISP) 318 | set x; \ 319 | here=`pwd`; \ 320 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 321 | unique=`for i in $$list; do \ 322 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 323 | done | \ 324 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 325 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 326 | shift; \ 327 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 328 | test -n "$$unique" || unique=$$empty_fix; \ 329 | if test $$# -gt 0; then \ 330 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 331 | "$$@" $$unique; \ 332 | else \ 333 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 334 | $$unique; \ 335 | fi; \ 336 | fi 337 | ctags: CTAGS 338 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 339 | $(TAGS_FILES) $(LISP) 340 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 341 | unique=`for i in $$list; do \ 342 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 343 | done | \ 344 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 345 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 346 | test -z "$(CTAGS_ARGS)$$unique" \ 347 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 348 | $$unique 349 | 350 | GTAGS: 351 | here=`$(am__cd) $(top_builddir) && pwd` \ 352 | && $(am__cd) $(top_srcdir) \ 353 | && gtags -i $(GTAGS_ARGS) "$$here" 354 | 355 | distclean-tags: 356 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 357 | 358 | distdir: $(DISTFILES) 359 | @list='$(MANS)'; if test -n "$$list"; then \ 360 | list=`for p in $$list; do \ 361 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 362 | if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ 363 | if test -n "$$list" && \ 364 | grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ 365 | echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ 366 | grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ 367 | echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ 368 | echo " typically \`make maintainer-clean' will remove them" >&2; \ 369 | exit 1; \ 370 | else :; fi; \ 371 | else :; fi 372 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 373 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 374 | list='$(DISTFILES)'; \ 375 | dist_files=`for file in $$list; do echo $$file; done | \ 376 | sed -e "s|^$$srcdirstrip/||;t" \ 377 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 378 | case $$dist_files in \ 379 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 380 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 381 | sort -u` ;; \ 382 | esac; \ 383 | for file in $$dist_files; do \ 384 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 385 | if test -d $$d/$$file; then \ 386 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 387 | if test -d "$(distdir)/$$file"; then \ 388 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 389 | fi; \ 390 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 391 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 392 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 393 | fi; \ 394 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 395 | else \ 396 | test -f "$(distdir)/$$file" \ 397 | || cp -p $$d/$$file "$(distdir)/$$file" \ 398 | || exit 1; \ 399 | fi; \ 400 | done 401 | check-am: all-am 402 | check: check-am 403 | all-am: Makefile $(PROGRAMS) $(MANS) 404 | installdirs: 405 | for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ 406 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 407 | done 408 | install: install-am 409 | install-exec: install-exec-am 410 | install-data: install-data-am 411 | uninstall: uninstall-am 412 | 413 | install-am: all-am 414 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 415 | 416 | installcheck: installcheck-am 417 | install-strip: 418 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 419 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 420 | `test -z '$(STRIP)' || \ 421 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 422 | mostlyclean-generic: 423 | 424 | clean-generic: 425 | 426 | distclean-generic: 427 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 428 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 429 | 430 | maintainer-clean-generic: 431 | @echo "This command is intended for maintainers to use" 432 | @echo "it deletes files that may require special tools to rebuild." 433 | clean: clean-am 434 | 435 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am 436 | 437 | distclean: distclean-am 438 | -rm -rf ./$(DEPDIR) 439 | -rm -f Makefile 440 | distclean-am: clean-am distclean-compile distclean-generic \ 441 | distclean-tags 442 | 443 | dvi: dvi-am 444 | 445 | dvi-am: 446 | 447 | html: html-am 448 | 449 | html-am: 450 | 451 | info: info-am 452 | 453 | info-am: 454 | 455 | install-data-am: install-man 456 | 457 | install-dvi: install-dvi-am 458 | 459 | install-dvi-am: 460 | 461 | install-exec-am: install-binPROGRAMS 462 | 463 | install-html: install-html-am 464 | 465 | install-html-am: 466 | 467 | install-info: install-info-am 468 | 469 | install-info-am: 470 | 471 | install-man: install-man1 472 | 473 | install-pdf: install-pdf-am 474 | 475 | install-pdf-am: 476 | 477 | install-ps: install-ps-am 478 | 479 | install-ps-am: 480 | 481 | installcheck-am: 482 | 483 | maintainer-clean: maintainer-clean-am 484 | -rm -rf ./$(DEPDIR) 485 | -rm -f Makefile 486 | maintainer-clean-am: distclean-am maintainer-clean-generic 487 | 488 | mostlyclean: mostlyclean-am 489 | 490 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 491 | 492 | pdf: pdf-am 493 | 494 | pdf-am: 495 | 496 | ps: ps-am 497 | 498 | ps-am: 499 | 500 | uninstall-am: uninstall-binPROGRAMS uninstall-man 501 | 502 | uninstall-man: uninstall-man1 503 | 504 | .MAKE: install-am install-strip 505 | 506 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ 507 | clean-generic ctags distclean distclean-compile \ 508 | distclean-generic distclean-tags distdir dvi dvi-am html \ 509 | html-am info info-am install install-am install-binPROGRAMS \ 510 | install-data install-data-am install-dvi install-dvi-am \ 511 | install-exec install-exec-am install-html install-html-am \ 512 | install-info install-info-am install-man install-man1 \ 513 | install-pdf install-pdf-am install-ps install-ps-am \ 514 | install-strip installcheck installcheck-am installdirs \ 515 | maintainer-clean maintainer-clean-generic mostlyclean \ 516 | mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ 517 | tags uninstall uninstall-am uninstall-binPROGRAMS \ 518 | uninstall-man uninstall-man1 519 | 520 | 521 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 522 | # Otherwise a system limit (for SysV at least) may be exceeded. 523 | .NOEXPORT: 524 | -------------------------------------------------------------------------------- /depcomp: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # depcomp - compile a program generating dependencies as side-effects 3 | 4 | scriptversion=2009-04-28.21; # UTC 5 | 6 | # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free 7 | # Software Foundation, Inc. 8 | 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | # Originally written by Alexandre Oliva . 28 | 29 | case $1 in 30 | '') 31 | echo "$0: No command. Try \`$0 --help' for more information." 1>&2 32 | exit 1; 33 | ;; 34 | -h | --h*) 35 | cat <<\EOF 36 | Usage: depcomp [--help] [--version] PROGRAM [ARGS] 37 | 38 | Run PROGRAMS ARGS to compile a file, generating dependencies 39 | as side-effects. 40 | 41 | Environment variables: 42 | depmode Dependency tracking mode. 43 | source Source file read by `PROGRAMS ARGS'. 44 | object Object file output by `PROGRAMS ARGS'. 45 | DEPDIR directory where to store dependencies. 46 | depfile Dependency file to output. 47 | tmpdepfile Temporary file to use when outputing dependencies. 48 | libtool Whether libtool is used (yes/no). 49 | 50 | Report bugs to . 51 | EOF 52 | exit $? 53 | ;; 54 | -v | --v*) 55 | echo "depcomp $scriptversion" 56 | exit $? 57 | ;; 58 | esac 59 | 60 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then 61 | echo "depcomp: Variables source, object and depmode must be set" 1>&2 62 | exit 1 63 | fi 64 | 65 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. 66 | depfile=${depfile-`echo "$object" | 67 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 68 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} 69 | 70 | rm -f "$tmpdepfile" 71 | 72 | # Some modes work just like other modes, but use different flags. We 73 | # parameterize here, but still list the modes in the big case below, 74 | # to make depend.m4 easier to write. Note that we *cannot* use a case 75 | # here, because this file can only contain one case statement. 76 | if test "$depmode" = hp; then 77 | # HP compiler uses -M and no extra arg. 78 | gccflag=-M 79 | depmode=gcc 80 | fi 81 | 82 | if test "$depmode" = dashXmstdout; then 83 | # This is just like dashmstdout with a different argument. 84 | dashmflag=-xM 85 | depmode=dashmstdout 86 | fi 87 | 88 | cygpath_u="cygpath -u -f -" 89 | if test "$depmode" = msvcmsys; then 90 | # This is just like msvisualcpp but w/o cygpath translation. 91 | # Just convert the backslash-escaped backslashes to single forward 92 | # slashes to satisfy depend.m4 93 | cygpath_u="sed s,\\\\\\\\,/,g" 94 | depmode=msvisualcpp 95 | fi 96 | 97 | case "$depmode" in 98 | gcc3) 99 | ## gcc 3 implements dependency tracking that does exactly what 100 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like 101 | ## it if -MD -MP comes after the -MF stuff. Hmm. 102 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon 103 | ## the command line argument order; so add the flags where they 104 | ## appear in depend2.am. Note that the slowdown incurred here 105 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this. 106 | for arg 107 | do 108 | case $arg in 109 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; 110 | *) set fnord "$@" "$arg" ;; 111 | esac 112 | shift # fnord 113 | shift # $arg 114 | done 115 | "$@" 116 | stat=$? 117 | if test $stat -eq 0; then : 118 | else 119 | rm -f "$tmpdepfile" 120 | exit $stat 121 | fi 122 | mv "$tmpdepfile" "$depfile" 123 | ;; 124 | 125 | gcc) 126 | ## There are various ways to get dependency output from gcc. Here's 127 | ## why we pick this rather obscure method: 128 | ## - Don't want to use -MD because we'd like the dependencies to end 129 | ## up in a subdir. Having to rename by hand is ugly. 130 | ## (We might end up doing this anyway to support other compilers.) 131 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like 132 | ## -MM, not -M (despite what the docs say). 133 | ## - Using -M directly means running the compiler twice (even worse 134 | ## than renaming). 135 | if test -z "$gccflag"; then 136 | gccflag=-MD, 137 | fi 138 | "$@" -Wp,"$gccflag$tmpdepfile" 139 | stat=$? 140 | if test $stat -eq 0; then : 141 | else 142 | rm -f "$tmpdepfile" 143 | exit $stat 144 | fi 145 | rm -f "$depfile" 146 | echo "$object : \\" > "$depfile" 147 | alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 148 | ## The second -e expression handles DOS-style file names with drive letters. 149 | sed -e 's/^[^:]*: / /' \ 150 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" 151 | ## This next piece of magic avoids the `deleted header file' problem. 152 | ## The problem is that when a header file which appears in a .P file 153 | ## is deleted, the dependency causes make to die (because there is 154 | ## typically no way to rebuild the header). We avoid this by adding 155 | ## dummy dependencies for each header file. Too bad gcc doesn't do 156 | ## this for us directly. 157 | tr ' ' ' 158 | ' < "$tmpdepfile" | 159 | ## Some versions of gcc put a space before the `:'. On the theory 160 | ## that the space means something, we add a space to the output as 161 | ## well. 162 | ## Some versions of the HPUX 10.20 sed can't process this invocation 163 | ## correctly. Breaking it into two sed invocations is a workaround. 164 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 165 | rm -f "$tmpdepfile" 166 | ;; 167 | 168 | hp) 169 | # This case exists only to let depend.m4 do its work. It works by 170 | # looking at the text of this script. This case will never be run, 171 | # since it is checked for above. 172 | exit 1 173 | ;; 174 | 175 | sgi) 176 | if test "$libtool" = yes; then 177 | "$@" "-Wp,-MDupdate,$tmpdepfile" 178 | else 179 | "$@" -MDupdate "$tmpdepfile" 180 | fi 181 | stat=$? 182 | if test $stat -eq 0; then : 183 | else 184 | rm -f "$tmpdepfile" 185 | exit $stat 186 | fi 187 | rm -f "$depfile" 188 | 189 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files 190 | echo "$object : \\" > "$depfile" 191 | 192 | # Clip off the initial element (the dependent). Don't try to be 193 | # clever and replace this with sed code, as IRIX sed won't handle 194 | # lines with more than a fixed number of characters (4096 in 195 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; 196 | # the IRIX cc adds comments like `#:fec' to the end of the 197 | # dependency line. 198 | tr ' ' ' 199 | ' < "$tmpdepfile" \ 200 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ 201 | tr ' 202 | ' ' ' >> "$depfile" 203 | echo >> "$depfile" 204 | 205 | # The second pass generates a dummy entry for each header file. 206 | tr ' ' ' 207 | ' < "$tmpdepfile" \ 208 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ 209 | >> "$depfile" 210 | else 211 | # The sourcefile does not contain any dependencies, so just 212 | # store a dummy comment line, to avoid errors with the Makefile 213 | # "include basename.Plo" scheme. 214 | echo "#dummy" > "$depfile" 215 | fi 216 | rm -f "$tmpdepfile" 217 | ;; 218 | 219 | aix) 220 | # The C for AIX Compiler uses -M and outputs the dependencies 221 | # in a .u file. In older versions, this file always lives in the 222 | # current directory. Also, the AIX compiler puts `$object:' at the 223 | # start of each line; $object doesn't have directory information. 224 | # Version 6 uses the directory in both cases. 225 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 226 | test "x$dir" = "x$object" && dir= 227 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 228 | if test "$libtool" = yes; then 229 | tmpdepfile1=$dir$base.u 230 | tmpdepfile2=$base.u 231 | tmpdepfile3=$dir.libs/$base.u 232 | "$@" -Wc,-M 233 | else 234 | tmpdepfile1=$dir$base.u 235 | tmpdepfile2=$dir$base.u 236 | tmpdepfile3=$dir$base.u 237 | "$@" -M 238 | fi 239 | stat=$? 240 | 241 | if test $stat -eq 0; then : 242 | else 243 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 244 | exit $stat 245 | fi 246 | 247 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 248 | do 249 | test -f "$tmpdepfile" && break 250 | done 251 | if test -f "$tmpdepfile"; then 252 | # Each line is of the form `foo.o: dependent.h'. 253 | # Do two passes, one to just change these to 254 | # `$object: dependent.h' and one to simply `dependent.h:'. 255 | sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 256 | # That's a tab and a space in the []. 257 | sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" 258 | else 259 | # The sourcefile does not contain any dependencies, so just 260 | # store a dummy comment line, to avoid errors with the Makefile 261 | # "include basename.Plo" scheme. 262 | echo "#dummy" > "$depfile" 263 | fi 264 | rm -f "$tmpdepfile" 265 | ;; 266 | 267 | icc) 268 | # Intel's C compiler understands `-MD -MF file'. However on 269 | # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c 270 | # ICC 7.0 will fill foo.d with something like 271 | # foo.o: sub/foo.c 272 | # foo.o: sub/foo.h 273 | # which is wrong. We want: 274 | # sub/foo.o: sub/foo.c 275 | # sub/foo.o: sub/foo.h 276 | # sub/foo.c: 277 | # sub/foo.h: 278 | # ICC 7.1 will output 279 | # foo.o: sub/foo.c sub/foo.h 280 | # and will wrap long lines using \ : 281 | # foo.o: sub/foo.c ... \ 282 | # sub/foo.h ... \ 283 | # ... 284 | 285 | "$@" -MD -MF "$tmpdepfile" 286 | stat=$? 287 | if test $stat -eq 0; then : 288 | else 289 | rm -f "$tmpdepfile" 290 | exit $stat 291 | fi 292 | rm -f "$depfile" 293 | # Each line is of the form `foo.o: dependent.h', 294 | # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. 295 | # Do two passes, one to just change these to 296 | # `$object: dependent.h' and one to simply `dependent.h:'. 297 | sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" 298 | # Some versions of the HPUX 10.20 sed can't process this invocation 299 | # correctly. Breaking it into two sed invocations is a workaround. 300 | sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | 301 | sed -e 's/$/ :/' >> "$depfile" 302 | rm -f "$tmpdepfile" 303 | ;; 304 | 305 | hp2) 306 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64 307 | # compilers, which have integrated preprocessors. The correct option 308 | # to use with these is +Maked; it writes dependencies to a file named 309 | # 'foo.d', which lands next to the object file, wherever that 310 | # happens to be. 311 | # Much of this is similar to the tru64 case; see comments there. 312 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 313 | test "x$dir" = "x$object" && dir= 314 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 315 | if test "$libtool" = yes; then 316 | tmpdepfile1=$dir$base.d 317 | tmpdepfile2=$dir.libs/$base.d 318 | "$@" -Wc,+Maked 319 | else 320 | tmpdepfile1=$dir$base.d 321 | tmpdepfile2=$dir$base.d 322 | "$@" +Maked 323 | fi 324 | stat=$? 325 | if test $stat -eq 0; then : 326 | else 327 | rm -f "$tmpdepfile1" "$tmpdepfile2" 328 | exit $stat 329 | fi 330 | 331 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" 332 | do 333 | test -f "$tmpdepfile" && break 334 | done 335 | if test -f "$tmpdepfile"; then 336 | sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" 337 | # Add `dependent.h:' lines. 338 | sed -ne '2,${ 339 | s/^ *// 340 | s/ \\*$// 341 | s/$/:/ 342 | p 343 | }' "$tmpdepfile" >> "$depfile" 344 | else 345 | echo "#dummy" > "$depfile" 346 | fi 347 | rm -f "$tmpdepfile" "$tmpdepfile2" 348 | ;; 349 | 350 | tru64) 351 | # The Tru64 compiler uses -MD to generate dependencies as a side 352 | # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. 353 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 354 | # dependencies in `foo.d' instead, so we check for that too. 355 | # Subdirectories are respected. 356 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 357 | test "x$dir" = "x$object" && dir= 358 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 359 | 360 | if test "$libtool" = yes; then 361 | # With Tru64 cc, shared objects can also be used to make a 362 | # static library. This mechanism is used in libtool 1.4 series to 363 | # handle both shared and static libraries in a single compilation. 364 | # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. 365 | # 366 | # With libtool 1.5 this exception was removed, and libtool now 367 | # generates 2 separate objects for the 2 libraries. These two 368 | # compilations output dependencies in $dir.libs/$base.o.d and 369 | # in $dir$base.o.d. We have to check for both files, because 370 | # one of the two compilations can be disabled. We should prefer 371 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is 372 | # automatically cleaned when .libs/ is deleted, while ignoring 373 | # the former would cause a distcleancheck panic. 374 | tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 375 | tmpdepfile2=$dir$base.o.d # libtool 1.5 376 | tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 377 | tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 378 | "$@" -Wc,-MD 379 | else 380 | tmpdepfile1=$dir$base.o.d 381 | tmpdepfile2=$dir$base.d 382 | tmpdepfile3=$dir$base.d 383 | tmpdepfile4=$dir$base.d 384 | "$@" -MD 385 | fi 386 | 387 | stat=$? 388 | if test $stat -eq 0; then : 389 | else 390 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" 391 | exit $stat 392 | fi 393 | 394 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" 395 | do 396 | test -f "$tmpdepfile" && break 397 | done 398 | if test -f "$tmpdepfile"; then 399 | sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 400 | # That's a tab and a space in the []. 401 | sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" 402 | else 403 | echo "#dummy" > "$depfile" 404 | fi 405 | rm -f "$tmpdepfile" 406 | ;; 407 | 408 | #nosideeffect) 409 | # This comment above is used by automake to tell side-effect 410 | # dependency tracking mechanisms from slower ones. 411 | 412 | dashmstdout) 413 | # Important note: in order to support this mode, a compiler *must* 414 | # always write the preprocessed file to stdout, regardless of -o. 415 | "$@" || exit $? 416 | 417 | # Remove the call to Libtool. 418 | if test "$libtool" = yes; then 419 | while test "X$1" != 'X--mode=compile'; do 420 | shift 421 | done 422 | shift 423 | fi 424 | 425 | # Remove `-o $object'. 426 | IFS=" " 427 | for arg 428 | do 429 | case $arg in 430 | -o) 431 | shift 432 | ;; 433 | $object) 434 | shift 435 | ;; 436 | *) 437 | set fnord "$@" "$arg" 438 | shift # fnord 439 | shift # $arg 440 | ;; 441 | esac 442 | done 443 | 444 | test -z "$dashmflag" && dashmflag=-M 445 | # Require at least two characters before searching for `:' 446 | # in the target name. This is to cope with DOS-style filenames: 447 | # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. 448 | "$@" $dashmflag | 449 | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" 450 | rm -f "$depfile" 451 | cat < "$tmpdepfile" > "$depfile" 452 | tr ' ' ' 453 | ' < "$tmpdepfile" | \ 454 | ## Some versions of the HPUX 10.20 sed can't process this invocation 455 | ## correctly. Breaking it into two sed invocations is a workaround. 456 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 457 | rm -f "$tmpdepfile" 458 | ;; 459 | 460 | dashXmstdout) 461 | # This case only exists to satisfy depend.m4. It is never actually 462 | # run, as this mode is specially recognized in the preamble. 463 | exit 1 464 | ;; 465 | 466 | makedepend) 467 | "$@" || exit $? 468 | # Remove any Libtool call 469 | if test "$libtool" = yes; then 470 | while test "X$1" != 'X--mode=compile'; do 471 | shift 472 | done 473 | shift 474 | fi 475 | # X makedepend 476 | shift 477 | cleared=no eat=no 478 | for arg 479 | do 480 | case $cleared in 481 | no) 482 | set ""; shift 483 | cleared=yes ;; 484 | esac 485 | if test $eat = yes; then 486 | eat=no 487 | continue 488 | fi 489 | case "$arg" in 490 | -D*|-I*) 491 | set fnord "$@" "$arg"; shift ;; 492 | # Strip any option that makedepend may not understand. Remove 493 | # the object too, otherwise makedepend will parse it as a source file. 494 | -arch) 495 | eat=yes ;; 496 | -*|$object) 497 | ;; 498 | *) 499 | set fnord "$@" "$arg"; shift ;; 500 | esac 501 | done 502 | obj_suffix=`echo "$object" | sed 's/^.*\././'` 503 | touch "$tmpdepfile" 504 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" 505 | rm -f "$depfile" 506 | cat < "$tmpdepfile" > "$depfile" 507 | sed '1,2d' "$tmpdepfile" | tr ' ' ' 508 | ' | \ 509 | ## Some versions of the HPUX 10.20 sed can't process this invocation 510 | ## correctly. Breaking it into two sed invocations is a workaround. 511 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 512 | rm -f "$tmpdepfile" "$tmpdepfile".bak 513 | ;; 514 | 515 | cpp) 516 | # Important note: in order to support this mode, a compiler *must* 517 | # always write the preprocessed file to stdout. 518 | "$@" || exit $? 519 | 520 | # Remove the call to Libtool. 521 | if test "$libtool" = yes; then 522 | while test "X$1" != 'X--mode=compile'; do 523 | shift 524 | done 525 | shift 526 | fi 527 | 528 | # Remove `-o $object'. 529 | IFS=" " 530 | for arg 531 | do 532 | case $arg in 533 | -o) 534 | shift 535 | ;; 536 | $object) 537 | shift 538 | ;; 539 | *) 540 | set fnord "$@" "$arg" 541 | shift # fnord 542 | shift # $arg 543 | ;; 544 | esac 545 | done 546 | 547 | "$@" -E | 548 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ 549 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | 550 | sed '$ s: \\$::' > "$tmpdepfile" 551 | rm -f "$depfile" 552 | echo "$object : \\" > "$depfile" 553 | cat < "$tmpdepfile" >> "$depfile" 554 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" 555 | rm -f "$tmpdepfile" 556 | ;; 557 | 558 | msvisualcpp) 559 | # Important note: in order to support this mode, a compiler *must* 560 | # always write the preprocessed file to stdout. 561 | "$@" || exit $? 562 | 563 | # Remove the call to Libtool. 564 | if test "$libtool" = yes; then 565 | while test "X$1" != 'X--mode=compile'; do 566 | shift 567 | done 568 | shift 569 | fi 570 | 571 | IFS=" " 572 | for arg 573 | do 574 | case "$arg" in 575 | -o) 576 | shift 577 | ;; 578 | $object) 579 | shift 580 | ;; 581 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") 582 | set fnord "$@" 583 | shift 584 | shift 585 | ;; 586 | *) 587 | set fnord "$@" "$arg" 588 | shift 589 | shift 590 | ;; 591 | esac 592 | done 593 | "$@" -E 2>/dev/null | 594 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" 595 | rm -f "$depfile" 596 | echo "$object : \\" > "$depfile" 597 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" 598 | echo " " >> "$depfile" 599 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" 600 | rm -f "$tmpdepfile" 601 | ;; 602 | 603 | msvcmsys) 604 | # This case exists only to let depend.m4 do its work. It works by 605 | # looking at the text of this script. This case will never be run, 606 | # since it is checked for above. 607 | exit 1 608 | ;; 609 | 610 | none) 611 | exec "$@" 612 | ;; 613 | 614 | *) 615 | echo "Unknown depmode $depmode" 1>&2 616 | exit 1 617 | ;; 618 | esac 619 | 620 | exit 0 621 | 622 | # Local Variables: 623 | # mode: shell-script 624 | # sh-indentation: 2 625 | # eval: (add-hook 'write-file-hooks 'time-stamp) 626 | # time-stamp-start: "scriptversion=" 627 | # time-stamp-format: "%:y-%02m-%02d.%02H" 628 | # time-stamp-time-zone: "UTC" 629 | # time-stamp-end: "; # UTC" 630 | # End: 631 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.11 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 6 | # Inc. 7 | # This Makefile.in is free software; the Free Software Foundation 8 | # gives unlimited permission to copy and/or distribute it, 9 | # with or without modifications, as long as this notice is preserved. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 | # PARTICULAR PURPOSE. 15 | 16 | @SET_MAKE@ 17 | VPATH = @srcdir@ 18 | pkgdatadir = $(datadir)/@PACKAGE@ 19 | pkgincludedir = $(includedir)/@PACKAGE@ 20 | pkglibdir = $(libdir)/@PACKAGE@ 21 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 22 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 23 | install_sh_DATA = $(install_sh) -c -m 644 24 | install_sh_PROGRAM = $(install_sh) -c 25 | install_sh_SCRIPT = $(install_sh) -c 26 | INSTALL_HEADER = $(INSTALL_DATA) 27 | transform = $(program_transform_name) 28 | NORMAL_INSTALL = : 29 | PRE_INSTALL = : 30 | POST_INSTALL = : 31 | NORMAL_UNINSTALL = : 32 | PRE_UNINSTALL = : 33 | POST_UNINSTALL = : 34 | subdir = . 35 | DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ 36 | $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ 37 | ChangeLog INSTALL NEWS depcomp install-sh missing 38 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 39 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 40 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 41 | $(ACLOCAL_M4) 42 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 43 | configure.lineno config.status.lineno 44 | mkinstalldirs = $(install_sh) -d 45 | CONFIG_CLEAN_FILES = 46 | CONFIG_CLEAN_VPATH_FILES = 47 | SOURCES = 48 | DIST_SOURCES = 49 | RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ 50 | html-recursive info-recursive install-data-recursive \ 51 | install-dvi-recursive install-exec-recursive \ 52 | install-html-recursive install-info-recursive \ 53 | install-pdf-recursive install-ps-recursive install-recursive \ 54 | installcheck-recursive installdirs-recursive pdf-recursive \ 55 | ps-recursive uninstall-recursive 56 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ 57 | distclean-recursive maintainer-clean-recursive 58 | AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ 59 | $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ 60 | distdir dist dist-all distcheck 61 | ETAGS = etags 62 | CTAGS = ctags 63 | DIST_SUBDIRS = $(SUBDIRS) 64 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 65 | distdir = $(PACKAGE)-$(VERSION) 66 | top_distdir = $(distdir) 67 | am__remove_distdir = \ 68 | { test ! -d "$(distdir)" \ 69 | || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ 70 | && rm -fr "$(distdir)"; }; } 71 | am__relativize = \ 72 | dir0=`pwd`; \ 73 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ 74 | sed_rest='s,^[^/]*/*,,'; \ 75 | sed_last='s,^.*/\([^/]*\)$$,\1,'; \ 76 | sed_butlast='s,/*[^/]*$$,,'; \ 77 | while test -n "$$dir1"; do \ 78 | first=`echo "$$dir1" | sed -e "$$sed_first"`; \ 79 | if test "$$first" != "."; then \ 80 | if test "$$first" = ".."; then \ 81 | dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ 82 | dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ 83 | else \ 84 | first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ 85 | if test "$$first2" = "$$first"; then \ 86 | dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ 87 | else \ 88 | dir2="../$$dir2"; \ 89 | fi; \ 90 | dir0="$$dir0"/"$$first"; \ 91 | fi; \ 92 | fi; \ 93 | dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ 94 | done; \ 95 | reldir="$$dir2" 96 | DIST_ARCHIVES = $(distdir).tar.gz 97 | GZIP_ENV = --best 98 | distuninstallcheck_listfiles = find . -type f -print 99 | distcleancheck_listfiles = find . -type f -print 100 | ACLOCAL = @ACLOCAL@ 101 | AMTAR = @AMTAR@ 102 | AUTOCONF = @AUTOCONF@ 103 | AUTOHEADER = @AUTOHEADER@ 104 | AUTOMAKE = @AUTOMAKE@ 105 | AWK = @AWK@ 106 | CC = @CC@ 107 | CCDEPMODE = @CCDEPMODE@ 108 | CFLAGS = @CFLAGS@ 109 | CPP = @CPP@ 110 | CPPFLAGS = @CPPFLAGS@ 111 | CYGPATH_W = @CYGPATH_W@ 112 | DEFS = @DEFS@ 113 | DEPDIR = @DEPDIR@ 114 | ECHO_C = @ECHO_C@ 115 | ECHO_N = @ECHO_N@ 116 | ECHO_T = @ECHO_T@ 117 | EGREP = @EGREP@ 118 | EXEEXT = @EXEEXT@ 119 | GREP = @GREP@ 120 | INSTALL = @INSTALL@ 121 | INSTALL_DATA = @INSTALL_DATA@ 122 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 123 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 124 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 125 | LDFLAGS = @LDFLAGS@ 126 | LIBOBJS = @LIBOBJS@ 127 | LIBS = @LIBS@ 128 | LTLIBOBJS = @LTLIBOBJS@ 129 | MAKEINFO = @MAKEINFO@ 130 | MKDIR_P = @MKDIR_P@ 131 | OBJEXT = @OBJEXT@ 132 | PACKAGE = @PACKAGE@ 133 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 134 | PACKAGE_NAME = @PACKAGE_NAME@ 135 | PACKAGE_STRING = @PACKAGE_STRING@ 136 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 137 | PACKAGE_URL = @PACKAGE_URL@ 138 | PACKAGE_VERSION = @PACKAGE_VERSION@ 139 | PATH_SEPARATOR = @PATH_SEPARATOR@ 140 | POW_LIB = @POW_LIB@ 141 | SET_MAKE = @SET_MAKE@ 142 | SHELL = @SHELL@ 143 | STRIP = @STRIP@ 144 | VERSION = @VERSION@ 145 | abs_builddir = @abs_builddir@ 146 | abs_srcdir = @abs_srcdir@ 147 | abs_top_builddir = @abs_top_builddir@ 148 | abs_top_srcdir = @abs_top_srcdir@ 149 | ac_ct_CC = @ac_ct_CC@ 150 | am__include = @am__include@ 151 | am__leading_dot = @am__leading_dot@ 152 | am__quote = @am__quote@ 153 | am__tar = @am__tar@ 154 | am__untar = @am__untar@ 155 | bindir = @bindir@ 156 | build_alias = @build_alias@ 157 | builddir = @builddir@ 158 | datadir = @datadir@ 159 | datarootdir = @datarootdir@ 160 | docdir = @docdir@ 161 | dvidir = @dvidir@ 162 | exec_prefix = @exec_prefix@ 163 | host_alias = @host_alias@ 164 | htmldir = @htmldir@ 165 | includedir = @includedir@ 166 | infodir = @infodir@ 167 | install_sh = @install_sh@ 168 | libdir = @libdir@ 169 | libexecdir = @libexecdir@ 170 | localedir = @localedir@ 171 | localstatedir = @localstatedir@ 172 | mandir = @mandir@ 173 | mkdir_p = @mkdir_p@ 174 | oldincludedir = @oldincludedir@ 175 | pdfdir = @pdfdir@ 176 | prefix = @prefix@ 177 | program_transform_name = @program_transform_name@ 178 | psdir = @psdir@ 179 | sbindir = @sbindir@ 180 | sharedstatedir = @sharedstatedir@ 181 | srcdir = @srcdir@ 182 | sysconfdir = @sysconfdir@ 183 | target_alias = @target_alias@ 184 | top_build_prefix = @top_build_prefix@ 185 | top_builddir = @top_builddir@ 186 | top_srcdir = @top_srcdir@ 187 | SUBDIRS = src 188 | all: all-recursive 189 | 190 | .SUFFIXES: 191 | am--refresh: 192 | @: 193 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 194 | @for dep in $?; do \ 195 | case '$(am__configure_deps)' in \ 196 | *$$dep*) \ 197 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ 198 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ 199 | && exit 0; \ 200 | exit 1;; \ 201 | esac; \ 202 | done; \ 203 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ 204 | $(am__cd) $(top_srcdir) && \ 205 | $(AUTOMAKE) --gnu Makefile 206 | .PRECIOUS: Makefile 207 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 208 | @case '$?' in \ 209 | *config.status*) \ 210 | echo ' $(SHELL) ./config.status'; \ 211 | $(SHELL) ./config.status;; \ 212 | *) \ 213 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 214 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 215 | esac; 216 | 217 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 218 | $(SHELL) ./config.status --recheck 219 | 220 | $(top_srcdir)/configure: $(am__configure_deps) 221 | $(am__cd) $(srcdir) && $(AUTOCONF) 222 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 223 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 224 | $(am__aclocal_m4_deps): 225 | 226 | # This directory's subdirectories are mostly independent; you can cd 227 | # into them and run `make' without going through this Makefile. 228 | # To change the values of `make' variables: instead of editing Makefiles, 229 | # (1) if the variable is set in `config.status', edit `config.status' 230 | # (which will cause the Makefiles to be regenerated when you run `make'); 231 | # (2) otherwise, pass the desired values on the `make' command line. 232 | $(RECURSIVE_TARGETS): 233 | @failcom='exit 1'; \ 234 | for f in x $$MAKEFLAGS; do \ 235 | case $$f in \ 236 | *=* | --[!k]*);; \ 237 | *k*) failcom='fail=yes';; \ 238 | esac; \ 239 | done; \ 240 | dot_seen=no; \ 241 | target=`echo $@ | sed s/-recursive//`; \ 242 | list='$(SUBDIRS)'; for subdir in $$list; do \ 243 | echo "Making $$target in $$subdir"; \ 244 | if test "$$subdir" = "."; then \ 245 | dot_seen=yes; \ 246 | local_target="$$target-am"; \ 247 | else \ 248 | local_target="$$target"; \ 249 | fi; \ 250 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 251 | || eval $$failcom; \ 252 | done; \ 253 | if test "$$dot_seen" = "no"; then \ 254 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 255 | fi; test -z "$$fail" 256 | 257 | $(RECURSIVE_CLEAN_TARGETS): 258 | @failcom='exit 1'; \ 259 | for f in x $$MAKEFLAGS; do \ 260 | case $$f in \ 261 | *=* | --[!k]*);; \ 262 | *k*) failcom='fail=yes';; \ 263 | esac; \ 264 | done; \ 265 | dot_seen=no; \ 266 | case "$@" in \ 267 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ 268 | *) list='$(SUBDIRS)' ;; \ 269 | esac; \ 270 | rev=''; for subdir in $$list; do \ 271 | if test "$$subdir" = "."; then :; else \ 272 | rev="$$subdir $$rev"; \ 273 | fi; \ 274 | done; \ 275 | rev="$$rev ."; \ 276 | target=`echo $@ | sed s/-recursive//`; \ 277 | for subdir in $$rev; do \ 278 | echo "Making $$target in $$subdir"; \ 279 | if test "$$subdir" = "."; then \ 280 | local_target="$$target-am"; \ 281 | else \ 282 | local_target="$$target"; \ 283 | fi; \ 284 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 285 | || eval $$failcom; \ 286 | done && test -z "$$fail" 287 | tags-recursive: 288 | list='$(SUBDIRS)'; for subdir in $$list; do \ 289 | test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ 290 | done 291 | ctags-recursive: 292 | list='$(SUBDIRS)'; for subdir in $$list; do \ 293 | test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ 294 | done 295 | 296 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 297 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 298 | unique=`for i in $$list; do \ 299 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 300 | done | \ 301 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 302 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 303 | mkid -fID $$unique 304 | tags: TAGS 305 | 306 | TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 307 | $(TAGS_FILES) $(LISP) 308 | set x; \ 309 | here=`pwd`; \ 310 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 311 | include_option=--etags-include; \ 312 | empty_fix=.; \ 313 | else \ 314 | include_option=--include; \ 315 | empty_fix=; \ 316 | fi; \ 317 | list='$(SUBDIRS)'; for subdir in $$list; do \ 318 | if test "$$subdir" = .; then :; else \ 319 | test ! -f $$subdir/TAGS || \ 320 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ 321 | fi; \ 322 | done; \ 323 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 324 | unique=`for i in $$list; do \ 325 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 326 | done | \ 327 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 328 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 329 | shift; \ 330 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 331 | test -n "$$unique" || unique=$$empty_fix; \ 332 | if test $$# -gt 0; then \ 333 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 334 | "$$@" $$unique; \ 335 | else \ 336 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 337 | $$unique; \ 338 | fi; \ 339 | fi 340 | ctags: CTAGS 341 | CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 342 | $(TAGS_FILES) $(LISP) 343 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 344 | unique=`for i in $$list; do \ 345 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 346 | done | \ 347 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 348 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 349 | test -z "$(CTAGS_ARGS)$$unique" \ 350 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 351 | $$unique 352 | 353 | GTAGS: 354 | here=`$(am__cd) $(top_builddir) && pwd` \ 355 | && $(am__cd) $(top_srcdir) \ 356 | && gtags -i $(GTAGS_ARGS) "$$here" 357 | 358 | distclean-tags: 359 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 360 | 361 | distdir: $(DISTFILES) 362 | $(am__remove_distdir) 363 | test -d "$(distdir)" || mkdir "$(distdir)" 364 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 365 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 366 | list='$(DISTFILES)'; \ 367 | dist_files=`for file in $$list; do echo $$file; done | \ 368 | sed -e "s|^$$srcdirstrip/||;t" \ 369 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 370 | case $$dist_files in \ 371 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 372 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 373 | sort -u` ;; \ 374 | esac; \ 375 | for file in $$dist_files; do \ 376 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 377 | if test -d $$d/$$file; then \ 378 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 379 | if test -d "$(distdir)/$$file"; then \ 380 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 381 | fi; \ 382 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 383 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 384 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 385 | fi; \ 386 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 387 | else \ 388 | test -f "$(distdir)/$$file" \ 389 | || cp -p $$d/$$file "$(distdir)/$$file" \ 390 | || exit 1; \ 391 | fi; \ 392 | done 393 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 394 | if test "$$subdir" = .; then :; else \ 395 | test -d "$(distdir)/$$subdir" \ 396 | || $(MKDIR_P) "$(distdir)/$$subdir" \ 397 | || exit 1; \ 398 | fi; \ 399 | done 400 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 401 | if test "$$subdir" = .; then :; else \ 402 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ 403 | $(am__relativize); \ 404 | new_distdir=$$reldir; \ 405 | dir1=$$subdir; dir2="$(top_distdir)"; \ 406 | $(am__relativize); \ 407 | new_top_distdir=$$reldir; \ 408 | echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ 409 | echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ 410 | ($(am__cd) $$subdir && \ 411 | $(MAKE) $(AM_MAKEFLAGS) \ 412 | top_distdir="$$new_top_distdir" \ 413 | distdir="$$new_distdir" \ 414 | am__remove_distdir=: \ 415 | am__skip_length_check=: \ 416 | am__skip_mode_fix=: \ 417 | distdir) \ 418 | || exit 1; \ 419 | fi; \ 420 | done 421 | -test -n "$(am__skip_mode_fix)" \ 422 | || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ 423 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ 424 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ 425 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 426 | || chmod -R a+r "$(distdir)" 427 | dist-gzip: distdir 428 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 429 | $(am__remove_distdir) 430 | 431 | dist-bzip2: distdir 432 | tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 433 | $(am__remove_distdir) 434 | 435 | dist-lzma: distdir 436 | tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma 437 | $(am__remove_distdir) 438 | 439 | dist-xz: distdir 440 | tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz 441 | $(am__remove_distdir) 442 | 443 | dist-tarZ: distdir 444 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 445 | $(am__remove_distdir) 446 | 447 | dist-shar: distdir 448 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz 449 | $(am__remove_distdir) 450 | 451 | dist-zip: distdir 452 | -rm -f $(distdir).zip 453 | zip -rq $(distdir).zip $(distdir) 454 | $(am__remove_distdir) 455 | 456 | dist dist-all: distdir 457 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 458 | $(am__remove_distdir) 459 | 460 | # This target untars the dist file and tries a VPATH configuration. Then 461 | # it guarantees that the distribution is self-contained by making another 462 | # tarfile. 463 | distcheck: dist 464 | case '$(DIST_ARCHIVES)' in \ 465 | *.tar.gz*) \ 466 | GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ 467 | *.tar.bz2*) \ 468 | bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ 469 | *.tar.lzma*) \ 470 | unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ 471 | *.tar.xz*) \ 472 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ 473 | *.tar.Z*) \ 474 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 475 | *.shar.gz*) \ 476 | GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ 477 | *.zip*) \ 478 | unzip $(distdir).zip ;;\ 479 | esac 480 | chmod -R a-w $(distdir); chmod a+w $(distdir) 481 | mkdir $(distdir)/_build 482 | mkdir $(distdir)/_inst 483 | chmod a-w $(distdir) 484 | test -d $(distdir)/_build || exit 0; \ 485 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 486 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 487 | && am__cwd=`pwd` \ 488 | && $(am__cd) $(distdir)/_build \ 489 | && ../configure --srcdir=.. --prefix="$$dc_install_base" \ 490 | $(DISTCHECK_CONFIGURE_FLAGS) \ 491 | && $(MAKE) $(AM_MAKEFLAGS) \ 492 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ 493 | && $(MAKE) $(AM_MAKEFLAGS) check \ 494 | && $(MAKE) $(AM_MAKEFLAGS) install \ 495 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 496 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ 497 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ 498 | distuninstallcheck \ 499 | && chmod -R a-w "$$dc_install_base" \ 500 | && ({ \ 501 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 502 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 503 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ 504 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ 505 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ 506 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ 507 | && rm -rf "$$dc_destdir" \ 508 | && $(MAKE) $(AM_MAKEFLAGS) dist \ 509 | && rm -rf $(DIST_ARCHIVES) \ 510 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ 511 | && cd "$$am__cwd" \ 512 | || exit 1 513 | $(am__remove_distdir) 514 | @(echo "$(distdir) archives ready for distribution: "; \ 515 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 516 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' 517 | distuninstallcheck: 518 | @$(am__cd) '$(distuninstallcheck_dir)' \ 519 | && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ 520 | || { echo "ERROR: files left after uninstall:" ; \ 521 | if test -n "$(DESTDIR)"; then \ 522 | echo " (check DESTDIR support)"; \ 523 | fi ; \ 524 | $(distuninstallcheck_listfiles) ; \ 525 | exit 1; } >&2 526 | distcleancheck: distclean 527 | @if test '$(srcdir)' = . ; then \ 528 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ 529 | exit 1 ; \ 530 | fi 531 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ 532 | || { echo "ERROR: files left in build directory after distclean:" ; \ 533 | $(distcleancheck_listfiles) ; \ 534 | exit 1; } >&2 535 | check-am: all-am 536 | check: check-recursive 537 | all-am: Makefile 538 | installdirs: installdirs-recursive 539 | installdirs-am: 540 | install: install-recursive 541 | install-exec: install-exec-recursive 542 | install-data: install-data-recursive 543 | uninstall: uninstall-recursive 544 | 545 | install-am: all-am 546 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 547 | 548 | installcheck: installcheck-recursive 549 | install-strip: 550 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 551 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 552 | `test -z '$(STRIP)' || \ 553 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 554 | mostlyclean-generic: 555 | 556 | clean-generic: 557 | 558 | distclean-generic: 559 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 560 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 561 | 562 | maintainer-clean-generic: 563 | @echo "This command is intended for maintainers to use" 564 | @echo "it deletes files that may require special tools to rebuild." 565 | clean: clean-recursive 566 | 567 | clean-am: clean-generic mostlyclean-am 568 | 569 | distclean: distclean-recursive 570 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 571 | -rm -f Makefile 572 | distclean-am: clean-am distclean-generic distclean-tags 573 | 574 | dvi: dvi-recursive 575 | 576 | dvi-am: 577 | 578 | html: html-recursive 579 | 580 | html-am: 581 | 582 | info: info-recursive 583 | 584 | info-am: 585 | 586 | install-data-am: 587 | 588 | install-dvi: install-dvi-recursive 589 | 590 | install-dvi-am: 591 | 592 | install-exec-am: 593 | 594 | install-html: install-html-recursive 595 | 596 | install-html-am: 597 | 598 | install-info: install-info-recursive 599 | 600 | install-info-am: 601 | 602 | install-man: 603 | 604 | install-pdf: install-pdf-recursive 605 | 606 | install-pdf-am: 607 | 608 | install-ps: install-ps-recursive 609 | 610 | install-ps-am: 611 | 612 | installcheck-am: 613 | 614 | maintainer-clean: maintainer-clean-recursive 615 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 616 | -rm -rf $(top_srcdir)/autom4te.cache 617 | -rm -f Makefile 618 | maintainer-clean-am: distclean-am maintainer-clean-generic 619 | 620 | mostlyclean: mostlyclean-recursive 621 | 622 | mostlyclean-am: mostlyclean-generic 623 | 624 | pdf: pdf-recursive 625 | 626 | pdf-am: 627 | 628 | ps: ps-recursive 629 | 630 | ps-am: 631 | 632 | uninstall-am: 633 | 634 | .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ 635 | install-am install-strip tags-recursive 636 | 637 | .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ 638 | all all-am am--refresh check check-am clean clean-generic \ 639 | ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ 640 | dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ 641 | distclean distclean-generic distclean-tags distcleancheck \ 642 | distdir distuninstallcheck dvi dvi-am html html-am info \ 643 | info-am install install-am install-data install-data-am \ 644 | install-dvi install-dvi-am install-exec install-exec-am \ 645 | install-html install-html-am install-info install-info-am \ 646 | install-man install-pdf install-pdf-am install-ps \ 647 | install-ps-am install-strip installcheck installcheck-am \ 648 | installdirs installdirs-am maintainer-clean \ 649 | maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ 650 | pdf-am ps ps-am tags tags-recursive uninstall uninstall-am 651 | 652 | 653 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 654 | # Otherwise a system limit (for SysV at least) may be exceeded. 655 | .NOEXPORT: 656 | -------------------------------------------------------------------------------- /aclocal.m4: -------------------------------------------------------------------------------- 1 | # generated automatically by aclocal 1.11 -*- Autoconf -*- 2 | 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 | # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5 | # This file is free software; the Free Software Foundation 6 | # gives unlimited permission to copy and/or distribute it, 7 | # with or without modifications, as long as this notice is preserved. 8 | 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12 | # PARTICULAR PURPOSE. 13 | 14 | m4_ifndef([AC_AUTOCONF_VERSION], 15 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, 17 | [m4_warning([this file was generated for autoconf 2.64. 18 | You have another version of autoconf. It may work, but is not guaranteed to. 19 | If you have problems, you may need to regenerate the build system entirely. 20 | To do so, use the procedure documented by the package, typically `autoreconf'.])]) 21 | 22 | # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23 | # 24 | # This file is free software; the Free Software Foundation 25 | # gives unlimited permission to copy and/or distribute it, 26 | # with or without modifications, as long as this notice is preserved. 27 | 28 | # AM_AUTOMAKE_VERSION(VERSION) 29 | # ---------------------------- 30 | # Automake X.Y traces this macro to ensure aclocal.m4 has been 31 | # generated from the m4 files accompanying Automake X.Y. 32 | # (This private macro should not be called outside this file.) 33 | AC_DEFUN([AM_AUTOMAKE_VERSION], 34 | [am__api_version='1.11' 35 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36 | dnl require some minimum version. Point them to the right macro. 37 | m4_if([$1], [1.11], [], 38 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39 | ]) 40 | 41 | # _AM_AUTOCONF_VERSION(VERSION) 42 | # ----------------------------- 43 | # aclocal traces this macro to find the Autoconf version. 44 | # This is a private macro too. Using m4_define simplifies 45 | # the logic in aclocal, which can simply ignore this definition. 46 | m4_define([_AM_AUTOCONF_VERSION], []) 47 | 48 | # AM_SET_CURRENT_AUTOMAKE_VERSION 49 | # ------------------------------- 50 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53 | [AM_AUTOMAKE_VERSION([1.11])dnl 54 | m4_ifndef([AC_AUTOCONF_VERSION], 55 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57 | 58 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- 59 | 60 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61 | # 62 | # This file is free software; the Free Software Foundation 63 | # gives unlimited permission to copy and/or distribute it, 64 | # with or without modifications, as long as this notice is preserved. 65 | 66 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69 | # 70 | # Of course, Automake must honor this variable whenever it calls a 71 | # tool from the auxiliary directory. The problem is that $srcdir (and 72 | # therefore $ac_aux_dir as well) can be either absolute or relative, 73 | # depending on how configure is run. This is pretty annoying, since 74 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top 75 | # source directory, any form will work fine, but in subdirectories a 76 | # relative path needs to be adjusted first. 77 | # 78 | # $ac_aux_dir/missing 79 | # fails when called from a subdirectory if $ac_aux_dir is relative 80 | # $top_srcdir/$ac_aux_dir/missing 81 | # fails if $ac_aux_dir is absolute, 82 | # fails when called from a subdirectory in a VPATH build with 83 | # a relative $ac_aux_dir 84 | # 85 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86 | # are both prefixed by $srcdir. In an in-source build this is usually 87 | # harmless because $srcdir is `.', but things will broke when you 88 | # start a VPATH build or use an absolute $srcdir. 89 | # 90 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93 | # and then we would define $MISSING as 94 | # MISSING="\${SHELL} $am_aux_dir/missing" 95 | # This will work as long as MISSING is not called from configure, because 96 | # unfortunately $(top_srcdir) has no meaning in configure. 97 | # However there are other variables, like CC, which are often used in 98 | # configure, and could therefore not use this "fixed" $ac_aux_dir. 99 | # 100 | # Another solution, used here, is to always expand $ac_aux_dir to an 101 | # absolute PATH. The drawback is that using absolute paths prevent a 102 | # configured tree to be moved without reconfiguration. 103 | 104 | AC_DEFUN([AM_AUX_DIR_EXPAND], 105 | [dnl Rely on autoconf to set up CDPATH properly. 106 | AC_PREREQ([2.50])dnl 107 | # expand $ac_aux_dir to an absolute path 108 | am_aux_dir=`cd $ac_aux_dir && pwd` 109 | ]) 110 | 111 | # AM_CONDITIONAL -*- Autoconf -*- 112 | 113 | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114 | # Free Software Foundation, Inc. 115 | # 116 | # This file is free software; the Free Software Foundation 117 | # gives unlimited permission to copy and/or distribute it, 118 | # with or without modifications, as long as this notice is preserved. 119 | 120 | # serial 9 121 | 122 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) 123 | # ------------------------------------- 124 | # Define a conditional. 125 | AC_DEFUN([AM_CONDITIONAL], 126 | [AC_PREREQ(2.52)dnl 127 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129 | AC_SUBST([$1_TRUE])dnl 130 | AC_SUBST([$1_FALSE])dnl 131 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl 132 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl 133 | m4_define([_AM_COND_VALUE_$1], [$2])dnl 134 | if $2; then 135 | $1_TRUE= 136 | $1_FALSE='#' 137 | else 138 | $1_TRUE='#' 139 | $1_FALSE= 140 | fi 141 | AC_CONFIG_COMMANDS_PRE( 142 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143 | AC_MSG_ERROR([[conditional "$1" was never defined. 144 | Usually this means the macro was only invoked conditionally.]]) 145 | fi])]) 146 | 147 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148 | # Free Software Foundation, Inc. 149 | # 150 | # This file is free software; the Free Software Foundation 151 | # gives unlimited permission to copy and/or distribute it, 152 | # with or without modifications, as long as this notice is preserved. 153 | 154 | # serial 10 155 | 156 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157 | # written in clear, in which case automake, when reading aclocal.m4, 158 | # will think it sees a *use*, and therefore will trigger all it's 159 | # C support machinery. Also note that it means that autoscan, seeing 160 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161 | 162 | 163 | # _AM_DEPENDENCIES(NAME) 164 | # ---------------------- 165 | # See how the compiler implements dependency checking. 166 | # NAME is "CC", "CXX", "GCJ", or "OBJC". 167 | # We try a few techniques and use that to set a single cache variable. 168 | # 169 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171 | # dependency, and given that the user is not expected to run this macro, 172 | # just rely on AC_PROG_CC. 173 | AC_DEFUN([_AM_DEPENDENCIES], 174 | [AC_REQUIRE([AM_SET_DEPDIR])dnl 175 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl 177 | AC_REQUIRE([AM_DEP_TRACK])dnl 178 | 179 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180 | [$1], CXX, [depcc="$CXX" am_compiler_list=], 181 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182 | [$1], UPC, [depcc="$UPC" am_compiler_list=], 183 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184 | [depcc="$$1" am_compiler_list=]) 185 | 186 | AC_CACHE_CHECK([dependency style of $depcc], 187 | [am_cv_$1_dependencies_compiler_type], 188 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189 | # We make a subdir and do the tests there. Otherwise we can end up 190 | # making bogus files that we don't know about and never remove. For 191 | # instance it was reported that on HP-UX the gcc test will end up 192 | # making a dummy file named `D' -- because `-MD' means `put the output 193 | # in D'. 194 | mkdir conftest.dir 195 | # Copy depcomp to subdir because otherwise we won't find it if we're 196 | # using a relative directory. 197 | cp "$am_depcomp" conftest.dir 198 | cd conftest.dir 199 | # We will build objects and dependencies in a subdirectory because 200 | # it helps to detect inapplicable dependency modes. For instance 201 | # both Tru64's cc and ICC support -MD to output dependencies as a 202 | # side effect of compilation, but ICC will put the dependencies in 203 | # the current directory while Tru64 will put them in the object 204 | # directory. 205 | mkdir sub 206 | 207 | am_cv_$1_dependencies_compiler_type=none 208 | if test "$am_compiler_list" = ""; then 209 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210 | fi 211 | am__universal=false 212 | m4_case([$1], [CC], 213 | [case " $depcc " in #( 214 | *\ -arch\ *\ -arch\ *) am__universal=true ;; 215 | esac], 216 | [CXX], 217 | [case " $depcc " in #( 218 | *\ -arch\ *\ -arch\ *) am__universal=true ;; 219 | esac]) 220 | 221 | for depmode in $am_compiler_list; do 222 | # Setup a source with many dependencies, because some compilers 223 | # like to wrap large dependency lists on column 80 (with \), and 224 | # we should not choose a depcomp mode which is confused by this. 225 | # 226 | # We need to recreate these files for each test, as the compiler may 227 | # overwrite some of them when testing with obscure command lines. 228 | # This happens at least with the AIX C compiler. 229 | : > sub/conftest.c 230 | for i in 1 2 3 4 5 6; do 231 | echo '#include "conftst'$i'.h"' >> sub/conftest.c 232 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233 | # Solaris 8's {/usr,}/bin/sh. 234 | touch sub/conftst$i.h 235 | done 236 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237 | 238 | # We check with `-c' and `-o' for the sake of the "dashmstdout" 239 | # mode. It turns out that the SunPro C++ compiler does not properly 240 | # handle `-M -o', and we need to detect this. Also, some Intel 241 | # versions had trouble with output in subdirs 242 | am__obj=sub/conftest.${OBJEXT-o} 243 | am__minus_obj="-o $am__obj" 244 | case $depmode in 245 | gcc) 246 | # This depmode causes a compiler race in universal mode. 247 | test "$am__universal" = false || continue 248 | ;; 249 | nosideeffect) 250 | # after this tag, mechanisms are not by side-effect, so they'll 251 | # only be used when explicitly requested 252 | if test "x$enable_dependency_tracking" = xyes; then 253 | continue 254 | else 255 | break 256 | fi 257 | ;; 258 | msvisualcpp | msvcmsys) 259 | # This compiler won't grok `-c -o', but also, the minuso test has 260 | # not run yet. These depmodes are late enough in the game, and 261 | # so weak that their functioning should not be impacted. 262 | am__obj=conftest.${OBJEXT-o} 263 | am__minus_obj= 264 | ;; 265 | none) break ;; 266 | esac 267 | if depmode=$depmode \ 268 | source=sub/conftest.c object=$am__obj \ 269 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271 | >/dev/null 2>conftest.err && 272 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276 | # icc doesn't choke on unknown options, it will just issue warnings 277 | # or remarks (even with -Werror). So we grep stderr for any message 278 | # that says an option was ignored or not supported. 279 | # When given -MP, icc 7.0 and 7.1 complain thusly: 280 | # icc: Command line warning: ignoring option '-M'; no argument required 281 | # The diagnosis changed in icc 8.0: 282 | # icc: Command line remark: option '-MP' not supported 283 | if (grep 'ignoring option' conftest.err || 284 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285 | am_cv_$1_dependencies_compiler_type=$depmode 286 | break 287 | fi 288 | fi 289 | done 290 | 291 | cd .. 292 | rm -rf conftest.dir 293 | else 294 | am_cv_$1_dependencies_compiler_type=none 295 | fi 296 | ]) 297 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298 | AM_CONDITIONAL([am__fastdep$1], [ 299 | test "x$enable_dependency_tracking" != xno \ 300 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301 | ]) 302 | 303 | 304 | # AM_SET_DEPDIR 305 | # ------------- 306 | # Choose a directory name for dependency files. 307 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES 308 | AC_DEFUN([AM_SET_DEPDIR], 309 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311 | ]) 312 | 313 | 314 | # AM_DEP_TRACK 315 | # ------------ 316 | AC_DEFUN([AM_DEP_TRACK], 317 | [AC_ARG_ENABLE(dependency-tracking, 318 | [ --disable-dependency-tracking speeds up one-time build 319 | --enable-dependency-tracking do not reject slow dependency extractors]) 320 | if test "x$enable_dependency_tracking" != xno; then 321 | am_depcomp="$ac_aux_dir/depcomp" 322 | AMDEPBACKSLASH='\' 323 | fi 324 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325 | AC_SUBST([AMDEPBACKSLASH])dnl 326 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327 | ]) 328 | 329 | # Generate code to set up dependency tracking. -*- Autoconf -*- 330 | 331 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332 | # Free Software Foundation, Inc. 333 | # 334 | # This file is free software; the Free Software Foundation 335 | # gives unlimited permission to copy and/or distribute it, 336 | # with or without modifications, as long as this notice is preserved. 337 | 338 | #serial 5 339 | 340 | # _AM_OUTPUT_DEPENDENCY_COMMANDS 341 | # ------------------------------ 342 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343 | [{ 344 | # Autoconf 2.62 quotes --file arguments for eval, but not when files 345 | # are listed without --file. Let's play safe and only enable the eval 346 | # if we detect the quoting. 347 | case $CONFIG_FILES in 348 | *\'*) eval set x "$CONFIG_FILES" ;; 349 | *) set x $CONFIG_FILES ;; 350 | esac 351 | shift 352 | for mf 353 | do 354 | # Strip MF so we end up with the name of the file. 355 | mf=`echo "$mf" | sed -e 's/:.*$//'` 356 | # Check whether this is an Automake generated Makefile or not. 357 | # We used to match only the files named `Makefile.in', but 358 | # some people rename them; so instead we look at the file content. 359 | # Grep'ing the first line is not enough: some people post-process 360 | # each Makefile.in and add a new line on top of each file to say so. 361 | # Grep'ing the whole file is not good either: AIX grep has a line 362 | # limit of 2048, but all sed's we know have understand at least 4000. 363 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364 | dirpart=`AS_DIRNAME("$mf")` 365 | else 366 | continue 367 | fi 368 | # Extract the definition of DEPDIR, am__include, and am__quote 369 | # from the Makefile without running `make'. 370 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371 | test -z "$DEPDIR" && continue 372 | am__include=`sed -n 's/^am__include = //p' < "$mf"` 373 | test -z "am__include" && continue 374 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375 | # When using ansi2knr, U may be empty or an underscore; expand it 376 | U=`sed -n 's/^U = //p' < "$mf"` 377 | # Find all dependency output files, they are included files with 378 | # $(DEPDIR) in their names. We invoke sed twice because it is the 379 | # simplest approach to changing $(DEPDIR) to its actual value in the 380 | # expansion. 381 | for file in `sed -n " 382 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384 | # Make sure the directory exists. 385 | test -f "$dirpart/$file" && continue 386 | fdir=`AS_DIRNAME(["$file"])` 387 | AS_MKDIR_P([$dirpart/$fdir]) 388 | # echo "creating $dirpart/$file" 389 | echo '# dummy' > "$dirpart/$file" 390 | done 391 | done 392 | } 393 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394 | 395 | 396 | # AM_OUTPUT_DEPENDENCY_COMMANDS 397 | # ----------------------------- 398 | # This macro should only be invoked once -- use via AC_REQUIRE. 399 | # 400 | # This code is only required when automatic dependency tracking 401 | # is enabled. FIXME. This creates each `.P' file that we will 402 | # need in order to bootstrap the dependency handling code. 403 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404 | [AC_CONFIG_COMMANDS([depfiles], 405 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407 | ]) 408 | 409 | # Do all the work for Automake. -*- Autoconf -*- 410 | 411 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 412 | # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 413 | # 414 | # This file is free software; the Free Software Foundation 415 | # gives unlimited permission to copy and/or distribute it, 416 | # with or without modifications, as long as this notice is preserved. 417 | 418 | # serial 16 419 | 420 | # This macro actually does too much. Some checks are only needed if 421 | # your package does certain things. But this isn't really a big deal. 422 | 423 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 424 | # AM_INIT_AUTOMAKE([OPTIONS]) 425 | # ----------------------------------------------- 426 | # The call with PACKAGE and VERSION arguments is the old style 427 | # call (pre autoconf-2.50), which is being phased out. PACKAGE 428 | # and VERSION should now be passed to AC_INIT and removed from 429 | # the call to AM_INIT_AUTOMAKE. 430 | # We support both call styles for the transition. After 431 | # the next Automake release, Autoconf can make the AC_INIT 432 | # arguments mandatory, and then we can depend on a new Autoconf 433 | # release and drop the old call support. 434 | AC_DEFUN([AM_INIT_AUTOMAKE], 435 | [AC_PREREQ([2.62])dnl 436 | dnl Autoconf wants to disallow AM_ names. We explicitly allow 437 | dnl the ones we care about. 438 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 439 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 440 | AC_REQUIRE([AC_PROG_INSTALL])dnl 441 | if test "`cd $srcdir && pwd`" != "`pwd`"; then 442 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 443 | # is not polluted with repeated "-I." 444 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 445 | # test to see if srcdir already configured 446 | if test -f $srcdir/config.status; then 447 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 448 | fi 449 | fi 450 | 451 | # test whether we have cygpath 452 | if test -z "$CYGPATH_W"; then 453 | if (cygpath --version) >/dev/null 2>/dev/null; then 454 | CYGPATH_W='cygpath -w' 455 | else 456 | CYGPATH_W=echo 457 | fi 458 | fi 459 | AC_SUBST([CYGPATH_W]) 460 | 461 | # Define the identity of the package. 462 | dnl Distinguish between old-style and new-style calls. 463 | m4_ifval([$2], 464 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 465 | AC_SUBST([PACKAGE], [$1])dnl 466 | AC_SUBST([VERSION], [$2])], 467 | [_AM_SET_OPTIONS([$1])dnl 468 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 469 | m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 470 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 471 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 472 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 473 | 474 | _AM_IF_OPTION([no-define],, 475 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 476 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 477 | 478 | # Some tools Automake needs. 479 | AC_REQUIRE([AM_SANITY_CHECK])dnl 480 | AC_REQUIRE([AC_ARG_PROGRAM])dnl 481 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 482 | AM_MISSING_PROG(AUTOCONF, autoconf) 483 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 484 | AM_MISSING_PROG(AUTOHEADER, autoheader) 485 | AM_MISSING_PROG(MAKEINFO, makeinfo) 486 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 487 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 488 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl 489 | # We need awk for the "check" target. The system "awk" is bad on 490 | # some platforms. 491 | AC_REQUIRE([AC_PROG_AWK])dnl 492 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl 493 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl 494 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 495 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 496 | [_AM_PROG_TAR([v7])])]) 497 | _AM_IF_OPTION([no-dependencies],, 498 | [AC_PROVIDE_IFELSE([AC_PROG_CC], 499 | [_AM_DEPENDENCIES(CC)], 500 | [define([AC_PROG_CC], 501 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 502 | AC_PROVIDE_IFELSE([AC_PROG_CXX], 503 | [_AM_DEPENDENCIES(CXX)], 504 | [define([AC_PROG_CXX], 505 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 506 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], 507 | [_AM_DEPENDENCIES(OBJC)], 508 | [define([AC_PROG_OBJC], 509 | defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 510 | ]) 511 | _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 512 | dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 513 | dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 514 | dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 515 | AC_CONFIG_COMMANDS_PRE(dnl 516 | [m4_provide_if([_AM_COMPILER_EXEEXT], 517 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 518 | ]) 519 | 520 | dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 521 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 522 | dnl mangled by Autoconf and run in a shell conditional statement. 523 | m4_define([_AC_COMPILER_EXEEXT], 524 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 525 | 526 | 527 | # When config.status generates a header, we must update the stamp-h file. 528 | # This file resides in the same directory as the config header 529 | # that is generated. The stamp files are numbered to have different names. 530 | 531 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 532 | # loop where config.status creates the headers, so we can generate 533 | # our stamp files there. 534 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 535 | [# Compute $1's index in $config_headers. 536 | _am_arg=$1 537 | _am_stamp_count=1 538 | for _am_header in $config_headers :; do 539 | case $_am_header in 540 | $_am_arg | $_am_arg:* ) 541 | break ;; 542 | * ) 543 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; 544 | esac 545 | done 546 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 547 | 548 | # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 549 | # 550 | # This file is free software; the Free Software Foundation 551 | # gives unlimited permission to copy and/or distribute it, 552 | # with or without modifications, as long as this notice is preserved. 553 | 554 | # AM_PROG_INSTALL_SH 555 | # ------------------ 556 | # Define $install_sh. 557 | AC_DEFUN([AM_PROG_INSTALL_SH], 558 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 559 | if test x"${install_sh}" != xset; then 560 | case $am_aux_dir in 561 | *\ * | *\ *) 562 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 563 | *) 564 | install_sh="\${SHELL} $am_aux_dir/install-sh" 565 | esac 566 | fi 567 | AC_SUBST(install_sh)]) 568 | 569 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc. 570 | # 571 | # This file is free software; the Free Software Foundation 572 | # gives unlimited permission to copy and/or distribute it, 573 | # with or without modifications, as long as this notice is preserved. 574 | 575 | # serial 2 576 | 577 | # Check whether the underlying file-system supports filenames 578 | # with a leading dot. For instance MS-DOS doesn't. 579 | AC_DEFUN([AM_SET_LEADING_DOT], 580 | [rm -rf .tst 2>/dev/null 581 | mkdir .tst 2>/dev/null 582 | if test -d .tst; then 583 | am__leading_dot=. 584 | else 585 | am__leading_dot=_ 586 | fi 587 | rmdir .tst 2>/dev/null 588 | AC_SUBST([am__leading_dot])]) 589 | 590 | # Check to see how 'make' treats includes. -*- Autoconf -*- 591 | 592 | # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 593 | # 594 | # This file is free software; the Free Software Foundation 595 | # gives unlimited permission to copy and/or distribute it, 596 | # with or without modifications, as long as this notice is preserved. 597 | 598 | # serial 4 599 | 600 | # AM_MAKE_INCLUDE() 601 | # ----------------- 602 | # Check to see how make treats includes. 603 | AC_DEFUN([AM_MAKE_INCLUDE], 604 | [am_make=${MAKE-make} 605 | cat > confinc << 'END' 606 | am__doit: 607 | @echo this is the am__doit target 608 | .PHONY: am__doit 609 | END 610 | # If we don't find an include directive, just comment out the code. 611 | AC_MSG_CHECKING([for style of include used by $am_make]) 612 | am__include="#" 613 | am__quote= 614 | _am_result=none 615 | # First try GNU make style include. 616 | echo "include confinc" > confmf 617 | # Ignore all kinds of additional output from `make'. 618 | case `$am_make -s -f confmf 2> /dev/null` in #( 619 | *the\ am__doit\ target*) 620 | am__include=include 621 | am__quote= 622 | _am_result=GNU 623 | ;; 624 | esac 625 | # Now try BSD make style include. 626 | if test "$am__include" = "#"; then 627 | echo '.include "confinc"' > confmf 628 | case `$am_make -s -f confmf 2> /dev/null` in #( 629 | *the\ am__doit\ target*) 630 | am__include=.include 631 | am__quote="\"" 632 | _am_result=BSD 633 | ;; 634 | esac 635 | fi 636 | AC_SUBST([am__include]) 637 | AC_SUBST([am__quote]) 638 | AC_MSG_RESULT([$_am_result]) 639 | rm -f confinc confmf 640 | ]) 641 | 642 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 643 | 644 | # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 645 | # Free Software Foundation, Inc. 646 | # 647 | # This file is free software; the Free Software Foundation 648 | # gives unlimited permission to copy and/or distribute it, 649 | # with or without modifications, as long as this notice is preserved. 650 | 651 | # serial 6 652 | 653 | # AM_MISSING_PROG(NAME, PROGRAM) 654 | # ------------------------------ 655 | AC_DEFUN([AM_MISSING_PROG], 656 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) 657 | $1=${$1-"${am_missing_run}$2"} 658 | AC_SUBST($1)]) 659 | 660 | 661 | # AM_MISSING_HAS_RUN 662 | # ------------------ 663 | # Define MISSING if not defined so far and test if it supports --run. 664 | # If it does, set am_missing_run to use it, otherwise, to nothing. 665 | AC_DEFUN([AM_MISSING_HAS_RUN], 666 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 667 | AC_REQUIRE_AUX_FILE([missing])dnl 668 | if test x"${MISSING+set}" != xset; then 669 | case $am_aux_dir in 670 | *\ * | *\ *) 671 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 672 | *) 673 | MISSING="\${SHELL} $am_aux_dir/missing" ;; 674 | esac 675 | fi 676 | # Use eval to expand $SHELL 677 | if eval "$MISSING --run true"; then 678 | am_missing_run="$MISSING --run " 679 | else 680 | am_missing_run= 681 | AC_MSG_WARN([`missing' script is too old or missing]) 682 | fi 683 | ]) 684 | 685 | # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 686 | # 687 | # This file is free software; the Free Software Foundation 688 | # gives unlimited permission to copy and/or distribute it, 689 | # with or without modifications, as long as this notice is preserved. 690 | 691 | # AM_PROG_MKDIR_P 692 | # --------------- 693 | # Check for `mkdir -p'. 694 | AC_DEFUN([AM_PROG_MKDIR_P], 695 | [AC_PREREQ([2.60])dnl 696 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl 697 | dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 698 | dnl while keeping a definition of mkdir_p for backward compatibility. 699 | dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 700 | dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 701 | dnl Makefile.ins that do not define MKDIR_P, so we do our own 702 | dnl adjustment using top_builddir (which is defined more often than 703 | dnl MKDIR_P). 704 | AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 705 | case $mkdir_p in 706 | [[\\/$]]* | ?:[[\\/]]*) ;; 707 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 708 | esac 709 | ]) 710 | 711 | # Helper functions for option handling. -*- Autoconf -*- 712 | 713 | # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 714 | # 715 | # This file is free software; the Free Software Foundation 716 | # gives unlimited permission to copy and/or distribute it, 717 | # with or without modifications, as long as this notice is preserved. 718 | 719 | # serial 4 720 | 721 | # _AM_MANGLE_OPTION(NAME) 722 | # ----------------------- 723 | AC_DEFUN([_AM_MANGLE_OPTION], 724 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 725 | 726 | # _AM_SET_OPTION(NAME) 727 | # ------------------------------ 728 | # Set option NAME. Presently that only means defining a flag for this option. 729 | AC_DEFUN([_AM_SET_OPTION], 730 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 731 | 732 | # _AM_SET_OPTIONS(OPTIONS) 733 | # ---------------------------------- 734 | # OPTIONS is a space-separated list of Automake options. 735 | AC_DEFUN([_AM_SET_OPTIONS], 736 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 737 | 738 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 739 | # ------------------------------------------- 740 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 741 | AC_DEFUN([_AM_IF_OPTION], 742 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 743 | 744 | # Check to make sure that the build environment is sane. -*- Autoconf -*- 745 | 746 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 747 | # Free Software Foundation, Inc. 748 | # 749 | # This file is free software; the Free Software Foundation 750 | # gives unlimited permission to copy and/or distribute it, 751 | # with or without modifications, as long as this notice is preserved. 752 | 753 | # serial 5 754 | 755 | # AM_SANITY_CHECK 756 | # --------------- 757 | AC_DEFUN([AM_SANITY_CHECK], 758 | [AC_MSG_CHECKING([whether build environment is sane]) 759 | # Just in case 760 | sleep 1 761 | echo timestamp > conftest.file 762 | # Reject unsafe characters in $srcdir or the absolute working directory 763 | # name. Accept space and tab only in the latter. 764 | am_lf=' 765 | ' 766 | case `pwd` in 767 | *[[\\\"\#\$\&\'\`$am_lf]]*) 768 | AC_MSG_ERROR([unsafe absolute working directory name]);; 769 | esac 770 | case $srcdir in 771 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 772 | AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 773 | esac 774 | 775 | # Do `set' in a subshell so we don't clobber the current shell's 776 | # arguments. Must try -L first in case configure is actually a 777 | # symlink; some systems play weird games with the mod time of symlinks 778 | # (eg FreeBSD returns the mod time of the symlink's containing 779 | # directory). 780 | if ( 781 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 782 | if test "$[*]" = "X"; then 783 | # -L didn't work. 784 | set X `ls -t "$srcdir/configure" conftest.file` 785 | fi 786 | rm -f conftest.file 787 | if test "$[*]" != "X $srcdir/configure conftest.file" \ 788 | && test "$[*]" != "X conftest.file $srcdir/configure"; then 789 | 790 | # If neither matched, then we have a broken ls. This can happen 791 | # if, for instance, CONFIG_SHELL is bash and it inherits a 792 | # broken ls alias from the environment. This has actually 793 | # happened. Such a system could not be considered "sane". 794 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 795 | alias in your environment]) 796 | fi 797 | 798 | test "$[2]" = conftest.file 799 | ) 800 | then 801 | # Ok. 802 | : 803 | else 804 | AC_MSG_ERROR([newly created file is older than distributed files! 805 | Check your system clock]) 806 | fi 807 | AC_MSG_RESULT(yes)]) 808 | 809 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 810 | # 811 | # This file is free software; the Free Software Foundation 812 | # gives unlimited permission to copy and/or distribute it, 813 | # with or without modifications, as long as this notice is preserved. 814 | 815 | # AM_PROG_INSTALL_STRIP 816 | # --------------------- 817 | # One issue with vendor `install' (even GNU) is that you can't 818 | # specify the program used to strip binaries. This is especially 819 | # annoying in cross-compiling environments, where the build's strip 820 | # is unlikely to handle the host's binaries. 821 | # Fortunately install-sh will honor a STRIPPROG variable, so we 822 | # always use install-sh in `make install-strip', and initialize 823 | # STRIPPROG with the value of the STRIP variable (set by the user). 824 | AC_DEFUN([AM_PROG_INSTALL_STRIP], 825 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 826 | # Installed binaries are usually stripped using `strip' when the user 827 | # run `make install-strip'. However `strip' might not be the right 828 | # tool to use in cross-compilation environments, therefore Automake 829 | # will honor the `STRIP' environment variable to overrule this program. 830 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 831 | if test "$cross_compiling" != no; then 832 | AC_CHECK_TOOL([STRIP], [strip], :) 833 | fi 834 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 835 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) 836 | 837 | # Copyright (C) 2006, 2008 Free Software Foundation, Inc. 838 | # 839 | # This file is free software; the Free Software Foundation 840 | # gives unlimited permission to copy and/or distribute it, 841 | # with or without modifications, as long as this notice is preserved. 842 | 843 | # serial 2 844 | 845 | # _AM_SUBST_NOTMAKE(VARIABLE) 846 | # --------------------------- 847 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 848 | # This macro is traced by Automake. 849 | AC_DEFUN([_AM_SUBST_NOTMAKE]) 850 | 851 | # AM_SUBST_NOTMAKE(VARIABLE) 852 | # --------------------------- 853 | # Public sister of _AM_SUBST_NOTMAKE. 854 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 855 | 856 | # Check how to create a tarball. -*- Autoconf -*- 857 | 858 | # Copyright (C) 2004, 2005 Free Software Foundation, Inc. 859 | # 860 | # This file is free software; the Free Software Foundation 861 | # gives unlimited permission to copy and/or distribute it, 862 | # with or without modifications, as long as this notice is preserved. 863 | 864 | # serial 2 865 | 866 | # _AM_PROG_TAR(FORMAT) 867 | # -------------------- 868 | # Check how to create a tarball in format FORMAT. 869 | # FORMAT should be one of `v7', `ustar', or `pax'. 870 | # 871 | # Substitute a variable $(am__tar) that is a command 872 | # writing to stdout a FORMAT-tarball containing the directory 873 | # $tardir. 874 | # tardir=directory && $(am__tar) > result.tar 875 | # 876 | # Substitute a variable $(am__untar) that extract such 877 | # a tarball read from stdin. 878 | # $(am__untar) < result.tar 879 | AC_DEFUN([_AM_PROG_TAR], 880 | [# Always define AMTAR for backward compatibility. 881 | AM_MISSING_PROG([AMTAR], [tar]) 882 | m4_if([$1], [v7], 883 | [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 884 | [m4_case([$1], [ustar],, [pax],, 885 | [m4_fatal([Unknown tar format])]) 886 | AC_MSG_CHECKING([how to create a $1 tar archive]) 887 | # Loop over all known methods to create a tar archive until one works. 888 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 889 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} 890 | # Do not fold the above two line into one, because Tru64 sh and 891 | # Solaris sh will not grok spaces in the rhs of `-'. 892 | for _am_tool in $_am_tools 893 | do 894 | case $_am_tool in 895 | gnutar) 896 | for _am_tar in tar gnutar gtar; 897 | do 898 | AM_RUN_LOG([$_am_tar --version]) && break 899 | done 900 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 901 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 902 | am__untar="$_am_tar -xf -" 903 | ;; 904 | plaintar) 905 | # Must skip GNU tar: if it does not support --format= it doesn't create 906 | # ustar tarball either. 907 | (tar --version) >/dev/null 2>&1 && continue 908 | am__tar='tar chf - "$$tardir"' 909 | am__tar_='tar chf - "$tardir"' 910 | am__untar='tar xf -' 911 | ;; 912 | pax) 913 | am__tar='pax -L -x $1 -w "$$tardir"' 914 | am__tar_='pax -L -x $1 -w "$tardir"' 915 | am__untar='pax -r' 916 | ;; 917 | cpio) 918 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 919 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 920 | am__untar='cpio -i -H $1 -d' 921 | ;; 922 | none) 923 | am__tar=false 924 | am__tar_=false 925 | am__untar=false 926 | ;; 927 | esac 928 | 929 | # If the value was cached, stop now. We just wanted to have am__tar 930 | # and am__untar set. 931 | test -n "${am_cv_prog_tar_$1}" && break 932 | 933 | # tar/untar a dummy directory, and stop if the command works 934 | rm -rf conftest.dir 935 | mkdir conftest.dir 936 | echo GrepMe > conftest.dir/file 937 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 938 | rm -rf conftest.dir 939 | if test -s conftest.tar; then 940 | AM_RUN_LOG([$am__untar /dev/null 2>&1 && break 942 | fi 943 | done 944 | rm -rf conftest.dir 945 | 946 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 947 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 948 | AC_SUBST([am__tar]) 949 | AC_SUBST([am__untar]) 950 | ]) # _AM_PROG_TAR 951 | 952 | --------------------------------------------------------------------------------