From c00df6f653957b91823de377a32812715615fb20 Mon Sep 17 00:00:00 2001
From: "R. Steve McKown"
Date: Thu, 10 Dec 2009 13:53:38 -0700
Subject: [PATCH] Import pristine deputy-tinyos v1.1
---
.cvsignore | 4 +
.distexclude | 29 +
LICENSE | 35 +
Makefile.in | 451 +
bin/.cvsignore | 2 +
bin/deputy | 60 +
cil/.cvsignore | 38 +
cil/Bootstrap | 3 +
cil/INSTALL | 41 +
cil/LICENSE | 36 +
cil/Makefile.gcc | 75 +
cil/Makefile.in | 663 ++
cil/Makefile.msvc | 42 +
cil/NOTES | 86 +
cil/README | 2 +
cil/_tags | 3 +
cil/aclocal.m4 | 69 +
cil/bin/.cvsignore | 5 +
cil/bin/CilConfig.pm.in | 6 +
cil/bin/cabsxform | 16 +
cil/bin/cilly | 152 +
cil/bin/cilly.bat.in | 1 +
cil/bin/patcher | 630 ++
cil/bin/patcher.bat.in | 1 +
cil/bin/teetwo | 36 +
cil/bin/test-bad | 202 +
cil/cil.itarget | 2 +
cil/cil.spec.in | 90 +
cil/config.guess | 1497 +++
cil/config.h.in | 27 +
cil/config.mk.in | 6 +
cil/config.sub | 1469 +++
cil/configure | 7005 +++++++++++++
cil/configure.in | 561 ++
cil/debian/.cvsignore | 5 +
cil/debian/changelog | 29 +
cil/debian/cil-dev.install | 2 +
cil/debian/cil.install | 2 +
cil/debian/compat | 1 +
cil/debian/control | 29 +
cil/debian/copyright | 46 +
cil/debian/rules | 90 +
cil/debian/watch | 6 +
cil/doc/.cvsignore | 24 +
cil/doc/cil.itarget | 1 +
cil/doc/cil.odocl | 11 +
cil/doc/cil.tex | 3834 ++++++++
cil/doc/cilcode.pl | 102 +
cil/doc/comment.sty | 278 +
cil/doc/cvssetup.tex | 216 +
cil/doc/fullpage.sty | 29 +
cil/doc/header.html.in | 18 +
cil/doc/hevea.sty | 66 +
cil/doc/html/.cvsignore | 1 +
cil/doc/index.html.in | 26 +
cil/doc/main.html | 42 +
cil/doc/makefiles.txt | 138 +
cil/doc/ocamldoc.html | 88 +
cil/doc/ocamldoc.patch | 141 +
cil/doc/program.sty | 265 +
cil/doc/proof.sty | 296 +
cil/doc/sendmail.txt | 142 +
cil/doc/setup.tex | 172 +
cil/doc/tips-and-tricks.txt | 229 +
cil/install-sh | 251 +
cil/lib/.cvsignore | 5 +
cil/lib/.gdbinit | 6 +
cil/lib/Cilly.pm | 2237 +++++
cil/lib/KeptFile.pm | 88 +
cil/lib/Makefile | 31 +
cil/lib/OutputFile.pm | 213 +
cil/lib/TempFile.pm | 90 +
cil/myocamlbuild.ml | 42 +
cil/obj/.depend/.cvsignore | 2 +
cil/ocamlutil/.cvsignore | 3 +
cil/ocamlutil/Makefile.ocaml | 467 +
cil/ocamlutil/Makefile.ocaml.build | 56 +
cil/ocamlutil/RegTest.pm | 1335 +++
cil/ocamlutil/_tags | 2 +
cil/ocamlutil/alpha.ml | 174 +
cil/ocamlutil/alpha.mli | 50 +
cil/ocamlutil/bitmap.ml | 227 +
cil/ocamlutil/bitmap.mli | 56 +
cil/ocamlutil/bitvector.ml | 197 +
cil/ocamlutil/bitvector.mli | 76 +
cil/ocamlutil/bitvector.out | 18 +
cil/ocamlutil/bitvectori.c | 395 +
cil/ocamlutil/clist.ml | 183 +
cil/ocamlutil/clist.mli | 97 +
cil/ocamlutil/errormsg.ml | 337 +
cil/ocamlutil/errormsg.mli | 164 +
cil/ocamlutil/growArray.ml | 193 +
cil/ocamlutil/growArray.mli | 131 +
cil/ocamlutil/inthash.ml | 192 +
cil/ocamlutil/inthash.mli | 28 +
cil/ocamlutil/intmap.ml | 171 +
cil/ocamlutil/intmap.mli | 87 +
cil/ocamlutil/longarray.ml | 102 +
cil/ocamlutil/longarray.mli | 20 +
cil/ocamlutil/options.ml | 105 +
cil/ocamlutil/options.mli | 48 +
cil/ocamlutil/pa_prtype.ml | 479 +
cil/ocamlutil/perfcount.c.in | 255 +
cil/ocamlutil/pretty.ml | 860 ++
cil/ocamlutil/pretty.mli | 318 +
cil/ocamlutil/profile.c.in | 797 ++
cil/ocamlutil/runall.pl | 431 +
cil/ocamlutil/stats.ml | 207 +
cil/ocamlutil/stats.mli | 90 +
cil/ocamlutil/symbolrange.pl | 183 +
cil/ocamlutil/trace.ml | 169 +
cil/ocamlutil/trace.mli | 106 +
cil/ocamlutil/util.ml | 815 ++
cil/ocamlutil/util.mli | 311 +
cil/src/.cvsignore | 3 +
cil/src/_tags | 8 +
cil/src/check.ml | 1034 ++
cil/src/check.mli | 47 +
cil/src/cil.itarget | 4 +
cil/src/cil.ml | 6810 +++++++++++++
cil/src/cil.mli | 2604 +++++
cil/src/cil.mllib | 67 +
cil/src/cillower.ml | 57 +
cil/src/cillower.mli | 42 +
cil/src/ciloptions.ml | 338 +
cil/src/ciloptions.mli | 48 +
cil/src/cilutil.ml | 74 +
cil/src/cilversion.ml.in | 6 +
cil/src/escape.ml | 93 +
cil/src/escape.mli | 48 +
cil/src/ext/_tags | 2 +
cil/src/ext/arithabs.ml | 1103 +++
cil/src/ext/astslicer.ml | 442 +
cil/src/ext/availexps.ml | 390 +
cil/src/ext/availexpslv.ml | 433 +
cil/src/ext/blockinggraph.ml | 769 ++
cil/src/ext/blockinggraph.mli | 40 +
cil/src/ext/callgraph.ml | 250 +
cil/src/ext/callgraph.mli | 123 +
cil/src/ext/canonicalize.ml | 292 +
cil/src/ext/canonicalize.mli | 48 +
cil/src/ext/ccl.ml | 1943 ++++
cil/src/ext/ccl.mli | 40 +
cil/src/ext/cfg.ml | 319 +
cil/src/ext/cfg.mli | 36 +
cil/src/ext/ciltools.ml | 228 +
cil/src/ext/cqualann.ml | 518 +
cil/src/ext/dataflow.ml | 509 +
cil/src/ext/dataflow.mli | 166 +
cil/src/ext/dataslicing.ml | 454 +
cil/src/ext/dataslicing.mli | 41 +
cil/src/ext/deadcodeelim.ml | 409 +
cil/src/ext/dominators.ml | 360 +
cil/src/ext/dominators.mli | 43 +
cil/src/ext/epicenter.ml | 114 +
cil/src/ext/expcompare.ml | 299 +
cil/src/ext/heap.ml | 112 +
cil/src/ext/heapify.ml | 250 +
cil/src/ext/inliner.ml | 446 +
cil/src/ext/liveness.ml | 337 +
cil/src/ext/logcalls.ml | 268 +
cil/src/ext/logcalls.mli | 41 +
cil/src/ext/logwrites.ml | 139 +
cil/src/ext/oneret.ml | 174 +
cil/src/ext/oneret.mli | 44 +
cil/src/ext/optutil.ml | 189 +
cil/src/ext/optutil.mli | 83 +
cil/src/ext/partial.ml | 1180 +++
cil/src/ext/predabst.ml | 917 ++
cil/src/ext/pta/golf.ml | 1657 ++++
cil/src/ext/pta/golf.mli | 83 +
cil/src/ext/pta/olf.ml | 1108 +++
cil/src/ext/pta/olf.mli | 80 +
cil/src/ext/pta/ptranal.ml | 595 ++
cil/src/ext/pta/ptranal.mli | 160 +
cil/src/ext/pta/setp.ml | 342 +
cil/src/ext/pta/setp.mli | 180 +
cil/src/ext/pta/steensgaard.ml | 1417 +++
cil/src/ext/pta/steensgaard.mli | 71 +
cil/src/ext/pta/uref.ml | 94 +
cil/src/ext/pta/uref.mli | 65 +
cil/src/ext/rand.ml | 354 +
cil/src/ext/reachingdefs.ml | 568 ++
cil/src/ext/rmciltmps.ml | 1102 +++
cil/src/ext/sfi.ml | 337 +
cil/src/ext/simplemem.ml | 132 +
cil/src/ext/simplify.ml | 721 ++
cil/src/ext/ssa.ml | 696 ++
cil/src/ext/ssa.mli | 45 +
cil/src/ext/stackoverflow.ml | 246 +
cil/src/ext/stackoverflow.mli | 43 +
cil/src/ext/ufsarithabs.ml | 1182 +++
cil/src/ext/usedef.ml | 245 +
cil/src/formatcil.ml | 215 +
cil/src/formatcil.mli | 103 +
cil/src/formatlex.mll | 308 +
cil/src/formatparse.mly | 1449 +++
cil/src/frontc/.cvsignore | 1 +
cil/src/frontc/cabs.ml | 306 +
cil/src/frontc/cabs2cil.ml | 6380 ++++++++++++
cil/src/frontc/cabs2cil.mli | 86 +
cil/src/frontc/cabshelper.ml | 109 +
cil/src/frontc/cabsvisit.ml | 582 ++
cil/src/frontc/cabsvisit.mli | 115 +
cil/src/frontc/clexer.mli | 62 +
cil/src/frontc/clexer.mll | 690 ++
cil/src/frontc/cparser.mly | 1555 +++
cil/src/frontc/cprint.ml | 918 ++
cil/src/frontc/frontc.ml | 266 +
cil/src/frontc/frontc.mli | 56 +
cil/src/frontc/lexerhack.ml | 22 +
cil/src/frontc/patch.ml | 838 ++
cil/src/frontc/patch.mli | 42 +
cil/src/frontc/whitetrack.ml | 139 +
cil/src/frontc/whitetrack.mli | 22 +
cil/src/libmaincil.ml | 108 +
cil/src/machdep-ml.c | 239 +
cil/src/machdepenv.ml | 109 +
cil/src/main.ml | 295 +
cil/src/mergecil.ml | 1761 ++++
cil/src/mergecil.mli | 42 +
cil/src/prettytest.ml | 127 +
cil/src/rmtmps.ml | 779 ++
cil/src/rmtmps.mli | 82 +
cil/src/testcil.ml | 440 +
cil/src/zrapp.ml | 646 ++
cil/src/zrapp.mli | 13 +
cil/test/.cvsignore | 34 +
cil/test/Makefile | 426 +
cil/test/small1/.cvsignore | 48 +
cil/test/small1/.gdbinit | 5 +
cil/test/small1/GRT.c | 11 +
cil/test/small1/Makefile | 6 +
cil/test/small1/addr-array.c | 23 +
cil/test/small1/addrof3.c | 21 +
cil/test/small1/align1.c | 25 +
cil/test/small1/align2.c | 335 +
cil/test/small1/align3.c | 84 +
cil/test/small1/apachebits.c | 106 +
cil/test/small1/apachebuf.c | 33 +
cil/test/small1/apachefptr.c | 22 +
cil/test/small1/argcast.c | 16 +
cil/test/small1/array-args.c | 8 +
cil/test/small1/array-size-trick.c | 50 +
cil/test/small1/array1.c | 34 +
cil/test/small1/array2.c | 20 +
cil/test/small1/array_formal.c | 44 +
cil/test/small1/array_varsize.c | 31 +
cil/test/small1/arrayinitsize.c | 34 +
cil/test/small1/asm1.c | 34 +
cil/test/small1/asm2.c | 8 +
cil/test/small1/asm3.c | 4 +
cil/test/small1/asm4.c | 53 +
cil/test/small1/asm5.c | 7 +
cil/test/small1/assign.c | 41 +
cil/test/small1/attr.c | 39 +
cil/test/small1/attr10.c | 26 +
cil/test/small1/attr11.c | 14 +
cil/test/small1/attr12.c | 7 +
cil/test/small1/attr13.c | 7 +
cil/test/small1/attr2.c | 43 +
cil/test/small1/attr3.c | 32 +
cil/test/small1/attr4.c | 37 +
cil/test/small1/attr5.c | 12 +
cil/test/small1/attr6.c | 14 +
cil/test/small1/attr7.c | 8 +
cil/test/small1/attr8.c | 10 +
cil/test/small1/attr9.c | 49 +
cil/test/small1/bf.c | 17 +
cil/test/small1/bind-formatstring.c | 247 +
cil/test/small1/bind-used-not-defined.c | 1696 ++++
cil/test/small1/bitfield.c | 47 +
cil/test/small1/bitfield0.c | 17 +
cil/test/small1/bitfield2.c | 17 +
cil/test/small1/bitfield3.c | 87 +
cil/test/small1/blockattr.c | 10 +
cil/test/small1/builtin.c | 7 +
cil/test/small1/builtin2.c | 9 +
cil/test/small1/builtin3.c | 37 +
cil/test/small1/builtin_choose_expr.c | 19 +
cil/test/small1/call2.c | 18 +
cil/test/small1/caserange.c | 19 +
cil/test/small1/cast1.c | 14 +
cil/test/small1/cast2.c | 6 +
cil/test/small1/cast3.c | 24 +
cil/test/small1/cast4.c | 33 +
cil/test/small1/cast8.c | 17 +
cil/test/small1/castincr.c | 18 +
cil/test/small1/combine10_1.c | 7 +
cil/test/small1/combine10_2.c | 6 +
cil/test/small1/combine10_3.c | 12 +
cil/test/small1/combine11_1.c | 15 +
cil/test/small1/combine11_2.c | 19 +
cil/test/small1/combine12_1.c | 14 +
cil/test/small1/combine12_2.c | 13 +
cil/test/small1/combine13_1.c | 6 +
cil/test/small1/combine13_2.c | 13 +
cil/test/small1/combine14_1.c | 21 +
cil/test/small1/combine14_2.c | 11 +
cil/test/small1/combine15_1.c | 38 +
cil/test/small1/combine15_2.c | 8 +
cil/test/small1/combine16_1.c | 17 +
cil/test/small1/combine16_2.c | 15 +
cil/test/small1/combine17_1.c | 9 +
cil/test/small1/combine17_2.c | 10 +
cil/test/small1/combine18_1.c | 16 +
cil/test/small1/combine18_2.c | 8 +
cil/test/small1/combine1_1.c | 27 +
cil/test/small1/combine1_2.c | 10 +
cil/test/small1/combine1_3.c | 13 +
cil/test/small1/combine20_1.c | 7 +
cil/test/small1/combine20_2.c | 16 +
cil/test/small1/combine21_1.c | 17 +
cil/test/small1/combine21_2.c | 11 +
cil/test/small1/combine22_1.c | 8 +
cil/test/small1/combine22_2.c | 14 +
cil/test/small1/combine2_1.c | 11 +
cil/test/small1/combine2_2.c | 13 +
cil/test/small1/combine2_3.c | 10 +
cil/test/small1/combine3_1.c | 8 +
cil/test/small1/combine3_2.c | 15 +
cil/test/small1/combine3_3.c | 18 +
cil/test/small1/combine4_1.c | 6 +
cil/test/small1/combine4_2.c | 9 +
cil/test/small1/combine5.h | 30 +
cil/test/small1/combine5_1.c | 9 +
cil/test/small1/combine5_2.c | 1 +
cil/test/small1/combine5_3.c | 33 +
cil/test/small1/combine6_1.c | 22 +
cil/test/small1/combine6_2.c | 14 +
cil/test/small1/combine6_3.c | 1 +
cil/test/small1/combine7_1.c | 10 +
cil/test/small1/combine7_2.c | 14 +
cil/test/small1/combine7_3.c | 5 +
cil/test/small1/combine8_1.c | 16 +
cil/test/small1/combine8_2.c | 10 +
cil/test/small1/combine9_1.c | 15 +
cil/test/small1/combine9_2.c | 6 +
cil/test/small1/combine_allocate_1.c | 1 +
cil/test/small1/combine_allocate_2.c | 24 +
cil/test/small1/combine_copyptrs_1.c | 6 +
cil/test/small1/combine_copyptrs_2.c | 85 +
cil/test/small1/combine_init_1.c | 21 +
cil/test/small1/combine_init_2.c | 12 +
cil/test/small1/combine_node_alloc_1.c | 9 +
cil/test/small1/combine_node_alloc_2.c | 14 +
cil/test/small1/combine_samefn_1.c | 45 +
cil/test/small1/combine_samefn_2.c | 31 +
cil/test/small1/combine_sbumpB_1.c | 5 +
cil/test/small1/combine_sbumpB_2.c | 5 +
cil/test/small1/combine_sbumpB_3.c | 54 +
cil/test/small1/combine_sbump_1.c | 3 +
cil/test/small1/combine_sbump_2.c | 23 +
cil/test/small1/combine_syserr_1.c | 7 +
cil/test/small1/combine_syserr_2.c | 28 +
cil/test/small1/combine_theFunc_1.c | 3 +
cil/test/small1/combine_theFunc_2.c | 4 +
cil/test/small1/combine_theFunc_3.c | 34 +
cil/test/small1/combinealias_1.c | 7 +
cil/test/small1/combinealias_2.c | 6 +
cil/test/small1/combineenum1_1.c | 10 +
cil/test/small1/combineenum1_2.c | 13 +
cil/test/small1/combineenum2_1.c | 10 +
cil/test/small1/combineenum2_2.c | 8 +
cil/test/small1/combineenum3_1.c | 9 +
cil/test/small1/combineenum3_2.c | 4 +
cil/test/small1/combineinline1_1.c | 14 +
cil/test/small1/combineinline1_2.c | 8 +
cil/test/small1/combineinline2_1.c | 13 +
cil/test/small1/combineinline2_2.c | 5 +
cil/test/small1/combineinline3_1.c | 14 +
cil/test/small1/combineinline3_2.c | 9 +
cil/test/small1/combineinline4_1.c | 18 +
cil/test/small1/combineinline4_2.c | 11 +
cil/test/small1/combineinline6_1.c | 20 +
cil/test/small1/combineinline6_2.c | 1 +
cil/test/small1/combinelibrik_1.c | 40 +
cil/test/small1/combinelibrik_2.c | 23 +
cil/test/small1/combinestruct1_1.c | 14 +
cil/test/small1/combinestruct1_2.c | 20 +
cil/test/small1/combinetaggedfn_1.c | 10 +
cil/test/small1/combinetaggedfn_2.c | 22 +
cil/test/small1/comma1.c | 12 +
cil/test/small1/comparisons.c | 50 +
cil/test/small1/cond1.c | 33 +
cil/test/small1/cond2.c | 30 +
cil/test/small1/const-array-init.c | 20 +
cil/test/small1/const-compound-cast.c | 14 +
cil/test/small1/const-struct-init.c | 15 +
cil/test/small1/const1.c | 27 +
cil/test/small1/const10.c | 7 +
cil/test/small1/const11.c | 53 +
cil/test/small1/const2.c | 14 +
cil/test/small1/const3.c | 9 +
cil/test/small1/const4.c | 26 +
cil/test/small1/const5.c | 14 +
cil/test/small1/const6.c | 15 +
cil/test/small1/const7.c | 2 +
cil/test/small1/const8.c | 15 +
cil/test/small1/const9.c | 23 +
cil/test/small1/constprop.c | 13 +
cil/test/small1/cpp-2.c | 6 +
cil/test/small1/cpp-3.c | 11 +
cil/test/small1/decl1.c | 20 +
cil/test/small1/decl2.c | 50 +
cil/test/small1/decl_mix_stmt.c | 15 +
cil/test/small1/deref.c | 105 +
cil/test/small1/duplicate.c | 29 +
cil/test/small1/empty.i | 5 +
cil/test/small1/enum.c | 14 +
cil/test/small1/enum2.c | 33 +
cil/test/small1/escapes.c | 36 +
cil/test/small1/extern1.c | 6 +
cil/test/small1/extern_init.c | 38 +
cil/test/small1/float.c | 12 +
cil/test/small1/float2.c | 8 +
cil/test/small1/for1.c | 11 +
cil/test/small1/formalscope.c | 23 +
cil/test/small1/func.c | 24 +
cil/test/small1/func10.c | 24 +
cil/test/small1/func2.c | 30 +
cil/test/small1/func3.c | 19 +
cil/test/small1/func4.c | 24 +
cil/test/small1/funcarg.c | 14 +
cil/test/small1/funptr1.c | 23 +
cil/test/small1/globals.c | 11 +
cil/test/small1/globals2.c | 8 +
cil/test/small1/hello.c | 8 +
cil/test/small1/huff1.c | 14 +
cil/test/small1/init.c | 179 +
cil/test/small1/init1.c | 17 +
cil/test/small1/init10.c | 18 +
cil/test/small1/init11.c | 29 +
cil/test/small1/init12.c | 22 +
cil/test/small1/init13.c | 39 +
cil/test/small1/init14.c | 12 +
cil/test/small1/init15.c | 26 +
cil/test/small1/init16.c | 12 +
cil/test/small1/init17.c | 22 +
cil/test/small1/init18.c | 24 +
cil/test/small1/init19.c | 20 +
cil/test/small1/init2.c | 13 +
cil/test/small1/init20.c | 49 +
cil/test/small1/init21.c | 227 +
cil/test/small1/init22.c | 28 +
cil/test/small1/init3.c | 51 +
cil/test/small1/init4.c | 37 +
cil/test/small1/init5.c | 33 +
cil/test/small1/init6.c | 87 +
cil/test/small1/init7.c | 34 +
cil/test/small1/init8.c | 9 +
cil/test/small1/init9.c | 34 +
cil/test/small1/initial.c | 37 +
cil/test/small1/inline1.c | 43 +
cil/test/small1/inline2.c | 11 +
cil/test/small1/inline3.c | 12 +
cil/test/small1/jmp_buf.c | 41 +
cil/test/small1/knr1.c | 36 +
cil/test/small1/label1.c | 30 +
cil/test/small1/label2.c | 29 +
cil/test/small1/label3.c | 13 +
cil/test/small1/label4.c | 41 +
cil/test/small1/label5.c | 9 +
cil/test/small1/li.c | 13 +
cil/test/small1/lineno.i | 6 +
cil/test/small1/linux_atomic.c | 12 +
cil/test/small1/linux_signal.c | 28 +
cil/test/small1/linuxcombine1_1.c | 3513 +++++++
cil/test/small1/list.c | 101 +
cil/test/small1/local.c | 20 +
cil/test/small1/local.h | 319 +
cil/test/small1/localinit.c | 10 +
cil/test/small1/logical.c | 14 +
cil/test/small1/longBlock.ml | 17 +
cil/test/small1/lstring.c | 28 +
cil/test/small1/lval1.c | 54 +
cil/test/small1/math1.c | 14 +
cil/test/small1/matrix.c | 25 +
cil/test/small1/memcpy1.c | 64 +
cil/test/small1/min.c | 17 +
cil/test/small1/msvc1.c | 17 +
cil/test/small1/msvc2.c | 15 +
cil/test/small1/msvc3.c | 35 +
cil/test/small1/msvc4.c | 51 +
cil/test/small1/msvc5.c | 128 +
cil/test/small1/msvc6.c | 8 +
cil/test/small1/msvc7.c | 24 +
cil/test/small1/msvc8.c | 13 +
cil/test/small1/msvc9.c | 39 +
cil/test/small1/noproto.c | 15 +
cil/test/small1/noproto1.c | 14 +
cil/test/small1/noproto2.c | 14 +
cil/test/small1/noreturn.c | 18 +
cil/test/small1/offsetof.c | 21 +
cil/test/small1/offsetof1.c | 18 +
cil/test/small1/offsetof2.c | 29 +
cil/test/small1/offsetof3.c | 34 +
cil/test/small1/oom.c | 36 +
cil/test/small1/order.c | 25 +
cil/test/small1/outofmem.c | 18 +
cil/test/small1/p04.c | 19 +
cil/test/small1/packed.c | 42 +
cil/test/small1/packed2.c | 77 +
cil/test/small1/paper1.c | 18 +
cil/test/small1/paper2.c | 14 +
cil/test/small1/percent400.c | 7 +
cil/test/small1/percentm.c | 7 +
cil/test/small1/perror.c | 18 +
cil/test/small1/perror1.c | 26 +
cil/test/small1/pointers2.c | 16 +
cil/test/small1/post-assign.c | 33 +
cil/test/small1/power1.c | 95 +
cil/test/small1/printf.c | 24 +
cil/test/small1/printf2.c | 17 +
cil/test/small1/printf_const.c | 20 +
cil/test/small1/proto1.c | 14 +
cil/test/small1/proto2.c | 13 +
cil/test/small1/pure.c | 8 +
cil/test/small1/question.c | 8 +
cil/test/small1/question2.c | 50 +
cil/test/small1/restrict.c | 14 +
cil/test/small1/restrict1.c | 6 +
cil/test/small1/return1.c | 9 +
cil/test/small1/returnvoid.c | 16 +
cil/test/small1/returnvoid1.c | 36 +
cil/test/small1/retval.c | 9 +
cil/test/small1/rmtmps-attr.c | 14 +
cil/test/small1/rmtmps1.c | 17 +
cil/test/small1/rmtmps2.c | 48 +
cil/test/small1/scope1.c | 44 +
cil/test/small1/scope10.c | 14 +
cil/test/small1/scope11.c | 13 +
cil/test/small1/scope2.c | 35 +
cil/test/small1/scope3.c | 19 +
cil/test/small1/scope4.c | 22 +
cil/test/small1/scope5.c | 29 +
cil/test/small1/scope6.c | 22 +
cil/test/small1/scope7.c | 18 +
cil/test/small1/scope8.c | 24 +
cil/test/small1/scope9.c | 18 +
cil/test/small1/semicolon.c | 11 +
cil/test/small1/signs.c | 92 +
cil/test/small1/simon6.c | 27 +
cil/test/small1/simplify_structs1.c | 41 +
cil/test/small1/simplify_structs2.c | 52 +
cil/test/small1/sizeof1.c | 20 +
cil/test/small1/sizeof2.c | 9 +
cil/test/small1/ssa-test.c | 36 +
cil/test/small1/ssa-test2.c | 15 +
cil/test/small1/ssa2.c | 24 +
cil/test/small1/ssa3.c | 13 +
cil/test/small1/ssa4.c | 16 +
cil/test/small1/ssa5.c | 15 +
cil/test/small1/stack.c | 43 +
cil/test/small1/static.c | 40 +
cil/test/small1/static1.c | 11 +
cil/test/small1/static2.c | 35 +
cil/test/small1/strcpy.c | 23 +
cil/test/small1/string1.c | 29 +
cil/test/small1/string2.c | 14 +
cil/test/small1/stringsize.c | 31 +
cil/test/small1/strloop.c | 30 +
cil/test/small1/strloop3.c | 51 +
cil/test/small1/struct1.c | 20 +
cil/test/small1/struct2.c | 335 +
cil/test/small1/struct_init.c | 30 +
cil/test/small1/structassign.c | 17 +
cil/test/small1/tags.c | 37 +
cil/test/small1/task.c | 33 +
cil/test/small1/tempname.c | 9 +
cil/test/small1/testharness.h | 17 +
cil/test/small1/typeof1.c | 86 +
cil/test/small1/typespec1.c | 55 +
cil/test/small1/unimplemented.c | 30 +
cil/test/small1/union1.c | 16 +
cil/test/small1/union2.c | 40 +
cil/test/small1/union3.c | 59 +
cil/test/small1/union5.c | 37 +
cil/test/small1/unsafe1.c | 31 +
cil/test/small1/va-arg-1.c | 29 +
cil/test/small1/va-arg-2.c | 313 +
cil/test/small1/va-arg-7.c | 53 +
cil/test/small1/var.c | 15 +
cil/test/small1/vararg1.c | 47 +
cil/test/small1/vararg10.c | 50 +
cil/test/small1/vararg11.c | 31 +
cil/test/small1/vararg2.c | 49 +
cil/test/small1/vararg3.c | 162 +
cil/test/small1/vararg4.c | 61 +
cil/test/small1/vararg5.c | 48 +
cil/test/small1/vararg5.h | 0
cil/test/small1/vararg6.c | 49 +
cil/test/small1/vararg7.c | 68 +
cil/test/small1/varargauto1.c | 63 +
cil/test/small1/varied.c | 78 +
cil/test/small1/version.c | 24 +
cil/test/small1/void.c | 27 +
cil/test/small1/voidarg.c | 12 +
cil/test/small1/voidstar.c | 30 +
cil/test/small1/voidtypedef.c | 14 +
cil/test/small1/vsp.c | 38 +
cil/test/small1/warnings-cast.c | 13 +
cil/test/small1/warnings-noreturn.c | 22 +
cil/test/small1/warnings-unused-label.c | 27 +
cil/test/small1/wchar-bad.c | 40 +
cil/test/small1/wchar1.c | 24 +
cil/test/small1/wchar1_freebsd.c | 250 +
cil/test/small1/wchar2.c | 11 +
cil/test/small1/wchar3.c | 31 +
cil/test/small1/wchar4.c | 69 +
cil/test/small1/wchar5.c | 22 +
cil/test/small1/wchar6.c | 35 +
cil/test/small1/wchar7.c | 20 +
cil/test/small1/wrongnumargs.c | 13 +
cil/test/small1/zerotags.c | 25 +
cil/test/small2/.cvsignore | 182 +
cil/test/small2/Makefile | 24 +
cil/test/small2/align.c | 14 +
cil/test/small2/alpha.c | 28 +
cil/test/small2/arrayinit.c | 17 +
cil/test/small2/arrsize.c | 38 +
cil/test/small2/asmfndecl.c | 13 +
cil/test/small2/attrib.c | 8 +
cil/test/small2/badasm.c | 15 +
cil/test/small2/baddef1.c | 8 +
cil/test/small2/baddef2.c | 30 +
cil/test/small2/bisonerror.c | 16 +
cil/test/small2/bogus_redef.c | 21 +
cil/test/small2/brlock.c | 20 +
cil/test/small2/bzero.c | 12 +
cil/test/small2/checkinit.c | 70 +
cil/test/small2/checkret.c | 61 +
cil/test/small2/checkstore.c | 155 +
cil/test/small2/checkstore2.c | 17 +
cil/test/small2/checkstore3.c | 24 +
cil/test/small2/checksymbol.c | 102 +
cil/test/small2/cilreturn.c | 40 +
cil/test/small2/cmpzero.c | 29 +
cil/test/small2/cof.c | 8681 +++++++++++++++++
cil/test/small2/comb1.c | 23 +
cil/test/small2/comb2.c | 26 +
cil/test/small2/comb3.c | 11 +
cil/test/small2/comb4.c | 11 +
cil/test/small2/conset.c | 65 +
cil/test/small2/constdecl.c | 23 +
cil/test/small2/constfold.c | 22 +
cil/test/small2/constfold2.c | 23 +
cil/test/small2/ctype.c | 22 +
cil/test/small2/debug_table.c | 24 +
cil/test/small2/ehstack.c | 43 +
cil/test/small2/enumattr.c | 13 +
cil/test/small2/enumerator_sizeof.c | 31 +
cil/test/small2/enuminit.c | 27 +
cil/test/small2/enuminit2.c | 18 +
cil/test/small2/errorinfn.c | 5 +
cil/test/small2/extinline.c | 36 +
cil/test/small2/fig1.c | 40 +
cil/test/small2/fmtstr.c | 11 +
cil/test/small2/fseq1fail.c | 59 +
cil/test/small2/funcname.c | 18 +
cil/test/small2/funcptr.c | 66 +
cil/test/small2/funcptr2.c | 67 +
cil/test/small2/funptr1.c | 18 +
cil/test/small2/gimpdouble.c | 19 +
cil/test/small2/globalprob.c | 12 +
cil/test/small2/globinit.c | 97 +
cil/test/small2/globtable.c | 14 +
cil/test/small2/handler1.handlers | 7 +
cil/test/small2/hashtest.c | 74 +
cil/test/small2/hola.c | 76 +
cil/test/small2/hufftable.c | 116 +
cil/test/small2/hufftest.c | 136 +
cil/test/small2/index1.c | 56 +
cil/test/small2/initedextern.c | 11 +
cil/test/small2/invalredef.c | 12 +
cil/test/small2/invalredef2.c | 16 +
cil/test/small2/jpeg_compress_struct.c | 37 +
cil/test/small2/kernel1.c | 10 +
cil/test/small2/kernel2.c | 16 +
cil/test/small2/lexnum.c | 37 +
cil/test/small2/litstruct.c | 24 +
cil/test/small2/main.c | 15 +
cil/test/small2/malloc1.c | 38 +
cil/test/small2/memberofptr.c | 33 +
cil/test/small2/memset_sizeof.c | 16 +
cil/test/small2/merge-ar.c | 26 +
cil/test/small2/merge-twice-1.c | 6 +
cil/test/small2/merge-twice-2.c | 6 +
cil/test/small2/merge-twice-3.c | 6 +
cil/test/small2/mergeinline1.c | 24 +
cil/test/small2/mergeinline2.c | 20 +
cil/test/small2/mergestruct1.c | 26 +
cil/test/small2/mergestruct2.c | 26 +
cil/test/small2/metabug3.c | 24 +
cil/test/small2/mode_sizes.c | 43 +
cil/test/small2/multiplestatics.c | 20 +
cil/test/small2/neg64.c | 18 +
cil/test/small2/nested.c | 30 +
cil/test/small2/nonwilderror.c | 13 +
cil/test/small2/oldstyle.c | 14 +
cil/test/small2/open.c | 52 +
cil/test/small2/override.c | 40 +
cil/test/small2/partialbracket.c | 20 +
cil/test/small2/pset.c | 8 +
cil/test/small2/ptrinint.c | 22 +
cil/test/small2/putc.c | 31 +
cil/test/small2/rbtest.c | 126 +
cil/test/small2/regbeforeassign.c | 17 +
cil/test/small2/regparm0.c | 25 +
cil/test/small2/regthenprintf.c | 32 +
cil/test/small2/runall_misc.c | 9 +
cil/test/small2/rusage.c | 13 +
cil/test/small2/s59.c | 25 +
cil/test/small2/scary.c | 96 +
cil/test/small2/segfault.c | 30 +
cil/test/small2/seq_align_malloc.c | 45 +
cil/test/small2/seq_align_malloc2.c | 54 +
cil/test/small2/seqalign.c | 54 +
cil/test/small2/sizeof3.c | 22 +
cil/test/small2/sizeofchar.c | 32 +
cil/test/small2/sockaddr.c | 97 +
cil/test/small2/stackptr.c | 25 +
cil/test/small2/stackptrptr.c | 27 +
cil/test/small2/struct_cs.c | 33 +
cil/test/small2/structattr.c | 55 +
cil/test/small2/structattr2.c | 62 +
cil/test/small2/structattr3.c | 10 +
cil/test/small2/switch.c | 64 +
cil/test/small2/tagfile.txt | 11 +
cil/test/small2/tagfile1.c | 21 +
cil/test/small2/tagfile2.c | 29 +
cil/test/small2/testbtree.c | 60 +
cil/test/small2/thing.c | 15 +
cil/test/small2/transpunion.c | 37 +
cil/test/small2/trivial-tb.c | 25 +
cil/test/small2/try1.c | 64 +
cil/test/small2/twoprintfs.c | 15 +
cil/test/small2/typeof.c | 21 +
cil/test/small2/undef_func.c | 8 +
cil/test/small2/uninit_tmp.c | 39 +
cil/test/small2/union2.c | 98 +
cil/test/small2/union4.c | 91 +
cil/test/small2/union5.c | 35 +
cil/test/small2/union6.c | 54 +
cil/test/small2/union7.c | 133 +
cil/test/small2/union8.c | 98 +
cil/test/small2/unionassign.c | 88 +
cil/test/small2/unionext.c | 21 +
cil/test/small2/unscomp.c | 28 +
cil/test/small2/visit_col.c | 131 +
cil/test/small2/voidstarint.c | 121 +
cil/test/small2/volatilestruct.c | 23 +
cil/test/small2/wes-hashtest.c | 534 +
cil/test/small2/wes-rbtest.c | 491 +
cil/test/small2/writev.c | 113 +
cil/test/small2/xcheckers.c | 28 +
cil/test/testcil | 3 +
cil/test/testcil.bat | 1 +
cil/test/testcil.h | 84 +
cil/test/testcil.pl | 819 ++
config.guess | 1500 +++
config.sub | 1608 +++
configure | 4134 ++++++++
configure.ac | 187 +
debian/changelog | 6 +
debian/compat | 1 +
debian/control | 15 +
debian/copyright | 47 +
debian/dirs | 1 +
debian/docs | 0
debian/files | 1 +
debian/rules | 107 +
debian/watch | 22 +
doc/.cvsignore | 22 +
doc/TODO | 14 +
doc/comment.sty | 278 +
doc/deputy.1 | 50 +
doc/deputy.tex | 3877 ++++++++
doc/deputycode.pl | 127 +
doc/fullpage.sty | 29 +
doc/header.html.in | 16 +
doc/hevea.sty | 86 +
doc/html/.cvsignore | 1 +
doc/index.html.in | 24 +
doc/www/bnd-be-nt.png | Bin 0 -> 693 bytes
doc/www/bnd-be.png | Bin 0 -> 604 bytes
doc/www/count-5.png | Bin 0 -> 461 bytes
doc/www/count-nm.png | Bin 0 -> 948 bytes
doc/www/deputy.css | 55 +
doc/www/index.html | 112 +
doc/www/manual.html | 815 ++
doc/www/quickref.html | 322 +
include/.cvsignore | 1 +
include/ccuredport.h | 26 +
include/deputy/annots.h | 73 +
include/deputy/checks.h | 291 +
include/deputy/itaint.patch.h | 10 +
include/deputy/lwcalls.h | 81 +
include/deputy/sml_instrumenter.h | 516 +
include/libc_patch.h | 563 ++
install-sh | 251 +
lib/Deputy.pm | 276 +
lib/deputy_libc.c | 149 +
lib/deputy_linux.c | 88 +
lib/instr_glob_state.c | 155 +
lib/lwcalls.sml | 1261 +++
obj/.depend/.cvsignore | 1 +
obj/x86_LINUX/.cvsignore | 1 +
obj/x86_WIN32/.cvsignore | 1 +
rpm/deputy.spec | 43 +
src/dattrs.ml | 1169 +++
src/dattrs.mli | 144 +
src/dcheck.ml | 1603 +++
src/dcheck.mli | 45 +
src/dcheckdef.ml | 429 +
src/dcheckdef.mli | 66 +
src/dglobinit.ml | 261 +
src/dglobinit.mli | 41 +
src/dinfer.ml | 1720 ++++
src/dinfer.mli | 42 +
src/dlocals.ml | 383 +
src/dlocals.mli | 41 +
src/doptions.ml | 228 +
src/doptions.mli | 69 +
src/dpatch.ml | 300 +
src/dpatch.mli | 41 +
src/dpoly.ml | 167 +
src/dpoly.mli | 46 +
src/dsolverfront.ml | 192 +
src/dutil.ml | 634 ++
src/dutil.mli | 87 +
src/dvararg.ml | 172 +
src/dvararg.mli | 41 +
src/infer/controlflow.ml | 1139 +++
src/infer/inferkinds.ml | 230 +
src/infer/inferkinds.mli | 3 +
src/infer/markptr.ml | 947 ++
src/infer/markptr.mli | 41 +
src/infer/ptrnode.ml | 1935 ++++
src/infer/ptrnode.mli | 472 +
src/infer/solver.ml | 911 ++
src/infer/solver.mli | 38 +
src/infer/type.ml | 845 ++
src/infer/type.mli | 110 +
src/infer/unionfind.ml | 172 +
src/instrumenter/dinstrumenter.ml | 751 ++
src/instrumenter/dtaint.ml | 531 +
src/main.ml | 321 +
src/optimizer/dcanonexp.ml | 422 +
src/optimizer/dcheckhoister.ml | 400 +
src/optimizer/dcheckstrengthen.ml | 171 +
src/optimizer/ddupcelim.ml | 337 +
src/optimizer/dfailfinder.ml | 146 +
src/optimizer/dfdatbrowser.ml | 254 +
src/optimizer/dflowinsens.ml | 384 +
src/optimizer/dflowsens.ml | 1801 ++++
src/optimizer/dfwdsubst.ml | 403 +
src/optimizer/dloopoptim.ml | 482 +
src/optimizer/dnonnullfinder.ml | 147 +
src/optimizer/doptimmain.ml | 358 +
src/optimizer/doptimutil.ml | 300 +
src/optimizer/dprecfinder.ml | 880 ++
src/optimizer/modref/saturnModRef/dmodref.ml | 342 +
src/optimizer/modref/zraModRef/dmodref.ml | 415 +
.../nullSolver/nullSolverInterface.ml | 11 +
src/optimizer/oct/mineOct/doctanalysis.ml | 1215 +++
src/optimizer/oct/mineOct/oct.h | 575 ++
src/optimizer/oct/mineOct/oct.ml | 376 +
src/optimizer/oct/mineOct/oct.mli | 176 +
src/optimizer/oct/mineOct/oct_config.h | 16 +
src/optimizer/oct/mineOct/oct_config_2.h | 35 +
src/optimizer/oct/mineOct/oct_num.h | 1636 ++++
src/optimizer/oct/mineOct/oct_ocaml.c | 1693 ++++
src/optimizer/oct/mineOct/oct_ocaml.h | 56 +
src/optimizer/oct/mineOct/oct_private.h | 187 +
src/optimizer/oct/mineOct/oct_sem.c | 4009 ++++++++
src/optimizer/oct/mineOct/oct_util.c | 383 +
src/optimizer/oct/nullOct/doctanalysis.ml | 32 +
src/optimizer/ptranal/cilPtrAnal/dptranal.ml | 198 +
.../ptranal/saturnPtrAnal/dptranal.ml | 0
src/optimizer/solver/cvclSolver/Makefile | 69 +
src/optimizer/solver/cvclSolver/cvcl.ml | 258 +
.../solver/cvclSolver/cvcl_ocaml_wrappers.c | 1505 +++
.../solver/cvclSolver/cvcl_solver_test.ml | 22 +
.../solver/cvclSolver/solverInterface.ml | 308 +
.../solver/nullSolver/solverInterface.ml | 17 +
src/optimizer/solver/yicesSolver/Makefile | 69 +
.../solver/yicesSolver/solverInterface.ml | 182 +
src/optimizer/solver/yicesSolver/yices.ml | 195 +
.../solver/yicesSolver/yices_ocaml_wrappers.c | 1015 ++
.../solver/yicesSolver/yices_solver_test.ml | 63 +
src/optimizer/xhtml/xHTML.ml | 1629 ++++
src/optimizer/xhtml/xHTML.mli | 969 ++
src/optimizer/xhtml/xML.ml | 411 +
src/optimizer/xhtml/xML.mli | 126 +
test/.cvsignore | 2 +
test/Makefile.in | 62 +
test/libc/.cvsignore | 7 +
test/libc/Makefile | 22 +
test/libc/crypt1.c | 28 +
test/libc/ctype1.c | 26 +
test/libc/fwrite1.c | 14 +
test/libc/getaddrinfo1.c | 170 +
test/libc/getpwnam1.c | 85 +
test/libc/glob1.c | 90 +
test/libc/harness.h | 13 +
test/libc/hostent1.c | 49 +
test/libc/hostent2.c | 99 +
test/libc/malloc1.c | 21 +
test/libc/malloc2.c | 15 +
test/libc/memset1.c | 10 +
test/libc/popen1.c | 239 +
test/libc/printf1.c | 28 +
test/libc/printf2.c | 6 +
test/libc/readv1.c | 95 +
test/libc/servent1.c | 41 +
test/libc/servent2.c | 45 +
test/libc/sockaddr1.c | 113 +
test/libc/socket1.c | 123 +
test/libc/stat1.c | 25 +
test/libc/strchr1.c | 22 +
test/libc/strcpy.c | 26 +
test/libc/strerror1.c | 10 +
test/libc/string1.c | 16 +
test/libc/string2.c | 28 +
test/libc/string3.c | 25 +
test/libc/string4.c | 33 +
test/libc/string5.c | 264 +
test/libc/string6.c | 332 +
test/libc/string7.c | 390 +
test/libc/strlcpy.c | 29 +
test/libc/strncpy1.c | 19 +
test/libc/strpbrk1.c | 14 +
test/libc/strspn.c | 16 +
test/libc/strtok1.c | 92 +
test/libc/vararg1.c | 29 +
test/libc/writev1.c | 113 +
test/small/.cvsignore | 7 +
test/small/Makefile | 25 +
test/small/abstract1.c | 28 +
test/small/addrof1.c | 7 +
test/small/addrof2.c | 11 +
test/small/addrof3.c | 14 +
test/small/addrof4.c | 14 +
test/small/addrof5.c | 11 +
test/small/addrof6.c | 6 +
test/small/addrof7.c | 10 +
test/small/align1.c | 24 +
test/small/align2.c | 42 +
test/small/alloc1.c | 18 +
test/small/alloc10.c | 90 +
test/small/alloc11.c | 9 +
test/small/alloc12.c | 13 +
test/small/alloc2.c | 20 +
test/small/alloc3.c | 30 +
test/small/alloc4.c | 16 +
test/small/alloc5.c | 27 +
test/small/alloc6.c | 22 +
test/small/alloc7.c | 21 +
test/small/alloc8.c | 26 +
test/small/alloc9.c | 29 +
test/small/array1.c | 64 +
test/small/array2.c | 12 +
test/small/array3.c | 15 +
test/small/array4.c | 29 +
test/small/array5.c | 14 +
test/small/array6.c | 19 +
test/small/array7.c | 11 +
test/small/auto1.c | 68 +
test/small/auto2.c | 58 +
test/small/auto3.c | 66 +
test/small/auto4.c | 12 +
test/small/auto5.c | 22 +
test/small/auto6.c | 45 +
test/small/auto7.c | 15 +
test/small/auto8.c | 5 +
test/small/auto9.c | 24 +
test/small/bound1.c | 29 +
test/small/builtin1.c | 4 +
test/small/call1.c | 10 +
test/small/call2.c | 13 +
test/small/call3.c | 14 +
test/small/call4.c | 14 +
test/small/call5.c | 11 +
test/small/call6.c | 29 +
test/small/call7.c | 15 +
test/small/call8.c | 10 +
test/small/cast1.c | 8 +
test/small/cast10.c | 19 +
test/small/cast11.c | 12 +
test/small/cast12.c | 9 +
test/small/cast13.c | 12 +
test/small/cast14.c | 9 +
test/small/cast15.c | 21 +
test/small/cast16.c | 20 +
test/small/cast17.c | 8 +
test/small/cast18.c | 38 +
test/small/cast19.c | 14 +
test/small/cast2.c | 7 +
test/small/cast20.c | 17 +
test/small/cast3.c | 8 +
test/small/cast4.c | 17 +
test/small/cast5.c | 6 +
test/small/cast6.c | 26 +
test/small/cast7.c | 17 +
test/small/cast8.c | 18 +
test/small/cast9.c | 21 +
test/small/deref1.c | 9 +
test/small/deref2.c | 10 +
test/small/deref3.c | 21 +
test/small/enum1.c | 10 +
test/small/extern1.c | 12 +
test/small/extern2.c | 13 +
test/small/extern3.c | 5 +
test/small/extinline1.c | 15 +
test/small/field1.c | 17 +
test/small/field2.c | 18 +
test/small/field3.c | 18 +
test/small/field4.c | 57 +
test/small/field5.c | 18 +
test/small/func1.c | 14 +
test/small/func2.c | 51 +
test/small/func3.c | 50 +
test/small/func4.c | 18 +
test/small/func5.c | 38 +
test/small/func6.c | 12 +
test/small/func7.c | 54 +
test/small/func8.c | 14 +
test/small/func9.c | 15 +
test/small/global1.c | 11 +
test/small/global2.c | 14 +
test/small/global3.c | 17 +
test/small/global4.c | 19 +
test/small/global5.c | 15 +
test/small/global6.c | 16 +
test/small/global7.c | 39 +
test/small/global8.c | 6 +
test/small/global9.c | 14 +
test/small/harness.h | 20 +
test/small/incr1.c | 23 +
test/small/infer1.c | 14 +
test/small/infer10.c | 15 +
test/small/infer11.c | 6 +
test/small/infer12.c | 8 +
test/small/infer13.c | 16 +
test/small/infer14.c | 19 +
test/small/infer15.c | 19 +
test/small/infer16.c | 13 +
test/small/infer17.c | 10 +
test/small/infer18.c | 9 +
test/small/infer19.c | 19 +
test/small/infer2.c | 12 +
test/small/infer3.c | 5 +
test/small/infer4.c | 29 +
test/small/infer5.c | 12 +
test/small/infer6.c | 12 +
test/small/infer7.c | 20 +
test/small/infer8.c | 17 +
test/small/infer9.c | 13 +
test/small/init1.c | 39 +
test/small/init2.c | 17 +
test/small/live1.c | 47 +
test/small/live2.c | 30 +
test/small/live3.c | 16 +
test/small/local1.c | 26 +
test/small/memcmp1.c | 60 +
test/small/memcmp2.c | 36 +
test/small/memcpy1.c | 60 +
test/small/memcpy2.c | 17 +
test/small/memset1.c | 47 +
test/small/memset2.c | 29 +
test/small/nonnull1.c | 32 +
test/small/nonnull2.c | 21 +
test/small/nonnull3.c | 24 +
test/small/nonnull4.c | 19 +
test/small/nullterm1.c | 32 +
test/small/nullterm10.c | 5 +
test/small/nullterm11.c | 22 +
test/small/nullterm2.c | 31 +
test/small/nullterm3.c | 12 +
test/small/nullterm4.c | 17 +
test/small/nullterm5.c | 5 +
test/small/nullterm6.c | 66 +
test/small/nullterm7.c | 19 +
test/small/nullterm8.c | 33 +
test/small/nullterm9.c | 21 +
test/small/offset1.c | 28 +
test/small/offset2.c | 29 +
test/small/offset3.c | 16 +
test/small/openarray1.c | 27 +
test/small/openarray2.c | 31 +
test/small/openarray3.c | 21 +
test/small/openarray4.c | 16 +
test/small/opt1.c | 7 +
test/small/opt10.c | 14 +
test/small/opt11.c | 14 +
test/small/opt12.c | 16 +
test/small/opt13.c | 15 +
test/small/opt14.c | 6 +
test/small/opt15.c | 18 +
test/small/opt16.c | 19 +
test/small/opt2.c | 18 +
test/small/opt3.c | 21 +
test/small/opt4.c | 34 +
test/small/opt5.c | 40 +
test/small/opt6.c | 13 +
test/small/opt7.c | 30 +
test/small/opt8.c | 39 +
test/small/opt9.c | 5 +
test/small/overflow1.c | 46 +
test/small/overflow2.c | 24 +
test/small/packed1.c | 12 +
test/small/poly1.c | 9 +
test/small/poly2.c | 10 +
test/small/poly3.c | 13 +
test/small/poly4.c | 48 +
test/small/poly5.c | 19 +
test/small/poly6.c | 21 +
test/small/poly7.c | 16 +
test/small/ptrarith1.c | 8 +
test/small/ptrarith2.c | 22 +
test/small/retbound1.c | 16 +
test/small/return1.c | 24 +
test/small/sentinel1.c | 37 +
test/small/sentinel2.c | 10 +
test/small/size1.c | 18 +
test/small/size2.c | 30 +
test/small/size3.c | 25 +
test/small/size4.c | 18 +
test/small/sizeof1.c | 5 +
test/small/sizeof2.c | 20 +
test/small/sizeof3.c | 6 +
test/small/startof1.c | 6 +
test/small/startof2.c | 8 +
test/small/string1.c | 46 +
test/small/string10.c | 11 +
test/small/string12.c | 20 +
test/small/string13.c | 20 +
test/small/string14.c | 12 +
test/small/string15.c | 5 +
test/small/string16.c | 23 +
test/small/string18.c | 66 +
test/small/string19.c | 29 +
test/small/string2.c | 11 +
test/small/string20.c | 351 +
test/small/string21.c | 10 +
test/small/string3.c | 18 +
test/small/string4.c | 20 +
test/small/string5.c | 24 +
test/small/string6.c | 14 +
test/small/string7.c | 12 +
test/small/string8.c | 21 +
test/small/string9.c | 22 +
test/small/struct1.c | 18 +
test/small/testlib.c | 32 +
test/small/trusted1.c | 10 +
test/small/trusted10.c | 80 +
test/small/trusted11.c | 14 +
test/small/trusted12.c | 24 +
test/small/trusted13.c | 8 +
test/small/trusted2.c | 18 +
test/small/trusted3.c | 7 +
test/small/trusted4.c | 24 +
test/small/trusted5.c | 15 +
test/small/trusted6.c | 5 +
test/small/trusted7.c | 22 +
test/small/trusted8.c | 13 +
test/small/trusted9.c | 13 +
test/small/typedef1.c | 34 +
test/small/typedef2.c | 23 +
test/small/typeof1.c | 17 +
test/small/types1.c | 9 +
test/small/types2.c | 10 +
test/small/types3.c | 8 +
test/small/types4.c | 11 +
test/small/types5.c | 7 +
test/small/types6.c | 12 +
test/small/types7.c | 9 +
test/small/types8.c | 28 +
test/small/types9.c | 15 +
test/small/union1.c | 77 +
test/small/union2.c | 45 +
test/small/union3.c | 120 +
test/small/union4.c | 58 +
test/small/union5.c | 117 +
test/small/union6.c | 18 +
test/small/upcast1.c | 29 +
test/small/upcast2.c | 20 +
test/small/var1.c | 11 +
test/small/var2.c | 13 +
test/small/var3.c | 13 +
test/small/var4.c | 24 +
test/small/var5.c | 10 +
test/small/vararg1.c | 18 +
test/small/voidstar1.c | 11 +
test/small/voidstar2.c | 20 +
test/small/voidstar4.c | 11 +
test/small/volatile1.c | 27 +
test/testdeputy | 3 +
test/testdeputy.pl | 494 +
web/.htaccess | 1 +
web/index.html | 61 +
web/web-driver.cgi | 309 +
1203 files changed, 188955 insertions(+)
create mode 100755 .cvsignore
create mode 100644 .distexclude
create mode 100644 LICENSE
create mode 100644 Makefile.in
create mode 100755 bin/.cvsignore
create mode 100755 bin/deputy
create mode 100644 cil/.cvsignore
create mode 100755 cil/Bootstrap
create mode 100644 cil/INSTALL
create mode 100644 cil/LICENSE
create mode 100644 cil/Makefile.gcc
create mode 100644 cil/Makefile.in
create mode 100644 cil/Makefile.msvc
create mode 100644 cil/NOTES
create mode 100644 cil/README
create mode 100644 cil/_tags
create mode 100644 cil/aclocal.m4
create mode 100644 cil/bin/.cvsignore
create mode 100644 cil/bin/CilConfig.pm.in
create mode 100755 cil/bin/cabsxform
create mode 100755 cil/bin/cilly
create mode 100755 cil/bin/cilly.bat.in
create mode 100755 cil/bin/patcher
create mode 100755 cil/bin/patcher.bat.in
create mode 100755 cil/bin/teetwo
create mode 100755 cil/bin/test-bad
create mode 100644 cil/cil.itarget
create mode 100644 cil/cil.spec.in
create mode 100755 cil/config.guess
create mode 100644 cil/config.h.in
create mode 100644 cil/config.mk.in
create mode 100755 cil/config.sub
create mode 100755 cil/configure
create mode 100644 cil/configure.in
create mode 100644 cil/debian/.cvsignore
create mode 100644 cil/debian/changelog
create mode 100644 cil/debian/cil-dev.install
create mode 100644 cil/debian/cil.install
create mode 100644 cil/debian/compat
create mode 100644 cil/debian/control
create mode 100644 cil/debian/copyright
create mode 100755 cil/debian/rules
create mode 100644 cil/debian/watch
create mode 100644 cil/doc/.cvsignore
create mode 100644 cil/doc/cil.itarget
create mode 100644 cil/doc/cil.odocl
create mode 100644 cil/doc/cil.tex
create mode 100644 cil/doc/cilcode.pl
create mode 100644 cil/doc/comment.sty
create mode 100644 cil/doc/cvssetup.tex
create mode 100644 cil/doc/fullpage.sty
create mode 100644 cil/doc/header.html.in
create mode 100644 cil/doc/hevea.sty
create mode 100644 cil/doc/html/.cvsignore
create mode 100644 cil/doc/index.html.in
create mode 100644 cil/doc/main.html
create mode 100644 cil/doc/makefiles.txt
create mode 100644 cil/doc/ocamldoc.html
create mode 100644 cil/doc/ocamldoc.patch
create mode 100644 cil/doc/program.sty
create mode 100644 cil/doc/proof.sty
create mode 100644 cil/doc/sendmail.txt
create mode 100644 cil/doc/setup.tex
create mode 100644 cil/doc/tips-and-tricks.txt
create mode 100644 cil/install-sh
create mode 100644 cil/lib/.cvsignore
create mode 100644 cil/lib/.gdbinit
create mode 100644 cil/lib/Cilly.pm
create mode 100644 cil/lib/KeptFile.pm
create mode 100644 cil/lib/Makefile
create mode 100644 cil/lib/OutputFile.pm
create mode 100644 cil/lib/TempFile.pm
create mode 100644 cil/myocamlbuild.ml
create mode 100644 cil/obj/.depend/.cvsignore
create mode 100755 cil/ocamlutil/.cvsignore
create mode 100644 cil/ocamlutil/Makefile.ocaml
create mode 100644 cil/ocamlutil/Makefile.ocaml.build
create mode 100644 cil/ocamlutil/RegTest.pm
create mode 100644 cil/ocamlutil/_tags
create mode 100644 cil/ocamlutil/alpha.ml
create mode 100644 cil/ocamlutil/alpha.mli
create mode 100644 cil/ocamlutil/bitmap.ml
create mode 100644 cil/ocamlutil/bitmap.mli
create mode 100644 cil/ocamlutil/bitvector.ml
create mode 100644 cil/ocamlutil/bitvector.mli
create mode 100644 cil/ocamlutil/bitvector.out
create mode 100644 cil/ocamlutil/bitvectori.c
create mode 100644 cil/ocamlutil/clist.ml
create mode 100644 cil/ocamlutil/clist.mli
create mode 100644 cil/ocamlutil/errormsg.ml
create mode 100644 cil/ocamlutil/errormsg.mli
create mode 100644 cil/ocamlutil/growArray.ml
create mode 100644 cil/ocamlutil/growArray.mli
create mode 100644 cil/ocamlutil/inthash.ml
create mode 100644 cil/ocamlutil/inthash.mli
create mode 100644 cil/ocamlutil/intmap.ml
create mode 100644 cil/ocamlutil/intmap.mli
create mode 100644 cil/ocamlutil/longarray.ml
create mode 100644 cil/ocamlutil/longarray.mli
create mode 100644 cil/ocamlutil/options.ml
create mode 100644 cil/ocamlutil/options.mli
create mode 100644 cil/ocamlutil/pa_prtype.ml
create mode 100644 cil/ocamlutil/perfcount.c.in
create mode 100644 cil/ocamlutil/pretty.ml
create mode 100644 cil/ocamlutil/pretty.mli
create mode 100644 cil/ocamlutil/profile.c.in
create mode 100755 cil/ocamlutil/runall.pl
create mode 100644 cil/ocamlutil/stats.ml
create mode 100644 cil/ocamlutil/stats.mli
create mode 100755 cil/ocamlutil/symbolrange.pl
create mode 100644 cil/ocamlutil/trace.ml
create mode 100644 cil/ocamlutil/trace.mli
create mode 100644 cil/ocamlutil/util.ml
create mode 100644 cil/ocamlutil/util.mli
create mode 100644 cil/src/.cvsignore
create mode 100644 cil/src/_tags
create mode 100644 cil/src/check.ml
create mode 100644 cil/src/check.mli
create mode 100644 cil/src/cil.itarget
create mode 100644 cil/src/cil.ml
create mode 100644 cil/src/cil.mli
create mode 100644 cil/src/cil.mllib
create mode 100644 cil/src/cillower.ml
create mode 100644 cil/src/cillower.mli
create mode 100644 cil/src/ciloptions.ml
create mode 100644 cil/src/ciloptions.mli
create mode 100644 cil/src/cilutil.ml
create mode 100644 cil/src/cilversion.ml.in
create mode 100644 cil/src/escape.ml
create mode 100644 cil/src/escape.mli
create mode 100644 cil/src/ext/_tags
create mode 100644 cil/src/ext/arithabs.ml
create mode 100644 cil/src/ext/astslicer.ml
create mode 100644 cil/src/ext/availexps.ml
create mode 100644 cil/src/ext/availexpslv.ml
create mode 100644 cil/src/ext/blockinggraph.ml
create mode 100644 cil/src/ext/blockinggraph.mli
create mode 100644 cil/src/ext/callgraph.ml
create mode 100644 cil/src/ext/callgraph.mli
create mode 100644 cil/src/ext/canonicalize.ml
create mode 100644 cil/src/ext/canonicalize.mli
create mode 100644 cil/src/ext/ccl.ml
create mode 100644 cil/src/ext/ccl.mli
create mode 100644 cil/src/ext/cfg.ml
create mode 100644 cil/src/ext/cfg.mli
create mode 100644 cil/src/ext/ciltools.ml
create mode 100644 cil/src/ext/cqualann.ml
create mode 100644 cil/src/ext/dataflow.ml
create mode 100644 cil/src/ext/dataflow.mli
create mode 100644 cil/src/ext/dataslicing.ml
create mode 100644 cil/src/ext/dataslicing.mli
create mode 100644 cil/src/ext/deadcodeelim.ml
create mode 100644 cil/src/ext/dominators.ml
create mode 100644 cil/src/ext/dominators.mli
create mode 100644 cil/src/ext/epicenter.ml
create mode 100644 cil/src/ext/expcompare.ml
create mode 100644 cil/src/ext/heap.ml
create mode 100644 cil/src/ext/heapify.ml
create mode 100644 cil/src/ext/inliner.ml
create mode 100644 cil/src/ext/liveness.ml
create mode 100644 cil/src/ext/logcalls.ml
create mode 100644 cil/src/ext/logcalls.mli
create mode 100644 cil/src/ext/logwrites.ml
create mode 100644 cil/src/ext/oneret.ml
create mode 100644 cil/src/ext/oneret.mli
create mode 100644 cil/src/ext/optutil.ml
create mode 100644 cil/src/ext/optutil.mli
create mode 100644 cil/src/ext/partial.ml
create mode 100644 cil/src/ext/predabst.ml
create mode 100644 cil/src/ext/pta/golf.ml
create mode 100644 cil/src/ext/pta/golf.mli
create mode 100644 cil/src/ext/pta/olf.ml
create mode 100644 cil/src/ext/pta/olf.mli
create mode 100644 cil/src/ext/pta/ptranal.ml
create mode 100644 cil/src/ext/pta/ptranal.mli
create mode 100644 cil/src/ext/pta/setp.ml
create mode 100644 cil/src/ext/pta/setp.mli
create mode 100644 cil/src/ext/pta/steensgaard.ml
create mode 100644 cil/src/ext/pta/steensgaard.mli
create mode 100644 cil/src/ext/pta/uref.ml
create mode 100644 cil/src/ext/pta/uref.mli
create mode 100644 cil/src/ext/rand.ml
create mode 100644 cil/src/ext/reachingdefs.ml
create mode 100644 cil/src/ext/rmciltmps.ml
create mode 100644 cil/src/ext/sfi.ml
create mode 100644 cil/src/ext/simplemem.ml
create mode 100644 cil/src/ext/simplify.ml
create mode 100644 cil/src/ext/ssa.ml
create mode 100644 cil/src/ext/ssa.mli
create mode 100644 cil/src/ext/stackoverflow.ml
create mode 100644 cil/src/ext/stackoverflow.mli
create mode 100644 cil/src/ext/ufsarithabs.ml
create mode 100644 cil/src/ext/usedef.ml
create mode 100644 cil/src/formatcil.ml
create mode 100644 cil/src/formatcil.mli
create mode 100644 cil/src/formatlex.mll
create mode 100644 cil/src/formatparse.mly
create mode 100644 cil/src/frontc/.cvsignore
create mode 100644 cil/src/frontc/cabs.ml
create mode 100644 cil/src/frontc/cabs2cil.ml
create mode 100644 cil/src/frontc/cabs2cil.mli
create mode 100644 cil/src/frontc/cabshelper.ml
create mode 100644 cil/src/frontc/cabsvisit.ml
create mode 100644 cil/src/frontc/cabsvisit.mli
create mode 100644 cil/src/frontc/clexer.mli
create mode 100644 cil/src/frontc/clexer.mll
create mode 100644 cil/src/frontc/cparser.mly
create mode 100644 cil/src/frontc/cprint.ml
create mode 100644 cil/src/frontc/frontc.ml
create mode 100644 cil/src/frontc/frontc.mli
create mode 100644 cil/src/frontc/lexerhack.ml
create mode 100644 cil/src/frontc/patch.ml
create mode 100644 cil/src/frontc/patch.mli
create mode 100644 cil/src/frontc/whitetrack.ml
create mode 100644 cil/src/frontc/whitetrack.mli
create mode 100644 cil/src/libmaincil.ml
create mode 100644 cil/src/machdep-ml.c
create mode 100644 cil/src/machdepenv.ml
create mode 100644 cil/src/main.ml
create mode 100644 cil/src/mergecil.ml
create mode 100644 cil/src/mergecil.mli
create mode 100644 cil/src/prettytest.ml
create mode 100644 cil/src/rmtmps.ml
create mode 100644 cil/src/rmtmps.mli
create mode 100644 cil/src/testcil.ml
create mode 100644 cil/src/zrapp.ml
create mode 100644 cil/src/zrapp.mli
create mode 100644 cil/test/.cvsignore
create mode 100644 cil/test/Makefile
create mode 100644 cil/test/small1/.cvsignore
create mode 100644 cil/test/small1/.gdbinit
create mode 100644 cil/test/small1/GRT.c
create mode 100644 cil/test/small1/Makefile
create mode 100644 cil/test/small1/addr-array.c
create mode 100644 cil/test/small1/addrof3.c
create mode 100644 cil/test/small1/align1.c
create mode 100644 cil/test/small1/align2.c
create mode 100644 cil/test/small1/align3.c
create mode 100755 cil/test/small1/apachebits.c
create mode 100755 cil/test/small1/apachebuf.c
create mode 100755 cil/test/small1/apachefptr.c
create mode 100644 cil/test/small1/argcast.c
create mode 100644 cil/test/small1/array-args.c
create mode 100755 cil/test/small1/array-size-trick.c
create mode 100644 cil/test/small1/array1.c
create mode 100644 cil/test/small1/array2.c
create mode 100755 cil/test/small1/array_formal.c
create mode 100755 cil/test/small1/array_varsize.c
create mode 100644 cil/test/small1/arrayinitsize.c
create mode 100644 cil/test/small1/asm1.c
create mode 100644 cil/test/small1/asm2.c
create mode 100644 cil/test/small1/asm3.c
create mode 100644 cil/test/small1/asm4.c
create mode 100644 cil/test/small1/asm5.c
create mode 100644 cil/test/small1/assign.c
create mode 100644 cil/test/small1/attr.c
create mode 100755 cil/test/small1/attr10.c
create mode 100755 cil/test/small1/attr11.c
create mode 100755 cil/test/small1/attr12.c
create mode 100755 cil/test/small1/attr13.c
create mode 100644 cil/test/small1/attr2.c
create mode 100644 cil/test/small1/attr3.c
create mode 100644 cil/test/small1/attr4.c
create mode 100644 cil/test/small1/attr5.c
create mode 100644 cil/test/small1/attr6.c
create mode 100755 cil/test/small1/attr7.c
create mode 100755 cil/test/small1/attr8.c
create mode 100755 cil/test/small1/attr9.c
create mode 100644 cil/test/small1/bf.c
create mode 100644 cil/test/small1/bind-formatstring.c
create mode 100644 cil/test/small1/bind-used-not-defined.c
create mode 100644 cil/test/small1/bitfield.c
create mode 100644 cil/test/small1/bitfield0.c
create mode 100755 cil/test/small1/bitfield2.c
create mode 100644 cil/test/small1/bitfield3.c
create mode 100644 cil/test/small1/blockattr.c
create mode 100644 cil/test/small1/builtin.c
create mode 100755 cil/test/small1/builtin2.c
create mode 100755 cil/test/small1/builtin3.c
create mode 100644 cil/test/small1/builtin_choose_expr.c
create mode 100755 cil/test/small1/call2.c
create mode 100644 cil/test/small1/caserange.c
create mode 100644 cil/test/small1/cast1.c
create mode 100644 cil/test/small1/cast2.c
create mode 100644 cil/test/small1/cast3.c
create mode 100644 cil/test/small1/cast4.c
create mode 100755 cil/test/small1/cast8.c
create mode 100644 cil/test/small1/castincr.c
create mode 100644 cil/test/small1/combine10_1.c
create mode 100644 cil/test/small1/combine10_2.c
create mode 100644 cil/test/small1/combine10_3.c
create mode 100644 cil/test/small1/combine11_1.c
create mode 100644 cil/test/small1/combine11_2.c
create mode 100644 cil/test/small1/combine12_1.c
create mode 100644 cil/test/small1/combine12_2.c
create mode 100644 cil/test/small1/combine13_1.c
create mode 100644 cil/test/small1/combine13_2.c
create mode 100644 cil/test/small1/combine14_1.c
create mode 100644 cil/test/small1/combine14_2.c
create mode 100644 cil/test/small1/combine15_1.c
create mode 100644 cil/test/small1/combine15_2.c
create mode 100644 cil/test/small1/combine16_1.c
create mode 100644 cil/test/small1/combine16_2.c
create mode 100644 cil/test/small1/combine17_1.c
create mode 100644 cil/test/small1/combine17_2.c
create mode 100644 cil/test/small1/combine18_1.c
create mode 100644 cil/test/small1/combine18_2.c
create mode 100644 cil/test/small1/combine1_1.c
create mode 100644 cil/test/small1/combine1_2.c
create mode 100644 cil/test/small1/combine1_3.c
create mode 100644 cil/test/small1/combine20_1.c
create mode 100644 cil/test/small1/combine20_2.c
create mode 100755 cil/test/small1/combine21_1.c
create mode 100755 cil/test/small1/combine21_2.c
create mode 100755 cil/test/small1/combine22_1.c
create mode 100755 cil/test/small1/combine22_2.c
create mode 100644 cil/test/small1/combine2_1.c
create mode 100644 cil/test/small1/combine2_2.c
create mode 100644 cil/test/small1/combine2_3.c
create mode 100644 cil/test/small1/combine3_1.c
create mode 100644 cil/test/small1/combine3_2.c
create mode 100644 cil/test/small1/combine3_3.c
create mode 100644 cil/test/small1/combine4_1.c
create mode 100644 cil/test/small1/combine4_2.c
create mode 100644 cil/test/small1/combine5.h
create mode 100644 cil/test/small1/combine5_1.c
create mode 100644 cil/test/small1/combine5_2.c
create mode 100644 cil/test/small1/combine5_3.c
create mode 100644 cil/test/small1/combine6_1.c
create mode 100644 cil/test/small1/combine6_2.c
create mode 100644 cil/test/small1/combine6_3.c
create mode 100644 cil/test/small1/combine7_1.c
create mode 100644 cil/test/small1/combine7_2.c
create mode 100644 cil/test/small1/combine7_3.c
create mode 100644 cil/test/small1/combine8_1.c
create mode 100644 cil/test/small1/combine8_2.c
create mode 100644 cil/test/small1/combine9_1.c
create mode 100644 cil/test/small1/combine9_2.c
create mode 100644 cil/test/small1/combine_allocate_1.c
create mode 100644 cil/test/small1/combine_allocate_2.c
create mode 100644 cil/test/small1/combine_copyptrs_1.c
create mode 100644 cil/test/small1/combine_copyptrs_2.c
create mode 100755 cil/test/small1/combine_init_1.c
create mode 100755 cil/test/small1/combine_init_2.c
create mode 100644 cil/test/small1/combine_node_alloc_1.c
create mode 100644 cil/test/small1/combine_node_alloc_2.c
create mode 100644 cil/test/small1/combine_samefn_1.c
create mode 100644 cil/test/small1/combine_samefn_2.c
create mode 100644 cil/test/small1/combine_sbumpB_1.c
create mode 100644 cil/test/small1/combine_sbumpB_2.c
create mode 100644 cil/test/small1/combine_sbumpB_3.c
create mode 100644 cil/test/small1/combine_sbump_1.c
create mode 100644 cil/test/small1/combine_sbump_2.c
create mode 100644 cil/test/small1/combine_syserr_1.c
create mode 100644 cil/test/small1/combine_syserr_2.c
create mode 100644 cil/test/small1/combine_theFunc_1.c
create mode 100644 cil/test/small1/combine_theFunc_2.c
create mode 100644 cil/test/small1/combine_theFunc_3.c
create mode 100755 cil/test/small1/combinealias_1.c
create mode 100755 cil/test/small1/combinealias_2.c
create mode 100644 cil/test/small1/combineenum1_1.c
create mode 100644 cil/test/small1/combineenum1_2.c
create mode 100644 cil/test/small1/combineenum2_1.c
create mode 100644 cil/test/small1/combineenum2_2.c
create mode 100644 cil/test/small1/combineenum3_1.c
create mode 100644 cil/test/small1/combineenum3_2.c
create mode 100644 cil/test/small1/combineinline1_1.c
create mode 100644 cil/test/small1/combineinline1_2.c
create mode 100644 cil/test/small1/combineinline2_1.c
create mode 100644 cil/test/small1/combineinline2_2.c
create mode 100644 cil/test/small1/combineinline3_1.c
create mode 100644 cil/test/small1/combineinline3_2.c
create mode 100644 cil/test/small1/combineinline4_1.c
create mode 100644 cil/test/small1/combineinline4_2.c
create mode 100644 cil/test/small1/combineinline6_1.c
create mode 100644 cil/test/small1/combineinline6_2.c
create mode 100755 cil/test/small1/combinelibrik_1.c
create mode 100755 cil/test/small1/combinelibrik_2.c
create mode 100644 cil/test/small1/combinestruct1_1.c
create mode 100644 cil/test/small1/combinestruct1_2.c
create mode 100644 cil/test/small1/combinetaggedfn_1.c
create mode 100644 cil/test/small1/combinetaggedfn_2.c
create mode 100644 cil/test/small1/comma1.c
create mode 100755 cil/test/small1/comparisons.c
create mode 100644 cil/test/small1/cond1.c
create mode 100644 cil/test/small1/cond2.c
create mode 100644 cil/test/small1/const-array-init.c
create mode 100644 cil/test/small1/const-compound-cast.c
create mode 100644 cil/test/small1/const-struct-init.c
create mode 100644 cil/test/small1/const1.c
create mode 100755 cil/test/small1/const10.c
create mode 100755 cil/test/small1/const11.c
create mode 100644 cil/test/small1/const2.c
create mode 100644 cil/test/small1/const3.c
create mode 100644 cil/test/small1/const4.c
create mode 100644 cil/test/small1/const5.c
create mode 100644 cil/test/small1/const6.c
create mode 100644 cil/test/small1/const7.c
create mode 100755 cil/test/small1/const8.c
create mode 100755 cil/test/small1/const9.c
create mode 100644 cil/test/small1/constprop.c
create mode 100644 cil/test/small1/cpp-2.c
create mode 100755 cil/test/small1/cpp-3.c
create mode 100644 cil/test/small1/decl1.c
create mode 100644 cil/test/small1/decl2.c
create mode 100644 cil/test/small1/decl_mix_stmt.c
create mode 100644 cil/test/small1/deref.c
create mode 100644 cil/test/small1/duplicate.c
create mode 100755 cil/test/small1/empty.i
create mode 100644 cil/test/small1/enum.c
create mode 100644 cil/test/small1/enum2.c
create mode 100755 cil/test/small1/escapes.c
create mode 100644 cil/test/small1/extern1.c
create mode 100644 cil/test/small1/extern_init.c
create mode 100644 cil/test/small1/float.c
create mode 100755 cil/test/small1/float2.c
create mode 100644 cil/test/small1/for1.c
create mode 100755 cil/test/small1/formalscope.c
create mode 100644 cil/test/small1/func.c
create mode 100755 cil/test/small1/func10.c
create mode 100644 cil/test/small1/func2.c
create mode 100644 cil/test/small1/func3.c
create mode 100644 cil/test/small1/func4.c
create mode 100644 cil/test/small1/funcarg.c
create mode 100644 cil/test/small1/funptr1.c
create mode 100644 cil/test/small1/globals.c
create mode 100755 cil/test/small1/globals2.c
create mode 100644 cil/test/small1/hello.c
create mode 100644 cil/test/small1/huff1.c
create mode 100644 cil/test/small1/init.c
create mode 100644 cil/test/small1/init1.c
create mode 100644 cil/test/small1/init10.c
create mode 100644 cil/test/small1/init11.c
create mode 100644 cil/test/small1/init12.c
create mode 100644 cil/test/small1/init13.c
create mode 100644 cil/test/small1/init14.c
create mode 100644 cil/test/small1/init15.c
create mode 100755 cil/test/small1/init16.c
create mode 100755 cil/test/small1/init17.c
create mode 100755 cil/test/small1/init18.c
create mode 100755 cil/test/small1/init19.c
create mode 100644 cil/test/small1/init2.c
create mode 100755 cil/test/small1/init20.c
create mode 100755 cil/test/small1/init21.c
create mode 100755 cil/test/small1/init22.c
create mode 100644 cil/test/small1/init3.c
create mode 100644 cil/test/small1/init4.c
create mode 100644 cil/test/small1/init5.c
create mode 100644 cil/test/small1/init6.c
create mode 100644 cil/test/small1/init7.c
create mode 100644 cil/test/small1/init8.c
create mode 100644 cil/test/small1/init9.c
create mode 100644 cil/test/small1/initial.c
create mode 100644 cil/test/small1/inline1.c
create mode 100755 cil/test/small1/inline2.c
create mode 100755 cil/test/small1/inline3.c
create mode 100644 cil/test/small1/jmp_buf.c
create mode 100644 cil/test/small1/knr1.c
create mode 100644 cil/test/small1/label1.c
create mode 100644 cil/test/small1/label2.c
create mode 100644 cil/test/small1/label3.c
create mode 100644 cil/test/small1/label4.c
create mode 100755 cil/test/small1/label5.c
create mode 100644 cil/test/small1/li.c
create mode 100755 cil/test/small1/lineno.i
create mode 100644 cil/test/small1/linux_atomic.c
create mode 100644 cil/test/small1/linux_signal.c
create mode 100644 cil/test/small1/linuxcombine1_1.c
create mode 100644 cil/test/small1/list.c
create mode 100644 cil/test/small1/local.c
create mode 100644 cil/test/small1/local.h
create mode 100755 cil/test/small1/localinit.c
create mode 100644 cil/test/small1/logical.c
create mode 100644 cil/test/small1/longBlock.ml
create mode 100644 cil/test/small1/lstring.c
create mode 100644 cil/test/small1/lval1.c
create mode 100644 cil/test/small1/math1.c
create mode 100644 cil/test/small1/matrix.c
create mode 100644 cil/test/small1/memcpy1.c
create mode 100755 cil/test/small1/min.c
create mode 100755 cil/test/small1/msvc1.c
create mode 100755 cil/test/small1/msvc2.c
create mode 100755 cil/test/small1/msvc3.c
create mode 100755 cil/test/small1/msvc4.c
create mode 100755 cil/test/small1/msvc5.c
create mode 100755 cil/test/small1/msvc6.c
create mode 100755 cil/test/small1/msvc7.c
create mode 100755 cil/test/small1/msvc8.c
create mode 100755 cil/test/small1/msvc9.c
create mode 100644 cil/test/small1/noproto.c
create mode 100644 cil/test/small1/noproto1.c
create mode 100644 cil/test/small1/noproto2.c
create mode 100644 cil/test/small1/noreturn.c
create mode 100644 cil/test/small1/offsetof.c
create mode 100644 cil/test/small1/offsetof1.c
create mode 100644 cil/test/small1/offsetof2.c
create mode 100755 cil/test/small1/offsetof3.c
create mode 100644 cil/test/small1/oom.c
create mode 100644 cil/test/small1/order.c
create mode 100755 cil/test/small1/outofmem.c
create mode 100644 cil/test/small1/p04.c
create mode 100755 cil/test/small1/packed.c
create mode 100755 cil/test/small1/packed2.c
create mode 100644 cil/test/small1/paper1.c
create mode 100644 cil/test/small1/paper2.c
create mode 100644 cil/test/small1/percent400.c
create mode 100644 cil/test/small1/percentm.c
create mode 100644 cil/test/small1/perror.c
create mode 100644 cil/test/small1/perror1.c
create mode 100644 cil/test/small1/pointers2.c
create mode 100644 cil/test/small1/post-assign.c
create mode 100644 cil/test/small1/power1.c
create mode 100644 cil/test/small1/printf.c
create mode 100644 cil/test/small1/printf2.c
create mode 100755 cil/test/small1/printf_const.c
create mode 100644 cil/test/small1/proto1.c
create mode 100644 cil/test/small1/proto2.c
create mode 100644 cil/test/small1/pure.c
create mode 100755 cil/test/small1/question.c
create mode 100755 cil/test/small1/question2.c
create mode 100644 cil/test/small1/restrict.c
create mode 100644 cil/test/small1/restrict1.c
create mode 100644 cil/test/small1/return1.c
create mode 100644 cil/test/small1/returnvoid.c
create mode 100644 cil/test/small1/returnvoid1.c
create mode 100644 cil/test/small1/retval.c
create mode 100644 cil/test/small1/rmtmps-attr.c
create mode 100644 cil/test/small1/rmtmps1.c
create mode 100644 cil/test/small1/rmtmps2.c
create mode 100644 cil/test/small1/scope1.c
create mode 100755 cil/test/small1/scope10.c
create mode 100755 cil/test/small1/scope11.c
create mode 100644 cil/test/small1/scope2.c
create mode 100644 cil/test/small1/scope3.c
create mode 100644 cil/test/small1/scope4.c
create mode 100644 cil/test/small1/scope5.c
create mode 100644 cil/test/small1/scope6.c
create mode 100644 cil/test/small1/scope7.c
create mode 100644 cil/test/small1/scope8.c
create mode 100644 cil/test/small1/scope9.c
create mode 100755 cil/test/small1/semicolon.c
create mode 100644 cil/test/small1/signs.c
create mode 100644 cil/test/small1/simon6.c
create mode 100755 cil/test/small1/simplify_structs1.c
create mode 100755 cil/test/small1/simplify_structs2.c
create mode 100644 cil/test/small1/sizeof1.c
create mode 100755 cil/test/small1/sizeof2.c
create mode 100644 cil/test/small1/ssa-test.c
create mode 100755 cil/test/small1/ssa-test2.c
create mode 100644 cil/test/small1/ssa2.c
create mode 100644 cil/test/small1/ssa3.c
create mode 100644 cil/test/small1/ssa4.c
create mode 100755 cil/test/small1/ssa5.c
create mode 100755 cil/test/small1/stack.c
create mode 100644 cil/test/small1/static.c
create mode 100644 cil/test/small1/static1.c
create mode 100755 cil/test/small1/static2.c
create mode 100644 cil/test/small1/strcpy.c
create mode 100644 cil/test/small1/string1.c
create mode 100755 cil/test/small1/string2.c
create mode 100755 cil/test/small1/stringsize.c
create mode 100644 cil/test/small1/strloop.c
create mode 100644 cil/test/small1/strloop3.c
create mode 100644 cil/test/small1/struct1.c
create mode 100644 cil/test/small1/struct2.c
create mode 100644 cil/test/small1/struct_init.c
create mode 100644 cil/test/small1/structassign.c
create mode 100644 cil/test/small1/tags.c
create mode 100644 cil/test/small1/task.c
create mode 100755 cil/test/small1/tempname.c
create mode 100644 cil/test/small1/testharness.h
create mode 100755 cil/test/small1/typeof1.c
create mode 100644 cil/test/small1/typespec1.c
create mode 100644 cil/test/small1/unimplemented.c
create mode 100644 cil/test/small1/union1.c
create mode 100644 cil/test/small1/union2.c
create mode 100644 cil/test/small1/union3.c
create mode 100755 cil/test/small1/union5.c
create mode 100644 cil/test/small1/unsafe1.c
create mode 100644 cil/test/small1/va-arg-1.c
create mode 100644 cil/test/small1/va-arg-2.c
create mode 100644 cil/test/small1/va-arg-7.c
create mode 100644 cil/test/small1/var.c
create mode 100644 cil/test/small1/vararg1.c
create mode 100755 cil/test/small1/vararg10.c
create mode 100755 cil/test/small1/vararg11.c
create mode 100644 cil/test/small1/vararg2.c
create mode 100644 cil/test/small1/vararg3.c
create mode 100644 cil/test/small1/vararg4.c
create mode 100644 cil/test/small1/vararg5.c
create mode 100644 cil/test/small1/vararg5.h
create mode 100644 cil/test/small1/vararg6.c
create mode 100644 cil/test/small1/vararg7.c
create mode 100644 cil/test/small1/varargauto1.c
create mode 100644 cil/test/small1/varied.c
create mode 100644 cil/test/small1/version.c
create mode 100644 cil/test/small1/void.c
create mode 100644 cil/test/small1/voidarg.c
create mode 100644 cil/test/small1/voidstar.c
create mode 100755 cil/test/small1/voidtypedef.c
create mode 100644 cil/test/small1/vsp.c
create mode 100755 cil/test/small1/warnings-cast.c
create mode 100644 cil/test/small1/warnings-noreturn.c
create mode 100644 cil/test/small1/warnings-unused-label.c
create mode 100644 cil/test/small1/wchar-bad.c
create mode 100644 cil/test/small1/wchar1.c
create mode 100644 cil/test/small1/wchar1_freebsd.c
create mode 100644 cil/test/small1/wchar2.c
create mode 100644 cil/test/small1/wchar3.c
create mode 100644 cil/test/small1/wchar4.c
create mode 100644 cil/test/small1/wchar5.c
create mode 100644 cil/test/small1/wchar6.c
create mode 100644 cil/test/small1/wchar7.c
create mode 100644 cil/test/small1/wrongnumargs.c
create mode 100644 cil/test/small1/zerotags.c
create mode 100644 cil/test/small2/.cvsignore
create mode 100644 cil/test/small2/Makefile
create mode 100644 cil/test/small2/align.c
create mode 100755 cil/test/small2/alpha.c
create mode 100644 cil/test/small2/arrayinit.c
create mode 100755 cil/test/small2/arrsize.c
create mode 100644 cil/test/small2/asmfndecl.c
create mode 100644 cil/test/small2/attrib.c
create mode 100644 cil/test/small2/badasm.c
create mode 100644 cil/test/small2/baddef1.c
create mode 100644 cil/test/small2/baddef2.c
create mode 100644 cil/test/small2/bisonerror.c
create mode 100644 cil/test/small2/bogus_redef.c
create mode 100644 cil/test/small2/brlock.c
create mode 100644 cil/test/small2/bzero.c
create mode 100644 cil/test/small2/checkinit.c
create mode 100644 cil/test/small2/checkret.c
create mode 100644 cil/test/small2/checkstore.c
create mode 100644 cil/test/small2/checkstore2.c
create mode 100644 cil/test/small2/checkstore3.c
create mode 100644 cil/test/small2/checksymbol.c
create mode 100755 cil/test/small2/cilreturn.c
create mode 100644 cil/test/small2/cmpzero.c
create mode 100644 cil/test/small2/cof.c
create mode 100644 cil/test/small2/comb1.c
create mode 100644 cil/test/small2/comb2.c
create mode 100755 cil/test/small2/comb3.c
create mode 100755 cil/test/small2/comb4.c
create mode 100644 cil/test/small2/conset.c
create mode 100644 cil/test/small2/constdecl.c
create mode 100644 cil/test/small2/constfold.c
create mode 100755 cil/test/small2/constfold2.c
create mode 100644 cil/test/small2/ctype.c
create mode 100644 cil/test/small2/debug_table.c
create mode 100644 cil/test/small2/ehstack.c
create mode 100644 cil/test/small2/enumattr.c
create mode 100644 cil/test/small2/enumerator_sizeof.c
create mode 100644 cil/test/small2/enuminit.c
create mode 100644 cil/test/small2/enuminit2.c
create mode 100644 cil/test/small2/errorinfn.c
create mode 100755 cil/test/small2/extinline.c
create mode 100644 cil/test/small2/fig1.c
create mode 100644 cil/test/small2/fmtstr.c
create mode 100644 cil/test/small2/fseq1fail.c
create mode 100644 cil/test/small2/funcname.c
create mode 100644 cil/test/small2/funcptr.c
create mode 100644 cil/test/small2/funcptr2.c
create mode 100644 cil/test/small2/funptr1.c
create mode 100644 cil/test/small2/gimpdouble.c
create mode 100644 cil/test/small2/globalprob.c
create mode 100644 cil/test/small2/globinit.c
create mode 100644 cil/test/small2/globtable.c
create mode 100644 cil/test/small2/handler1.handlers
create mode 100644 cil/test/small2/hashtest.c
create mode 100644 cil/test/small2/hola.c
create mode 100644 cil/test/small2/hufftable.c
create mode 100644 cil/test/small2/hufftest.c
create mode 100644 cil/test/small2/index1.c
create mode 100644 cil/test/small2/initedextern.c
create mode 100644 cil/test/small2/invalredef.c
create mode 100644 cil/test/small2/invalredef2.c
create mode 100644 cil/test/small2/jpeg_compress_struct.c
create mode 100644 cil/test/small2/kernel1.c
create mode 100644 cil/test/small2/kernel2.c
create mode 100644 cil/test/small2/lexnum.c
create mode 100644 cil/test/small2/litstruct.c
create mode 100644 cil/test/small2/main.c
create mode 100644 cil/test/small2/malloc1.c
create mode 100644 cil/test/small2/memberofptr.c
create mode 100644 cil/test/small2/memset_sizeof.c
create mode 100644 cil/test/small2/merge-ar.c
create mode 100644 cil/test/small2/merge-twice-1.c
create mode 100644 cil/test/small2/merge-twice-2.c
create mode 100644 cil/test/small2/merge-twice-3.c
create mode 100644 cil/test/small2/mergeinline1.c
create mode 100644 cil/test/small2/mergeinline2.c
create mode 100644 cil/test/small2/mergestruct1.c
create mode 100644 cil/test/small2/mergestruct2.c
create mode 100644 cil/test/small2/metabug3.c
create mode 100644 cil/test/small2/mode_sizes.c
create mode 100644 cil/test/small2/multiplestatics.c
create mode 100644 cil/test/small2/neg64.c
create mode 100644 cil/test/small2/nested.c
create mode 100644 cil/test/small2/nonwilderror.c
create mode 100644 cil/test/small2/oldstyle.c
create mode 100644 cil/test/small2/open.c
create mode 100644 cil/test/small2/override.c
create mode 100644 cil/test/small2/partialbracket.c
create mode 100644 cil/test/small2/pset.c
create mode 100644 cil/test/small2/ptrinint.c
create mode 100644 cil/test/small2/putc.c
create mode 100644 cil/test/small2/rbtest.c
create mode 100644 cil/test/small2/regbeforeassign.c
create mode 100644 cil/test/small2/regparm0.c
create mode 100644 cil/test/small2/regthenprintf.c
create mode 100644 cil/test/small2/runall_misc.c
create mode 100644 cil/test/small2/rusage.c
create mode 100644 cil/test/small2/s59.c
create mode 100644 cil/test/small2/scary.c
create mode 100644 cil/test/small2/segfault.c
create mode 100644 cil/test/small2/seq_align_malloc.c
create mode 100644 cil/test/small2/seq_align_malloc2.c
create mode 100644 cil/test/small2/seqalign.c
create mode 100755 cil/test/small2/sizeof3.c
create mode 100644 cil/test/small2/sizeofchar.c
create mode 100644 cil/test/small2/sockaddr.c
create mode 100644 cil/test/small2/stackptr.c
create mode 100644 cil/test/small2/stackptrptr.c
create mode 100644 cil/test/small2/struct_cs.c
create mode 100644 cil/test/small2/structattr.c
create mode 100644 cil/test/small2/structattr2.c
create mode 100644 cil/test/small2/structattr3.c
create mode 100644 cil/test/small2/switch.c
create mode 100644 cil/test/small2/tagfile.txt
create mode 100644 cil/test/small2/tagfile1.c
create mode 100644 cil/test/small2/tagfile2.c
create mode 100644 cil/test/small2/testbtree.c
create mode 100644 cil/test/small2/thing.c
create mode 100644 cil/test/small2/transpunion.c
create mode 100644 cil/test/small2/trivial-tb.c
create mode 100755 cil/test/small2/try1.c
create mode 100644 cil/test/small2/twoprintfs.c
create mode 100644 cil/test/small2/typeof.c
create mode 100644 cil/test/small2/undef_func.c
create mode 100644 cil/test/small2/uninit_tmp.c
create mode 100644 cil/test/small2/union2.c
create mode 100644 cil/test/small2/union4.c
create mode 100644 cil/test/small2/union5.c
create mode 100644 cil/test/small2/union6.c
create mode 100755 cil/test/small2/union7.c
create mode 100755 cil/test/small2/union8.c
create mode 100644 cil/test/small2/unionassign.c
create mode 100644 cil/test/small2/unionext.c
create mode 100644 cil/test/small2/unscomp.c
create mode 100644 cil/test/small2/visit_col.c
create mode 100644 cil/test/small2/voidstarint.c
create mode 100644 cil/test/small2/volatilestruct.c
create mode 100644 cil/test/small2/wes-hashtest.c
create mode 100644 cil/test/small2/wes-rbtest.c
create mode 100644 cil/test/small2/writev.c
create mode 100644 cil/test/small2/xcheckers.c
create mode 100755 cil/test/testcil
create mode 100755 cil/test/testcil.bat
create mode 100644 cil/test/testcil.h
create mode 100644 cil/test/testcil.pl
create mode 100755 config.guess
create mode 100755 config.sub
create mode 100755 configure
create mode 100644 configure.ac
create mode 100644 debian/changelog
create mode 100644 debian/compat
create mode 100644 debian/control
create mode 100644 debian/copyright
create mode 100644 debian/dirs
create mode 100644 debian/docs
create mode 100644 debian/files
create mode 100755 debian/rules
create mode 100644 debian/watch
create mode 100755 doc/.cvsignore
create mode 100755 doc/TODO
create mode 100755 doc/comment.sty
create mode 100644 doc/deputy.1
create mode 100755 doc/deputy.tex
create mode 100755 doc/deputycode.pl
create mode 100755 doc/fullpage.sty
create mode 100755 doc/header.html.in
create mode 100755 doc/hevea.sty
create mode 100755 doc/html/.cvsignore
create mode 100755 doc/index.html.in
create mode 100644 doc/www/bnd-be-nt.png
create mode 100644 doc/www/bnd-be.png
create mode 100644 doc/www/count-5.png
create mode 100644 doc/www/count-nm.png
create mode 100644 doc/www/deputy.css
create mode 100644 doc/www/index.html
create mode 100644 doc/www/manual.html
create mode 100644 doc/www/quickref.html
create mode 100755 include/.cvsignore
create mode 100755 include/ccuredport.h
create mode 100644 include/deputy/annots.h
create mode 100755 include/deputy/checks.h
create mode 100644 include/deputy/itaint.patch.h
create mode 100644 include/deputy/lwcalls.h
create mode 100644 include/deputy/sml_instrumenter.h
create mode 100644 include/libc_patch.h
create mode 100644 install-sh
create mode 100644 lib/Deputy.pm
create mode 100755 lib/deputy_libc.c
create mode 100755 lib/deputy_linux.c
create mode 100644 lib/instr_glob_state.c
create mode 100644 lib/lwcalls.sml
create mode 100644 obj/.depend/.cvsignore
create mode 100644 obj/x86_LINUX/.cvsignore
create mode 100644 obj/x86_WIN32/.cvsignore
create mode 100644 rpm/deputy.spec
create mode 100755 src/dattrs.ml
create mode 100644 src/dattrs.mli
create mode 100755 src/dcheck.ml
create mode 100644 src/dcheck.mli
create mode 100644 src/dcheckdef.ml
create mode 100644 src/dcheckdef.mli
create mode 100755 src/dglobinit.ml
create mode 100644 src/dglobinit.mli
create mode 100755 src/dinfer.ml
create mode 100644 src/dinfer.mli
create mode 100755 src/dlocals.ml
create mode 100644 src/dlocals.mli
create mode 100755 src/doptions.ml
create mode 100644 src/doptions.mli
create mode 100644 src/dpatch.ml
create mode 100644 src/dpatch.mli
create mode 100644 src/dpoly.ml
create mode 100644 src/dpoly.mli
create mode 100644 src/dsolverfront.ml
create mode 100755 src/dutil.ml
create mode 100644 src/dutil.mli
create mode 100755 src/dvararg.ml
create mode 100644 src/dvararg.mli
create mode 100644 src/infer/controlflow.ml
create mode 100644 src/infer/inferkinds.ml
create mode 100644 src/infer/inferkinds.mli
create mode 100644 src/infer/markptr.ml
create mode 100644 src/infer/markptr.mli
create mode 100644 src/infer/ptrnode.ml
create mode 100644 src/infer/ptrnode.mli
create mode 100644 src/infer/solver.ml
create mode 100644 src/infer/solver.mli
create mode 100644 src/infer/type.ml
create mode 100644 src/infer/type.mli
create mode 100644 src/infer/unionfind.ml
create mode 100644 src/instrumenter/dinstrumenter.ml
create mode 100644 src/instrumenter/dtaint.ml
create mode 100644 src/main.ml
create mode 100644 src/optimizer/dcanonexp.ml
create mode 100644 src/optimizer/dcheckhoister.ml
create mode 100644 src/optimizer/dcheckstrengthen.ml
create mode 100644 src/optimizer/ddupcelim.ml
create mode 100644 src/optimizer/dfailfinder.ml
create mode 100644 src/optimizer/dfdatbrowser.ml
create mode 100644 src/optimizer/dflowinsens.ml
create mode 100644 src/optimizer/dflowsens.ml
create mode 100644 src/optimizer/dfwdsubst.ml
create mode 100644 src/optimizer/dloopoptim.ml
create mode 100644 src/optimizer/dnonnullfinder.ml
create mode 100644 src/optimizer/doptimmain.ml
create mode 100644 src/optimizer/doptimutil.ml
create mode 100644 src/optimizer/dprecfinder.ml
create mode 100644 src/optimizer/modref/saturnModRef/dmodref.ml
create mode 100644 src/optimizer/modref/zraModRef/dmodref.ml
create mode 100644 src/optimizer/nullSolver/nullSolverInterface.ml
create mode 100644 src/optimizer/oct/mineOct/doctanalysis.ml
create mode 100644 src/optimizer/oct/mineOct/oct.h
create mode 100644 src/optimizer/oct/mineOct/oct.ml
create mode 100644 src/optimizer/oct/mineOct/oct.mli
create mode 100644 src/optimizer/oct/mineOct/oct_config.h
create mode 100644 src/optimizer/oct/mineOct/oct_config_2.h
create mode 100644 src/optimizer/oct/mineOct/oct_num.h
create mode 100644 src/optimizer/oct/mineOct/oct_ocaml.c
create mode 100644 src/optimizer/oct/mineOct/oct_ocaml.h
create mode 100644 src/optimizer/oct/mineOct/oct_private.h
create mode 100644 src/optimizer/oct/mineOct/oct_sem.c
create mode 100644 src/optimizer/oct/mineOct/oct_util.c
create mode 100644 src/optimizer/oct/nullOct/doctanalysis.ml
create mode 100644 src/optimizer/ptranal/cilPtrAnal/dptranal.ml
create mode 100644 src/optimizer/ptranal/saturnPtrAnal/dptranal.ml
create mode 100644 src/optimizer/solver/cvclSolver/Makefile
create mode 100644 src/optimizer/solver/cvclSolver/cvcl.ml
create mode 100644 src/optimizer/solver/cvclSolver/cvcl_ocaml_wrappers.c
create mode 100644 src/optimizer/solver/cvclSolver/cvcl_solver_test.ml
create mode 100644 src/optimizer/solver/cvclSolver/solverInterface.ml
create mode 100644 src/optimizer/solver/nullSolver/solverInterface.ml
create mode 100644 src/optimizer/solver/yicesSolver/Makefile
create mode 100644 src/optimizer/solver/yicesSolver/solverInterface.ml
create mode 100644 src/optimizer/solver/yicesSolver/yices.ml
create mode 100644 src/optimizer/solver/yicesSolver/yices_ocaml_wrappers.c
create mode 100644 src/optimizer/solver/yicesSolver/yices_solver_test.ml
create mode 100644 src/optimizer/xhtml/xHTML.ml
create mode 100644 src/optimizer/xhtml/xHTML.mli
create mode 100644 src/optimizer/xhtml/xML.ml
create mode 100644 src/optimizer/xhtml/xML.mli
create mode 100755 test/.cvsignore
create mode 100755 test/Makefile.in
create mode 100755 test/libc/.cvsignore
create mode 100755 test/libc/Makefile
create mode 100755 test/libc/crypt1.c
create mode 100644 test/libc/ctype1.c
create mode 100755 test/libc/fwrite1.c
create mode 100755 test/libc/getaddrinfo1.c
create mode 100755 test/libc/getpwnam1.c
create mode 100755 test/libc/glob1.c
create mode 100755 test/libc/harness.h
create mode 100755 test/libc/hostent1.c
create mode 100755 test/libc/hostent2.c
create mode 100644 test/libc/malloc1.c
create mode 100644 test/libc/malloc2.c
create mode 100755 test/libc/memset1.c
create mode 100644 test/libc/popen1.c
create mode 100755 test/libc/printf1.c
create mode 100644 test/libc/printf2.c
create mode 100755 test/libc/readv1.c
create mode 100755 test/libc/servent1.c
create mode 100755 test/libc/servent2.c
create mode 100755 test/libc/sockaddr1.c
create mode 100755 test/libc/socket1.c
create mode 100755 test/libc/stat1.c
create mode 100755 test/libc/strchr1.c
create mode 100755 test/libc/strcpy.c
create mode 100755 test/libc/strerror1.c
create mode 100755 test/libc/string1.c
create mode 100755 test/libc/string2.c
create mode 100755 test/libc/string3.c
create mode 100755 test/libc/string4.c
create mode 100755 test/libc/string5.c
create mode 100755 test/libc/string6.c
create mode 100755 test/libc/string7.c
create mode 100755 test/libc/strlcpy.c
create mode 100644 test/libc/strncpy1.c
create mode 100755 test/libc/strpbrk1.c
create mode 100755 test/libc/strspn.c
create mode 100644 test/libc/strtok1.c
create mode 100644 test/libc/vararg1.c
create mode 100644 test/libc/writev1.c
create mode 100755 test/small/.cvsignore
create mode 100755 test/small/Makefile
create mode 100644 test/small/abstract1.c
create mode 100644 test/small/addrof1.c
create mode 100644 test/small/addrof2.c
create mode 100644 test/small/addrof3.c
create mode 100644 test/small/addrof4.c
create mode 100644 test/small/addrof5.c
create mode 100644 test/small/addrof6.c
create mode 100644 test/small/addrof7.c
create mode 100644 test/small/align1.c
create mode 100644 test/small/align2.c
create mode 100755 test/small/alloc1.c
create mode 100644 test/small/alloc10.c
create mode 100644 test/small/alloc11.c
create mode 100644 test/small/alloc12.c
create mode 100755 test/small/alloc2.c
create mode 100644 test/small/alloc3.c
create mode 100644 test/small/alloc4.c
create mode 100644 test/small/alloc5.c
create mode 100755 test/small/alloc6.c
create mode 100755 test/small/alloc7.c
create mode 100755 test/small/alloc8.c
create mode 100644 test/small/alloc9.c
create mode 100755 test/small/array1.c
create mode 100644 test/small/array2.c
create mode 100644 test/small/array3.c
create mode 100755 test/small/array4.c
create mode 100755 test/small/array5.c
create mode 100644 test/small/array6.c
create mode 100644 test/small/array7.c
create mode 100755 test/small/auto1.c
create mode 100755 test/small/auto2.c
create mode 100755 test/small/auto3.c
create mode 100644 test/small/auto4.c
create mode 100755 test/small/auto5.c
create mode 100755 test/small/auto6.c
create mode 100644 test/small/auto7.c
create mode 100644 test/small/auto8.c
create mode 100644 test/small/auto9.c
create mode 100755 test/small/bound1.c
create mode 100644 test/small/builtin1.c
create mode 100644 test/small/call1.c
create mode 100644 test/small/call2.c
create mode 100644 test/small/call3.c
create mode 100644 test/small/call4.c
create mode 100755 test/small/call5.c
create mode 100755 test/small/call6.c
create mode 100644 test/small/call7.c
create mode 100644 test/small/call8.c
create mode 100644 test/small/cast1.c
create mode 100644 test/small/cast10.c
create mode 100644 test/small/cast11.c
create mode 100755 test/small/cast12.c
create mode 100755 test/small/cast13.c
create mode 100755 test/small/cast14.c
create mode 100755 test/small/cast15.c
create mode 100755 test/small/cast16.c
create mode 100644 test/small/cast17.c
create mode 100755 test/small/cast18.c
create mode 100644 test/small/cast19.c
create mode 100644 test/small/cast2.c
create mode 100755 test/small/cast20.c
create mode 100644 test/small/cast3.c
create mode 100644 test/small/cast4.c
create mode 100644 test/small/cast5.c
create mode 100644 test/small/cast6.c
create mode 100644 test/small/cast7.c
create mode 100644 test/small/cast8.c
create mode 100644 test/small/cast9.c
create mode 100644 test/small/deref1.c
create mode 100644 test/small/deref2.c
create mode 100644 test/small/deref3.c
create mode 100644 test/small/enum1.c
create mode 100644 test/small/extern1.c
create mode 100755 test/small/extern2.c
create mode 100644 test/small/extern3.c
create mode 100755 test/small/extinline1.c
create mode 100644 test/small/field1.c
create mode 100644 test/small/field2.c
create mode 100644 test/small/field3.c
create mode 100755 test/small/field4.c
create mode 100644 test/small/field5.c
create mode 100755 test/small/func1.c
create mode 100755 test/small/func2.c
create mode 100755 test/small/func3.c
create mode 100755 test/small/func4.c
create mode 100644 test/small/func5.c
create mode 100644 test/small/func6.c
create mode 100644 test/small/func7.c
create mode 100644 test/small/func8.c
create mode 100644 test/small/func9.c
create mode 100644 test/small/global1.c
create mode 100644 test/small/global2.c
create mode 100755 test/small/global3.c
create mode 100755 test/small/global4.c
create mode 100755 test/small/global5.c
create mode 100644 test/small/global6.c
create mode 100755 test/small/global7.c
create mode 100644 test/small/global8.c
create mode 100644 test/small/global9.c
create mode 100755 test/small/harness.h
create mode 100755 test/small/incr1.c
create mode 100644 test/small/infer1.c
create mode 100644 test/small/infer10.c
create mode 100644 test/small/infer11.c
create mode 100644 test/small/infer12.c
create mode 100644 test/small/infer13.c
create mode 100644 test/small/infer14.c
create mode 100755 test/small/infer15.c
create mode 100644 test/small/infer16.c
create mode 100644 test/small/infer17.c
create mode 100644 test/small/infer18.c
create mode 100644 test/small/infer19.c
create mode 100644 test/small/infer2.c
create mode 100644 test/small/infer3.c
create mode 100644 test/small/infer4.c
create mode 100644 test/small/infer5.c
create mode 100644 test/small/infer6.c
create mode 100644 test/small/infer7.c
create mode 100644 test/small/infer8.c
create mode 100644 test/small/infer9.c
create mode 100755 test/small/init1.c
create mode 100755 test/small/init2.c
create mode 100755 test/small/live1.c
create mode 100755 test/small/live2.c
create mode 100644 test/small/live3.c
create mode 100755 test/small/local1.c
create mode 100644 test/small/memcmp1.c
create mode 100755 test/small/memcmp2.c
create mode 100644 test/small/memcpy1.c
create mode 100644 test/small/memcpy2.c
create mode 100644 test/small/memset1.c
create mode 100755 test/small/memset2.c
create mode 100755 test/small/nonnull1.c
create mode 100755 test/small/nonnull2.c
create mode 100755 test/small/nonnull3.c
create mode 100755 test/small/nonnull4.c
create mode 100644 test/small/nullterm1.c
create mode 100644 test/small/nullterm10.c
create mode 100644 test/small/nullterm11.c
create mode 100644 test/small/nullterm2.c
create mode 100644 test/small/nullterm3.c
create mode 100644 test/small/nullterm4.c
create mode 100644 test/small/nullterm5.c
create mode 100644 test/small/nullterm6.c
create mode 100755 test/small/nullterm7.c
create mode 100644 test/small/nullterm8.c
create mode 100755 test/small/nullterm9.c
create mode 100755 test/small/offset1.c
create mode 100755 test/small/offset2.c
create mode 100755 test/small/offset3.c
create mode 100644 test/small/openarray1.c
create mode 100644 test/small/openarray2.c
create mode 100644 test/small/openarray3.c
create mode 100644 test/small/openarray4.c
create mode 100644 test/small/opt1.c
create mode 100644 test/small/opt10.c
create mode 100644 test/small/opt11.c
create mode 100644 test/small/opt12.c
create mode 100644 test/small/opt13.c
create mode 100644 test/small/opt14.c
create mode 100644 test/small/opt15.c
create mode 100644 test/small/opt16.c
create mode 100644 test/small/opt2.c
create mode 100755 test/small/opt3.c
create mode 100755 test/small/opt4.c
create mode 100644 test/small/opt5.c
create mode 100644 test/small/opt6.c
create mode 100755 test/small/opt7.c
create mode 100644 test/small/opt8.c
create mode 100644 test/small/opt9.c
create mode 100755 test/small/overflow1.c
create mode 100644 test/small/overflow2.c
create mode 100644 test/small/packed1.c
create mode 100644 test/small/poly1.c
create mode 100644 test/small/poly2.c
create mode 100644 test/small/poly3.c
create mode 100644 test/small/poly4.c
create mode 100644 test/small/poly5.c
create mode 100644 test/small/poly6.c
create mode 100644 test/small/poly7.c
create mode 100644 test/small/ptrarith1.c
create mode 100644 test/small/ptrarith2.c
create mode 100644 test/small/retbound1.c
create mode 100644 test/small/return1.c
create mode 100755 test/small/sentinel1.c
create mode 100755 test/small/sentinel2.c
create mode 100644 test/small/size1.c
create mode 100644 test/small/size2.c
create mode 100644 test/small/size3.c
create mode 100644 test/small/size4.c
create mode 100644 test/small/sizeof1.c
create mode 100644 test/small/sizeof2.c
create mode 100644 test/small/sizeof3.c
create mode 100644 test/small/startof1.c
create mode 100644 test/small/startof2.c
create mode 100755 test/small/string1.c
create mode 100755 test/small/string10.c
create mode 100644 test/small/string12.c
create mode 100755 test/small/string13.c
create mode 100755 test/small/string14.c
create mode 100755 test/small/string15.c
create mode 100755 test/small/string16.c
create mode 100755 test/small/string18.c
create mode 100755 test/small/string19.c
create mode 100755 test/small/string2.c
create mode 100755 test/small/string20.c
create mode 100644 test/small/string21.c
create mode 100644 test/small/string3.c
create mode 100644 test/small/string4.c
create mode 100644 test/small/string5.c
create mode 100644 test/small/string6.c
create mode 100644 test/small/string7.c
create mode 100644 test/small/string8.c
create mode 100755 test/small/string9.c
create mode 100755 test/small/struct1.c
create mode 100644 test/small/testlib.c
create mode 100644 test/small/trusted1.c
create mode 100644 test/small/trusted10.c
create mode 100755 test/small/trusted11.c
create mode 100644 test/small/trusted12.c
create mode 100644 test/small/trusted13.c
create mode 100644 test/small/trusted2.c
create mode 100644 test/small/trusted3.c
create mode 100755 test/small/trusted4.c
create mode 100644 test/small/trusted5.c
create mode 100644 test/small/trusted6.c
create mode 100644 test/small/trusted7.c
create mode 100644 test/small/trusted8.c
create mode 100644 test/small/trusted9.c
create mode 100755 test/small/typedef1.c
create mode 100755 test/small/typedef2.c
create mode 100644 test/small/typeof1.c
create mode 100644 test/small/types1.c
create mode 100644 test/small/types2.c
create mode 100644 test/small/types3.c
create mode 100644 test/small/types4.c
create mode 100644 test/small/types5.c
create mode 100644 test/small/types6.c
create mode 100644 test/small/types7.c
create mode 100644 test/small/types8.c
create mode 100644 test/small/types9.c
create mode 100755 test/small/union1.c
create mode 100755 test/small/union2.c
create mode 100755 test/small/union3.c
create mode 100755 test/small/union4.c
create mode 100755 test/small/union5.c
create mode 100644 test/small/union6.c
create mode 100644 test/small/upcast1.c
create mode 100644 test/small/upcast2.c
create mode 100644 test/small/var1.c
create mode 100644 test/small/var2.c
create mode 100644 test/small/var3.c
create mode 100755 test/small/var4.c
create mode 100644 test/small/var5.c
create mode 100644 test/small/vararg1.c
create mode 100755 test/small/voidstar1.c
create mode 100755 test/small/voidstar2.c
create mode 100644 test/small/voidstar4.c
create mode 100755 test/small/volatile1.c
create mode 100755 test/testdeputy
create mode 100644 test/testdeputy.pl
create mode 100644 web/.htaccess
create mode 100644 web/index.html
create mode 100644 web/web-driver.cgi
diff --git a/.cvsignore b/.cvsignore
new file mode 100755
index 0000000..f165631
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,4 @@
+Makefile
+autom4te.cache
+config.log
+config.status
diff --git a/.distexclude b/.distexclude
new file mode 100644
index 0000000..c76b3bd
--- /dev/null
+++ b/.distexclude
@@ -0,0 +1,29 @@
+.svn
+.cvsignore
+.distexclude
+web
+debian
+config.status
+test/Makefile
+cil/doc
+cil/test
+cil/config.status
+cil/Makefile
+cil/cil.spec
+cil/config.mk
+cil/bin/cilly.bat
+cil/bin/patcher.bat
+cil/bin/CilConfig.pm
+cil/ocamlutil/perfcount.c
+cil/config.h
+doc/comment.sty
+doc/deputycode.pl
+doc/deputy.tex
+doc/fullpage.sty
+doc/header.html
+doc/header.html.in
+doc/hevea.sty
+doc/html
+doc/index.html
+doc/index.html.in
+doc/TODO
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c9ed773
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,35 @@
+Copyright (c) 2006,
+ Jeremy Condit
+ Matthew Harren
+ Zachary Anderson
+ George C. Necula
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. The names of the contributors may not be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+(See http://www.opensource.org/licenses/bsd-license.php)
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..07d4a37
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,451 @@
+# Makefile for Deputy, based on the CIL Makefiles.
+# Jeremy Condit
+#
+#
+# Please edit Makefile.in, not Makefile!
+
+ifndef ARCHOS
+ ARCHOS = @ARCHOS@
+endif
+
+# It is important to build without NATIVECAML first,to generate the
+# proper dependencies
+all: patch
+ $(MAKE) -C cil cillib NATIVECAML=
+ifndef BYTECODE
+ $(MAKE) -C cil cillib NATIVECAML=1
+endif
+ $(MAKE) deputy deputylib
+ifndef BYTECODE
+ $(MAKE) deputy deputylib NATIVECAML=1
+# For some strange reason the bytecode cil library is remade, which triggers
+# a remake of the deputy.byte.exe, but not the .asm.exe. This means that
+# we keep using the bytecode version of deputy. We force the .asm version to
+# be the most recent one
+ touch obj/$(ARCHOS)/deputy.asm.exe
+endif
+# $(MAKE) -f src/instrumenter/Makefile
+
+# Look out for outdated Makefile; if it's out of date, this will automatically
+# re-run ./config.status, then re-exec make with the same arguments.
+Makefile: config.status Makefile.in
+ @echo "Rebuilding the Makefile"
+ ./$<
+
+config.status: configure
+ ./$@ --recheck
+
+configure: configure.ac
+ autoconf
+
+
+DEPUTY_VERSION = @DEPUTY_VERSION@
+
+ifdef RELEASE
+ UNSAFE := 1
+endif
+
+ifndef DEPUTYHOME
+ DEPUTYHOME = @DEPUTYHOME@
+endif
+
+ifeq (@USE_CVCL@, yes)
+ ifndef CVCLLIB
+ CVCLLIB = @CVCLLIB@
+ endif
+ ifndef CVCLINC
+ CVCLINC = @CVCLINC@
+ endif
+ ifndef OCAMLINC
+ OCAMLINC = @OCAMLINC@
+ endif
+endif
+
+ifeq (@USE_YICES@, yes)
+ ifndef YICESLIB
+ YICESLIB = @YICESLIB@
+ endif
+ ifndef YICESINC
+ YICESINC = @YICESINC@
+ endif
+ ifndef OCAMLINC
+ OCAMLINC = @OCAMLINC@
+ endif
+endif
+
+ifeq (@USE_SATURN@, yes)
+ ifndef SATURNHOME
+ SATURNHOME = @SATURNHOME@
+ endif
+endif
+
+#
+# Deputy executable
+#
+
+OBJDIR = obj/$(ARCHOS)
+DEPENDDIR = obj/.depend
+
+SOURCEDIRS = src src/infer src/optimizer src/optimizer/xhtml \
+ src/optimizer/ptranal/cilPtrAnal src/instrumenter \
+ src/optimizer/oct/mineOct
+
+ifeq (@USE_CVCL@, yes)
+ SOURCEDIRS += src/optimizer/solver/cvclSolver
+#else
+# SOURCEDIRS += src/optimizer/solver/nullSolver
+endif
+
+ifeq (@USE_YICES@, yes)
+ SOURCEDIRS += src/optimizer/solver/yicesSolver
+else
+ SOURCEDIRS += src/optimizer/solver/nullSolver
+endif
+
+ifeq (@USE_SATURN@, yes)
+ SOURCEDIRS += src/optimizer/modref/saturnModRef
+else
+ SOURCEDIRS += src/optimizer/modref/zraModRef
+endif
+
+MODULES = doptions dutil dattrs dcanonexp dcheckdef dsolverfront
+ifeq (@USE_CVCL@, yes)
+ MODULES += cvcl
+endif
+
+ifeq (@USE_YICES@, yes)
+ MODULES += yices
+endif
+MODULES += solverInterface ptrnode unionfind dvararg markptr \
+ type solver controlflow inferkinds \
+ doptimutil dpatch dprecfinder dptranal dmodref \
+ dflowinsens dflowsens dfwdsubst ddupcelim \
+ dloopoptim dcheckstrengthen dcheckhoister dfailfinder\
+ oct doctanalysis dnonnullfinder xML xHTML dfdatbrowser\
+ doptimmain dglobinit dlocals dpoly dcheck \
+ dtaint dinstrumenter dinfer main
+
+COMPILEFLAGS = -I cil/obj/$(ARCHOS)
+LINKFLAGS = -I cil/obj/$(ARCHOS)
+
+# For building interface to octagon library
+CAML_CFLAGS += -ccopt -Isrc/optimizer/oct/mineOct
+MINE_OCT_CMODULES = oct_ocaml oct_sem oct_util
+
+ifeq (@USE_SATURN@, yes)
+ COMPILEFLAGS += -I $(SATURNHOME)/bdb
+ COMPILEFLAGS += -I $(SATURNHOME)/lang
+ COMPILEFLAGS += -I $(SATURNHOME)/util
+ COMPILEFLAGS += -I $(SATURNHOME)/mlevent
+
+ LINKFLAGS += -I $(SATURNHOME)/bdb
+ LINKFLAGS += -I $(SATURNHOME)/lang
+ LINKFLAGS += -I $(SATURNHOME)/util
+ LINKFLAGS += -I $(SATURNHOME)/mlevent
+endif
+
+ifeq (@USE_CVCL@, yes)
+ ifdef NATIVECAML
+ ENDLINKFLAGS = -cclib -L$(CVCLLIB) -cclib -lcvclite -cclib -lstdc++ -cclib -lgmp
+ else
+ ENDLINKFLAGS = -cclib -L$(CVCLLIB) -cclib -lcvclite -cclib -lstdc++ -cclib -lgmp
+ endif
+else
+ ENDLINKFLAGS =
+endif
+
+ifeq (@USE_YICES@, yes)
+ ifdef NATIVECAML
+ ENDLINKFLAGS = -cclib -L$(YICESLIB) -cclib -lyices -cclib -lstdc++ -cclib -lgmp
+ else
+ ENDLINKFLAGS = -cclib -L$(YICESLIB) -cclib -lyices -cclib -lstdc++ -cclib -lgmp
+ endif
+else
+ ENDLINKFLAGS =
+endif
+
+ifeq (@USE_SATURN@, yes)
+ ENDLINKFLAGS = -cclib -ldb -cclib -lz -cclib -levent
+else
+ ENDLINKFLAGS =
+endif
+
+ifeq (@USE_CVCL@, yes)
+ CAML_CFLAGS += -ccopt -I$(OCAMLINC) -ccopt -I$(CVCLINC)
+endif
+
+ifeq (@USE_YICES@, yes)
+ CAML_CFLAGS += -ccopt -I$(OCAMLINC) -ccopt -I$(YICESINC)
+endif
+
+include cil/ocamlutil/Makefile.ocaml
+
+PROJECT_EXECUTABLE = $(OBJDIR)/deputy$(EXE)
+PROJECT_MODULES = $(MODULES)
+ifeq (@USE_CVCL@, yes)
+ CVCL_CMODULES = cvcl_ocaml_wrappers
+else
+ CVCL_CMODULES =
+endif
+
+ifeq (@USE_YICES@, yes)
+ YICES_CMODULES = yices_ocaml_wrappers
+else
+ YICES_CMODULES =
+endif
+
+ifeq (@USE_SATURN@, yes)
+ SATURN_EXT_CMODS += $(SATURNHOME)/bdb/cl_bdb
+ SATURN_EXT_CMODS += $(SATURNHOME)/mlevent/event_stubs
+ SATURN_EXT_CMODS += $(SATURNHOME)/util/gzstr
+endif
+
+PROJECT_CMODULES = $(CVCL_CMODULES) $(YICES_CMODULES) $(MINE_OCT_CMODULES)
+EXT_PROJ_CMODS = $(SATURN_EXT_CMODS)
+
+PROJECT_LIBS = unix str cil nums
+
+ifeq (@USE_SATURN@, yes)
+ EXT_PROJ_MODS += vector prioqueue clpautil signal bdb libevent \
+ flags streamio hashcons spec specio
+endif
+
+# find the cil library
+vpath %.$(CMXA) cil/obj/$(ARCHOS)
+
+# Make sure that the Deputy files depend on the CIL library
+# Choose just one file on which everybody depends
+$(OBJDIR)/doptions.$(CMO): cil.$(CMXA)
+$(OBJDIR)/markptr.cmi $(OBJDIR)/ptrnode.cmi $(OBJDIR)/inferkinds.cmi: \
+ cil/obj/$(ARCHOS)/cil.cmi
+
+$(PROJECT_EXECUTABLE) : $(PROJECT_MODULES:%=$(OBJDIR)/%.$(CMO)) \
+ $(PROJECT_CMODULES:%=$(OBJDIR)/%.$(CMC)) \
+ cil.$(CMXA)
+ @$(NARRATIVE) "Linking $(COMPILETOWHAT) $@ $(LINKMSG)"
+ $(AT)$(CAMLLINK) -verbose -o $@ \
+ $(PROJECT_LIBS:%=%.$(CMXA)) \
+ $(EXT_PROJ_MODS:%=%.$(CMO)) \
+ $(PROJECT_MODULES:%=$(OBJDIR)/%.$(CMO)) \
+ $(EXT_PROJ_CMODS:%=%.$(OBJ)) \
+ $(PROJECT_CMODULES:%=$(OBJDIR)/%.$(CMC)) \
+ $(ENDLINKFLAGS)
+
+deputy: $(PROJECT_EXECUTABLE)
+
+#
+# Deputy runtime library
+#
+
+include cil/Makefile.gcc
+
+DEPUTY_LIBC = $(OBJDIR)/deputy_libc.$(OBJ)
+DEPUTY_LIBC_DEBUG = $(OBJDIR)/deputy_libc_debug.$(OBJ)
+DEPUTY_LINUX = $(OBJDIR)/deputy_linux.$(OBJ)
+
+#INSTR_LIB = $(OBJDIR)/instr_glob_state.$(OBJ)
+
+$(DEPUTY_LIBC): lib/deputy_libc.c include/deputy/checks.h
+ $(CC) $(CONLY) -g -O3 -D_GNUCC $(WARNALL) \
+ $(INC)$(DEPUTYHOME)/include $(OBJOUT)$@ $<
+
+#$(INSTR_LIB): lib/instr_glob_state.c
+# $(CC) $(CONLY) -g -O3 -D_GNUCC $(WARNALL) \
+# `oct-config --cflags` $(INC)$(DEPUTYHOME)/include $(OBJOUT)$@ $<
+
+ifeq (@USE_LINUX@, yes) # USE_LINUX
+LINUX_DIR = @LINUX_DIR@
+$(DEPUTY_LINUX): lib/deputy_linux.c
+ $(CC) -O -g -D__KERNEL__ \
+ -I$(LINUX_DIR)/include \
+ -I$(LINUX_DIR)/include/asm-i386/mach-default \
+ -Iinclude \
+ -include $(LINUX_DIR)/include/linux/nodeputy.h \
+ $(CONLY) $(OBJOUT)$@ $^
+else
+$(DEPUTY_LINUX): lib/deputy_linux.c
+endif
+
+deputylib: $(DEPUTY_LIBC) $(DEPUTY_LINUX) #$(INSTR_LIB)
+
+#
+# Patched libc includes
+#
+
+PATCH = $(DEPUTYHOME)/include/libc_patch.h
+PATCH_PP = $(PATCH:.h=.i)
+
+$(PATCH_PP): $(PATCH)
+ $(CC) -E -include $(DEPUTYHOME)/include/deputy/annots.h -o $@ $^
+
+.PHONY: patch
+patch: $(PATCH_PP)
+
+#
+# Testing and cleanup
+#
+
+quicktest:
+ cd test/small && make runall/deref1 runall/infer1 && \
+ echo && echo "*** Quicktest was successful" && echo
+
+clean:
+ rm -f $(OBJDIR)/*.* $(DEPENDDIR)/*.*
+
+realclean: cleancaml
+ cd cil && make clean
+
+#
+# Distribution
+#
+
+# Make a distribution that excludes certain files. We exclude the
+# toplevel Makefile from here, since otherwise it's difficult to avoid
+# excluding *all* Makefiles, which would be bad.
+dist: realclean
+ cd .. && mv deputy deputy-$(DEPUTY_VERSION) && \
+ tar zcvf deputy-$(DEPUTY_VERSION).tar.gz \
+ --exclude-from deputy-$(DEPUTY_VERSION)/.distexclude \
+ --exclude deputy-$(DEPUTY_VERSION)/Makefile \
+ deputy-$(DEPUTY_VERSION) && \
+ mv deputy-$(DEPUTY_VERSION) deputy
+
+#
+# Documentation
+#
+# make doc - creates the documentation
+# make publish_doc - creates the documentation and puts it on the web page
+#
+
+doc/deputy.1.gz: doc/deputy.1
+ gzip -c $< > $@
+
+doc/deputypp.tex: doc/deputycode.pl doc/deputy.tex
+ -rm -rf doc/html/deputy
+ -mkdir doc/html/deputy
+ -mkdir doc/html/deputy/examples
+ cd doc; perl deputycode.pl deputy.tex deputypp.tex
+
+# Documentation generated from latex files using "hevea"
+texdoc: doc/deputypp.tex
+# Create the version document
+ cd doc/html/deputy; echo "\def\deputyversion{@DEPUTY_VERSION@}">deputy.version.tex
+ cd doc/html/deputy; hevea -exec xxdate.exe ../../deputypp
+ cd doc/html/deputy; hevea -exec xxdate.exe ../../deputypp
+ cd doc/html/deputy; mv deputypp.html deputy.html
+ cd doc/html/deputy; hacha -o deputytoc.html deputy.html
+ cp -f doc/index.html doc/html/deputy/index.html
+ cp -f doc/header.html doc/html/deputy
+
+pdfdoc: doc/deputypp.tex
+ cd doc; echo "\def\deputyversion{@DEPUTY_VERSION@}" >deputy.version.tex
+ cd doc; pdflatex deputypp.tex
+ cd doc; mv deputypp.pdf html/deputy/DEPUTY.pdf
+
+.PHONY: doc texdoc pdfdoc
+doc: texdoc pdfdoc
+
+DEPUTY_HTML_DEST = /var/www/deputy
+publish_distrib: publish_doc
+
+publish_doc: doc
+ if test -d $(DEPUTY_HTML_DEST); then \
+ cp -rf doc/html/deputy/* $(DEPUTY_HTML_DEST); \
+ echo "Done publishing doc"; \
+ else \
+ error "Cannot publish because $(DEPUTY_HTML_DEST) does not exist" ; \
+ fi
+
+#
+# Installation
+#
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+
+BINDISTRIB_BIN = bin/deputy $(OBJDIR)/deputy.asm.exe $(OBJDIR)/deputy.byte.exe
+BINDISTRIB_LIB = lib/Deputy.pm cil/bin/CilConfig.pm cil/lib/Cilly.pm \
+ cil/lib/KeptFile.pm cil/lib/TempFile.pm cil/lib/OutputFile.pm \
+ $(OBJDIR)/deputy_libc.o
+BINDISTRIB_INCLUDE = include/libc_patch.i
+BINDISTRIB_INCLUDE_DEPUTY = include/deputy/annots.h include/deputy/checks.h
+
+BINDISTRIB_ALL = $(BINDISTRIB_BIN) $(BINDISTRIB_LIB) \
+ $(BINDISTRIB_INCLUDE) $(BINDISTRIB_INCLUDE_DEPUTY)
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+libdir = @libdir@
+pkglibdir = $(libdir)/deputy
+
+install-base: $(BINDISTRIB_ALL)
+ $(INSTALL) -d $(DESTDIR)$(prefix)/bin
+ $(INSTALL) -d $(DESTDIR)$(pkglibdir)
+ $(INSTALL) -d $(DESTDIR)$(pkglibdir)/bin
+ $(INSTALL) -d $(DESTDIR)$(pkglibdir)/lib
+ $(INSTALL) -d $(DESTDIR)$(pkglibdir)/include/deputy
+ $(INSTALL_PROGRAM) $(BINDISTRIB_BIN) $(DESTDIR)$(pkglibdir)/bin
+ $(INSTALL_DATA) $(BINDISTRIB_LIB) $(DESTDIR)$(pkglibdir)/lib
+ $(INSTALL_DATA) $(BINDISTRIB_INCLUDE) $(DESTDIR)$(pkglibdir)/include
+ $(INSTALL_DATA) $(BINDISTRIB_INCLUDE_DEPUTY) \
+ $(DESTDIR)$(pkglibdir)/include/deputy
+ ln -sf ../lib/deputy/bin/deputy $(DESTDIR)$(prefix)/bin/deputy
+
+# We handle the man page separately, since Debian has its own utility
+# for installing man pages, whereas RPM wants us to do it.
+
+BINDISTRIB_MAN = doc/deputy.1.gz
+
+install-man: $(BINDISTRIB_MAN)
+ $(INSTALL) -d $(DESTDIR)$(prefix)/man/man1
+ $(INSTALL_DATA) $(BINDISTRIB_MAN) $(DESTDIR)$(prefix)/man/man1
+
+# And now for normal users who want everything installed...
+
+install: install-base install-man
+
+#
+# Install the web interface
+#
+
+installweb: all $(DEPUTY_HTML_DEST)
+# Copy over the files needed for running Deputy
+ mkdir -p $(DEPUTY_HTML_DEST)/bin
+ cp bin/deputy $(DEPUTY_HTML_DEST)/bin
+ mkdir -p $(DEPUTY_HTML_DEST)/cil
+ mkdir -p $(DEPUTY_HTML_DEST)/cil/bin
+# Now copy over CilConfig.pm but change the directory names
+ cat cil/bin/CilConfig.pm \
+ | sed -e 's|@DEPUTYHOME@|$(DEPUTY_HTML_DEST)|g' \
+ >$(DEPUTY_HTML_DEST)/cil/bin/CilConfig.pm
+
+ mkdir -p $(DEPUTY_HTML_DEST)/obj/@ARCHOS@
+ cp $(foreach f, deputy.asm.exe deputy_libc.o, \
+ obj/@ARCHOS@/$(f)) \
+ $(DEPUTY_HTML_DEST)/obj/@ARCHOS@
+
+ mkdir -p $(DEPUTY_HTML_DEST)/cil/lib
+ cp $(foreach f, Cilly.pm KeptFile.pm \
+ TempFile.pm OutputFile.pm, \
+ cil/lib/$(f)) \
+ $(DEPUTY_HTML_DEST)/cil/lib
+
+ mkdir -p $(DEPUTY_HTML_DEST)/lib
+ cp lib/Deputy.pm $(DEPUTY_HTML_DEST)/lib
+
+ mkdir -p $(DEPUTY_HTML_DEST)/include
+ cp -r include $(DEPUTY_HTML_DEST)
+
+ mkdir -p $(DEPUTY_HTML_DEST)/web/tmp
+ chmod a+wx $(DEPUTY_HTML_DEST)/web/tmp
+ cp $(foreach f, .htaccess web-driver.cgi index.html, \
+ web/$(f)) \
+ $(DEPUTY_HTML_DEST)/web
+ chmod a+x $(DEPUTY_HTML_DEST)/web/web-driver.cgi
+
+ mkdir -p $(DEPUTY_HTML_DEST)/test/small
+ chmod a+w $(DEPUTY_HTML_DEST)/test/small
+ cp $(foreach f, array2.c, \
+ test/small/$(f)) \
+ $(DEPUTY_HTML_DEST)/test/small
diff --git a/bin/.cvsignore b/bin/.cvsignore
new file mode 100755
index 0000000..29da440
--- /dev/null
+++ b/bin/.cvsignore
@@ -0,0 +1,2 @@
+DeputyConfig.pm
+patcher.bat
diff --git a/bin/deputy b/bin/deputy
new file mode 100755
index 0000000..a6598ea
--- /dev/null
+++ b/bin/deputy
@@ -0,0 +1,60 @@
+#!/usr/bin/perl
+#
+# Copyright (c) 2006,
+# George C. Necula
+# Jeremy Condit
+# Matt Harren
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. The names of the contributors may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# The main driver for the Deputy system.
+#
+
+use strict;
+
+use FindBin;
+use lib "$FindBin::RealBin/../lib";
+use lib "$FindBin::RealBin/../cil/bin";
+use lib "$FindBin::RealBin/../cil/lib";
+
+use CilConfig;
+use Deputy;
+
+$::deputyhome = "$FindBin::RealBin/..";
+
+# Now force the libc patch.
+if (! grep { $_ eq "--linux" } @ARGV) {
+ push @ARGV, "--patch=$::deputyhome/include/libc_patch.i";
+}
+
+Deputy->new(@ARGV)->doit();
+
+exit(0);
diff --git a/cil/.cvsignore b/cil/.cvsignore
new file mode 100644
index 0000000..28a8517
--- /dev/null
+++ b/cil/.cvsignore
@@ -0,0 +1,38 @@
+camlprim0.obj
+*.a
+*.o
+*.obj
+*.i
+*.pdb
+*.s
+*.asm
+*.out
+allheaders
+allcfiles
+allmlfiles
+.emacs.desktop
+out
+site-config.mk
+__scalar2pointer.txt
+*.log
+tmp*
+*.log.prev
+make.out*
+odoc
+Makefile
+Makefile.features
+config.status
+*.tar.gz
+.ccuredrc
+allsrcs
+TEMP_cil-distrib
+TEMP_ccured_distrib
+.gdbinit
+autom4te*.cache
+config.h
+cil.spec
+cvss.txt
+configure.lineno
+confstat*
+config.mk
+TEMP_cil-bindistrib
diff --git a/cil/Bootstrap b/cil/Bootstrap
new file mode 100755
index 0000000..08bf15c
--- /dev/null
+++ b/cil/Bootstrap
@@ -0,0 +1,3 @@
+#!/bin/sh -x
+
+autoconf
diff --git a/cil/INSTALL b/cil/INSTALL
new file mode 100644
index 0000000..ef7846f
--- /dev/null
+++ b/cil/INSTALL
@@ -0,0 +1,41 @@
+
+ (For more complete installation instructions see the documentation in
+ doc/html.)
+
+ Building from source (see below for installing binary distributions)
+---------------------------------------------------------------------
+
+ 1. If you use Windows, you must first install cygwin.
+
+ 2. You must install OCaml version 3.08 or higher (see instructions at
+ http://caml.inria.fr/ocaml). The recommended build process is using
+ the cygwin version of ocaml.
+
+ You can also build with Microsoft Visual Studio, but you must still have
+ cygwin during the build process. See msvcbuild.cmd.
+
+ 3. Download and unpack the distribution.
+
+ 4. Run ./configure (from within bash if on Windows)
+
+ 5. Run make
+
+ 6. Run make check
+
+ Now you can start using bin/cilly and bin/ccured as explained in the
+ documentation (in doc/html).
+
+
+ Installing binary distributions (Windows-only)
+-----------------------------------------------
+
+ 1. Unpack the installation package
+
+ 2. Change CILHOME to the full path of the diretory where you put cil, in
+ the following files: bin/CilConfig.pm, bin/cilly.bat, bin/patcher.bat
+ 3. Go to test/small1 directory and run
+ ..\..\cilly /c hello.c
+
+
+
+
\ No newline at end of file
diff --git a/cil/LICENSE b/cil/LICENSE
new file mode 100644
index 0000000..698cec0
--- /dev/null
+++ b/cil/LICENSE
@@ -0,0 +1,36 @@
+Copyright (c) 2001-2007,
+ George C. Necula
+ Scott McPeak
+ Wes Weimer
+ Ben Liblit
+ Matt Harren
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. The names of the contributors may not be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+(See http://www.opensource.org/licenses/bsd-license.php)
diff --git a/cil/Makefile.gcc b/cil/Makefile.gcc
new file mode 100644
index 0000000..8fae4e3
--- /dev/null
+++ b/cil/Makefile.gcc
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+# Makefile for CCured. The gcc part
+
+
+COMPILERNAME := GNUCC
+
+CC := gcc
+ifdef RELEASELIB
+ # sm: I will leave this here, but only use it for compiling our runtime lib
+ CFLAGS := -D_GNUCC -Wall -O3
+else
+ CFLAGS := -D_GNUCC -Wall -g -ggdb -D_DEBUG
+endif
+
+# dsw: added optional -pg flag
+ifdef USE_PG
+ CFLAGS += -pg
+endif
+
+ifdef NO_OPTIMIZATION
+ OPT_O2 :=
+else
+ OPT_O2 := -O2
+endif
+CONLY := -c
+OBJOUT := -o
+OBJEXT := o
+LIBEXT := a
+EXEOUT := -o
+LDEXT :=
+DEF := -D
+ASMONLY := -S -o
+WARNALL := -Wall
+# sm: shuffled around a couple things so I could use CPPSTART for patch2
+CPPSTART := gcc -E -x c -Dx86_LINUX -D_GNUCC -I/usr/include/sys
+CPPOUT := -o %o
+CPP := $(CPPSTART) -include fixup.h %i $(CPPOUT)
+INC := -I
+
+# sm: disable patching for now ('true' has no output)
+# (set it to 'echo' to re-enable)
+ifndef PATCHECHO
+ PATCHECHO := echo
+endif
+
+AR := ar
+LIBOUT := -rs
+
+# The system include files to be patched
+PATCH_SYSINCLUDES := crypt.h ctype.h fcntl.h glob.h grp.h malloc.h netdb.h \
+ pthread.h pwd.h signal.h stdarg.h stdio.h stdlib.h \
+ string.h time.h unistd.h varargs.h arpa/inet.h \
+ sys/cdefs.h sys/fcntl.h sys/ioctl.h sys/socket.h \
+ sys/stat.h sys/types.h sys/uio.h malloc.h setjmp.h
+
+ifneq ($(ARCHOS), x86_WIN32)
+PATCH_SYSINCLUDES += sys/shm.h
+endif
+
+# dsw & sm: DON'T DO THIS. See comment in ccured_GNUCC.patch, search for 'sys/io.h'.
+# PATCH_SYSINCLUDES += sys/io.h
+
+# matth: reent.h is only in Cygwin, and Cygwin defines struct sigaction
+# in sys/signal.h:
+ifeq ($(ARCHOS), x86_WIN32)
+PATCH_SYSINCLUDES += sys/reent.h sys/signal.h
+endif
+
+# matth: these files are not in Cygwin
+ifeq ($(ARCHOS), x86_LINUX)
+PATCH_SYSINCLUDES += nl_types.h bits/sigaction.h bits/select.h sys/prctl.h \
+ libgen.h shadow.h
+endif
+
+
diff --git a/cil/Makefile.in b/cil/Makefile.in
new file mode 100644
index 0000000..f92ba0b
--- /dev/null
+++ b/cil/Makefile.in
@@ -0,0 +1,663 @@
+# -*- Mode: makefile -*-
+
+# Makefile for the cil wrapper
+# @do_not_edit@ Makefile.in
+#
+# author: George Necula
+
+#
+# If you want to add extra CIL features, you do not always need to change
+# this file. Just invoke
+# ./configure EXTRASRCDIRS=/home/foodir EXTRAFEATURES="foo bar"
+# This will add two features that must be defined in foo.ml and bar.ml
+#
+
+# Debugging. Set ECHO= to debug this Makefile
+.PHONY: setup quickbuild doc distrib machdep cilversion
+ECHO = @
+
+# It is important to build quickbuild first,to generate the proper dependencies
+all: quickbuild setup
+
+# Now add the defines for the CIL features
+include Makefile.features
+
+
+# look out for outdated Makefile; if it's out of date, this will automatically
+# re-run ./config.status, then re-exec make with the same arguments
+Makefile: config.status Makefile.in
+ ./$<
+
+config.status: configure
+ ./$@ --recheck
+
+configure: configure.in aclocal.m4
+ autoconf
+
+ocamlutil/perfcount.c: config.status ocamlutil/perfcount.c.in
+ ./$<
+
+@DEFAULT_COMPILER@=1
+
+
+
+ifdef RELEASE
+ NATIVECAML := 1
+ UNSAFE := 1
+endif
+
+ifndef ARCHOS
+ ARCHOS=@ARCHOS@
+endif
+
+# Put here all the byproducts of make
+OBJDIR := obj/$(ARCHOS)
+DEPENDDIR := obj/.depend
+
+CILLY_FEATURES :=
+ifdef USE_BLOCKINGGRAPH
+ CILLY_FEATURES += blockinggraph
+endif
+ifdef USE_ZRAPP
+ CILLY_FEATURES += rmciltmps zrapp
+endif
+# Add the EXTRAFEATURES
+CILLY_FEATURES += @EXTRAFEATURES@
+
+ # Now rules to make cilly
+CILLY_LIBRARY_MODULES = pretty inthash errormsg alpha trace stats util clist \
+ cilutil escape longarray growArray\
+ cabs cabshelper cabsvisit whitetrack cprint lexerhack machdep machdepenv cparser clexer \
+ cilversion cil cillower formatparse formatlex formatcil cabs2cil \
+ patch frontc check mergecil \
+ dataflow dominators bitmap ssa ciltools \
+ usedef logcalls logwrites rmtmps \
+ callgraph epicenter heapify \
+ setp uref olf ptranal \
+ canonicalize heap oneret partial simplemem simplify \
+ dataslicing sfi expcompare\
+ cfg liveness reachingdefs deadcodeelim availexps \
+ availexpslv predabst\
+ testcil \
+ $(CILLY_FEATURES) \
+ ciloptions feature_config
+# ww: we don't want "main" in an external cil library (cil.cma),
+# otherwise every program that links against that library will get
+# main's argument checking and whatnot ...
+CILLY_MODULES = $(CILLY_LIBRARY_MODULES) main
+CILLY_CMODULES = perfcount
+CILLY_LIBS = unix str
+
+SOURCEDIRS += src src/frontc src/ext src/ext/pta ocamlutil @EXTRASRCDIRS@
+MLLS += clexer.mll formatlex.mll
+MLYS += cparser.mly formatparse.mly
+MODULES += $(CILLY_MODULES) libmaincil
+
+BEFOREDEPS += $(OBJDIR)/machdep.ml
+BEFOREDEPS += $(OBJDIR)/cilversion.ml
+BEFOREDEPS += $(OBJDIR)/feature_config.ml
+
+ # Include now the common set of rules for OCAML
+include ocamlutil/Makefile.ocaml
+
+
+ # Now the rule to make cilly
+
+cilly: $(OBJDIR)/cilly$(EXE)
+$(OBJDIR)/cilly$(EXE) : $(CILLY_MODULES:%=$(OBJDIR)/%.$(CMO)) \
+ $(CILLY_CMODULES:%=$(OBJDIR)/%.$(CMC))
+ @$(NARRATIVE) "Linking $(COMPILETOWHAT) $@ $(LINKMSG)"
+ $(AT)$(CAMLLINK) -verbose -o $@ \
+ $(CILLY_LIBS:%=%.$(CMXA)) \
+ $(CILLY_LIBS:%=-cclib -l%) \
+ $^
+
+
+quickbuild: cilversion machdep cilly
+
+# Setup also makes the native code versions
+#
+# sm: cillib is only built with NATIVECAML=1 because it builds libcil.a,
+# which requires native-code .cmx compiled modules... could break it
+# into two targets so we build cil.cma both ways, but no one is using
+# cil.cma now so I'll leave it alone
+setup: cilversion machdep
+ $(MAKE) cilly NATIVECAML=
+ $(MAKE) cilly NATIVECAML=1
+ $(MAKE) cillib NATIVECAML=
+ $(MAKE) cillib NATIVECAML=1
+
+# Create the machine dependency module
+# If the cl command cannot be run then the MSVC part will be identical to GCC
+.PHONY : machdep
+machdep: $(OBJDIR)/machdep.ml
+$(OBJDIR)/machdep.ml : src/machdep-ml.c configure.in Makefile.in
+ rm -f $@
+ mkdir -p $(OBJDIR)
+ echo "(* This module was generated automatically by code in Makefile and $($@
+# Now generate the type definition
+ echo "type mach = {" >> $@
+ echo " version_major: int; (* Major version number *)" >> $@
+ echo " version_minor: int; (* Minor version number *)" >> $@
+ echo " version: string; (* gcc version string *)" >> $@
+ echo " underscore_name: bool; (* If assembly names have leading underscore *)" >> $@
+ echo " sizeof_short: int; (* Size of \"short\" *)" >> $@
+ echo " sizeof_int: int; (* Size of \"int\" *)" >> $@
+ echo " sizeof_long: int ; (* Size of \"long\" *)" >> $@
+ echo " sizeof_longlong: int; (* Size of \"long long\" *)" >> $@
+ echo " sizeof_ptr: int; (* Size of pointers *)" >> $@
+ echo " sizeof_enum: int; (* Size of enum types *)" >> $@
+ echo " sizeof_float: int; (* Size of \"float\" *)" >> $@
+ echo " sizeof_double: int; (* Size of \"double\" *)" >> $@
+ echo " sizeof_longdouble: int; (* Size of \"long double\" *)" >> $@
+ echo " sizeof_void: int; (* Size of \"void\" *)" >> $@
+ echo " sizeof_fun: int; (* Size of function *)" >> $@
+ echo " size_t: string; (* Type of \"sizeof(T)\" *)" >> $@
+ echo " wchar_t: string; (* Type of \"wchar_t\" *)" >> $@
+ echo " alignof_short: int; (* Alignment of \"short\" *)" >> $@
+ echo " alignof_int: int; (* Alignment of \"int\" *)" >> $@
+ echo " alignof_long: int; (* Alignment of \"long\" *)" >> $@
+ echo " alignof_longlong: int; (* Alignment of \"long long\" *)" >> $@
+ echo " alignof_ptr: int; (* Alignment of pointers *)" >> $@
+ echo " alignof_enum: int; (* Alignment of enum types *)" >> $@
+ echo " alignof_float: int; (* Alignment of \"float\" *)" >> $@
+ echo " alignof_double: int; (* Alignment of \"double\" *)" >> $@
+ echo " alignof_longdouble: int; (* Alignment of \"long double\" *)" >> $@
+ echo " alignof_str: int; (* Alignment of strings *)" >> $@
+ echo " alignof_fun: int; (* Alignment of function *)" >> $@
+ echo " alignof_aligned: int; (* Alignment of anything with the \"aligned\" attribute *)" >> $@
+ echo " char_is_unsigned: bool; (* Whether \"char\" is unsigned *)">> $@
+ echo " const_string_literals: bool; (* Whether string literals have const chars *)">> $@
+ echo " little_endian: bool; (* whether the machine is little endian *)">>$@
+ echo " __thread_is_keyword: bool; (* whether __thread is a keyword *)">>$@
+ echo " __builtin_va_list: bool; (* whether __builtin_va_list is builtin (gccism) *)">>$@
+ echo "}" >> $@
+ if gcc -D_GNUCC $< -o $(OBJDIR)/machdep-ml.exe ;then \
+ echo "machdep-ml.exe created succesfully." \
+ ;else \
+ rm -f $@; exit 1 \
+ ;fi
+ echo "let gcc = {" >>$@
+ $(OBJDIR)/machdep-ml.exe >>$@
+ echo " underscore_name = @UNDERSCORE_NAME@ ;" >> $@
+ echo " __builtin_va_list = @HAVE_BUILTIN_VA_LIST@ ;" >>$@
+ echo " __thread_is_keyword = @THREAD_IS_KEYWORD@ ;" >>$@
+ echo "}" >>$@
+ if cl /D_MSVC $< /Fe$(OBJDIR)/machdep-ml.exe /Fo$(OBJDIR)/machdep-ml.obj ;then \
+ echo "let hasMSVC = true" >>$@ \
+ ;else \
+ echo "let hasMSVC = false" >>$@ ;fi
+ echo "let msvc = {" >>$@
+ $(OBJDIR)/machdep-ml.exe >>$@
+ echo " underscore_name = true ;" >> $@
+ echo " __builtin_va_list = @HAVE_BUILTIN_VA_LIST@ ;" >>$@
+ echo " __thread_is_keyword = @THREAD_IS_KEYWORD@ ;" >>$@
+ echo "}" >>$@
+ echo "let theMachine : mach ref = ref gcc" >>$@
+
+
+#
+# Create the version information module
+.PHONY: cilversion
+cilversion: $(OBJDIR)/cilversion.ml
+$(OBJDIR)/cilversion.ml: src/cilversion.ml.in config.status
+ rm -f $@
+ ./config.status --file=$@:$<
+
+# build two libraries
+.PHONY: cillib libcil
+ifeq ($(NATIVECAML),1)
+cillib: $(OBJDIR)/cil.$(CMXA) $(OBJDIR)/libcil.a
+else
+cillib: $(OBJDIR)/cil.$(CMXA)
+endif
+
+
+$(OBJDIR)/feature_config.ml: config.status
+ rm -f $(OBJDIR)/feature_config.*
+ echo "(* This module was generated automatically by code in Makefile.in *)" >$@
+# The Cilly feature options. A list of Cil.featureDescr
+ echo "open Cil" >>$@
+ echo "let features : featureDescr list = [" >> $@
+ifdef USE_BLOCKINGGRAPH
+ echo " Blockinggraph.feature;" >> $@
+endif
+ifdef USE_RAND
+ echo " Rand.feature;" >> $@
+endif
+ifdef USE_ARITHABS
+ echo " Arithabs.feature;" >>$@
+endif
+ifdef USE_ZRAPP
+ echo " Zrapp.feature;" >> $@
+endif
+# Now the extra features, with the first letter capitalized
+ echo -n " (* EXTRAFEATURES: *)" >> $@
+ echo \
+ $(foreach f,@EXTRAFEATURES@, \
+ "\n "`echo $f | cut -c 1 | tr "[a-z]" "[A-Z]"``echo $f | cut -c 2-`".feature;") \
+ | perl -pe 's/\\n/\n/g' >> $@
+ echo "]" >>$@
+
+
+
+
+
+
+OCAML_CIL_LIB_MODULES := $(CILLY_LIBRARY_MODULES)
+OCAML_CIL_LIB_CMODULES := perfcount
+
+# list of modules to use for building a library; remove 'main'
+# and add 'libmaincil'
+OCAML_CIL_C_LIB_MODULES := $(CILLY_MODULES:main=) libmaincil
+
+# Build an OCAML library (CMA / CMXA) that exports our Cil stuff
+$(OBJDIR)/cil.$(CMXA): $(OCAML_CIL_LIB_CMODULES:%=$(OBJDIR)/lib%.a) \
+ $(OCAML_CIL_LIB_MODULES:%=$(OBJDIR)/%.$(CMO))
+ $(CAMLLINK) -a -o $@ -ccopt -L$(pkglibdir) \
+ $(OCAML_CIL_LIB_CMODULES:%=-cclib -l%) \
+ $(OCAML_CIL_LIB_MODULES:%=$(OBJDIR)/%.$(CMO))
+
+$(OBJDIR)/libperfcount.a: %: %($(OBJDIR)/perfcount.$(CMC))
+ ranlib $@
+
+# sm: for Simon: build a library of CIL functions which can
+# be called from C code; this is like the target above, except
+# it is callable from C instead of from Ocaml
+ifeq ($(NATIVECAML),1)
+$(OBJDIR)/libcil.a: $(OCAML_CIL_LIB_CMODULES:%=$(OBJDIR)/lib%.a) \
+ $(OCAML_CIL_LIB_MODULES:%=$(OBJDIR)/%.$(CMO))
+ ocamlopt -output-obj -o $@ $(CILLY_LIBS:%=%.cmxa) $^
+else
+$(OBJDIR)/libcil.a:
+ @echo "Can only build $@ when NATIVECAML is 1."
+ exit 2
+endif
+
+# Test cil
+ifdef _MSVC
+TESTCILARG=--MSVC --testcil "bash msvctestcil"
+else
+TESTCILARG= --testcil "bash gcctestcil"
+endif
+
+.PHONY: testcil
+testcil: $(OBJDIR)/cilly$(EXE)
+ cd test; ../$(OBJDIR)/cilly$(EXE) $(TESTCILARG)
+
+.PHONY: odoc texdoc pdfdoc
+
+###
+### DOCUMENTATION
+###
+### The following are available
+###
+### make doc - creates the documentation
+### make publish_doc - creates the documentation and puts it on the web page
+
+ODOC_FILES = ocamlutil/pretty.mli ocamlutil/errormsg.mli \
+ ocamlutil/clist.mli \
+ ocamlutil/stats.mli src/cil.mli src/formatcil.mli \
+ ocamlutil/alpha.mli src/cillower.mli \
+ src/ext/cfg.mli src/ext/dataflow.mli \
+ src/ext/dominators.mli
+
+
+# Documentation generated by "ocamldoc"
+odoc: $(OBJDIR)/pretty.cmi $(OBJDIR)/cil.cmi
+ -rm -rf doc/html/cil/api doc/html/cil/api-latex
+ -mkdir -p doc/html/cil/api
+ -mkdir -p doc/html/cil/api-latex
+ -rm -f doc/ocamldoc.sty
+ ocamldoc -d doc/html/cil/api -v -stars \
+ -html \
+ -t "CIL API Documentation (version @CIL_VERSION@)" \
+ -I $(OBJDIR) -hide Pervasives $(ODOC_FILES)
+
+doc/cilpp.tex: doc/cilcode.pl doc/cil.tex
+ -rm -rf doc/html/cil
+ -mkdir doc/html/cil
+ -mkdir doc/html/cil/examples
+ cd doc; perl cilcode.pl cil.tex >cilpp.tex.tmp
+ mv doc/cilpp.tex.tmp $@
+
+# Documentation generated from latex files using "hevea"
+texdoc: doc/cilpp.tex
+# Create the version document
+ cd doc/html/cil; echo "\def\cilversion{@CIL_VERSION@}" >cil.version.tex
+ cd doc/html/cil; echo "\def\ccuredversion{@CCURED_VERSION@}" >>cil.version.tex
+ cd doc/html/cil; hevea -exec xxdate.exe ../../cilpp
+ cd doc/html/cil; hevea -exec xxdate.exe ../../cilpp
+ cd doc/html/cil; mv cilpp.html cil.html
+ cd doc/html/cil; hacha -o ciltoc.html cil.html
+ cp -f doc/index.html doc/html/cil/index.html
+ cp -f doc/header.html doc/html/cil
+
+pdfdoc: doc/cilpp.tex $(OBJDIR)/pretty.cmi $(OBJDIR)/cil.cmi
+ cd doc; echo "\def\cilversion{@CIL_VERSION@}" >cil.version.tex
+ cd doc; echo "\def\ccuredversion{@CCURED_VERSION@}" >>cil.version.tex
+ cd doc; pdflatex cilpp.tex; pdflatex cilpp.tex
+ cd doc; mv cilpp.pdf html/cil/CIL.pdf
+ ocamldoc -o doc/cil-api.tex -v -stars \
+ -latex \
+ -t "CIL API Documentation (version @CIL_VERSION@)" \
+ -I $(OBJDIR) -hide Pervasives $(ODOC_FILES)
+
+ cd doc ; TEXINPUTS="$$TEXINPUTS:/usr/local/lib/ocaml/ocamldoc:/usr/lib/ocaml/ocamldoc" pdflatex cil-api.tex
+ cd doc ; mv cil-api.pdf html/cil/CIL-API.pdf
+
+
+# You should usually run this twice to get all of the references linked
+# correctly.
+doc: texdoc pdfdoc odoc
+
+
+#----------------------------------------------------------------------
+# Generate the CIL distribution
+# This will create a file cil.tar.gz. It includes the HTML documentation
+# so that people can use it even if they don't have ocamldoc, hevea etc.
+
+.PHONY: distrib distrib-nocheck checkdistrib
+CIL_TAR_GZ:=cil-@CIL_VERSION@.tar.gz
+## Make a distribution and check it
+distrib: distrib-nocheck checkdistrib
+
+# Work in a temporary directory
+TEMP_DIR = TEMP_cil-distrib
+
+# The tar archive members will be relative to this directory
+TOP_DIR = $(TEMP_DIR)/cil
+
+DISTRIB_ROOT = README LICENSE INSTALL Makefile.in \
+ config.h.in config.mk.in Makefile.gcc Makefile.msvc \
+ configure configure.in install-sh config.guess config.sub \
+ cil.spec cil.spec.in \
+ _tags \
+ aclocal.m4 \
+ cil.itarget \
+ cil.odocl \
+ myocamlbuild.ml
+
+DISTRIB_SRC = cilutil.ml cil.ml cil.mli check.ml check.mli \
+ rmtmps.ml rmtmps.mli formatlex.mll formatparse.mly \
+ formatcil.mli formatcil.ml testcil.ml \
+ mergecil.ml mergecil.mli main.ml machdep-ml.c \
+ ciloptions.ml ciloptions.mli libmaincil.ml \
+ escape.ml escape.mli cillower.mli cillower.ml \
+ _tags \
+ cil.mllib \
+ cilversion.ml.in
+
+DISTRIB_OCAMLUTIL = pretty.ml pretty.mli errormsg.ml errormsg.mli \
+ trace.ml trace.mli stats.ml stats.mli util.ml util.mli \
+ inthash.ml inthash.mli alpha.ml alpha.mli \
+ intmap.ml intmap.mli clist.ml clist.mli \
+ longarray.ml longarray.mli \
+ growArray.ml growArray.mli \
+ bitmap.ml bitmap.mli \
+ perfcount.c.in Makefile.ocaml \
+ _tags
+
+
+DISTRIB_SRC_FRONTC = cabs.ml cabshelper.ml cprint.ml clexer.mli clexer.mll \
+ cparser.mly whitetrack.mli whitetrack.ml lexerhack.ml \
+ cabs2cil.ml cabs2cil.mli frontc.ml frontc.mli \
+ cabsvisit.mli cabsvisit.ml patch.mli patch.ml
+
+DISTRIB_SRC_EXT = logcalls.ml logcalls.mli \
+ astslicer.ml heap.ml partial.ml \
+ logwrites.ml heapify.ml callgraph.ml callgraph.mli \
+ epicenter.ml usedef.ml ciltools.ml \
+ deadcodeelim.ml availexps.ml \
+ dataflow.ml dataflow.mli \
+ dominators.ml dominators.mli \
+ ssa.ml ssa.mli \
+ stackoverflow.mli stackoverflow.ml \
+ canonicalize.ml canonicalize.mli \
+ oneret.ml oneret.mli sfi.ml \
+ simplemem.ml simplify.ml \
+ blockinggraph.ml blockinggraph.mli \
+ dataslicing.ml dataslicing.mli \
+ _tags \
+ reachingdefs.ml \
+ cfg.ml cfg.mli \
+ liveness.ml \
+ expcompare.ml \
+ availexpslv.ml \
+ predabst.ml
+
+DISTRIB_SRC_EXT_PTA = setp.ml setp.mli golf.ml golf.mli \
+ ptranal.ml ptranal.mli \
+ steensgaard.mli steensgaard.ml \
+ uref.ml uref.mli olf.ml olf.mli
+
+DISTRIB_LIB = Cilly.pm KeptFile.pm OutputFile.pm TempFile.pm
+
+DISTRIB_BIN = CilConfig.pm.in cilly cilly.bat.in \
+ patcher patcher.bat.in test-bad teetwo
+
+DISTRIB_SMALL1=hello.c func.c init.c init1.c wchar1.c vararg1.c testharness.h
+
+distrib-nocheck: $(DISTRIB_ROOT) doc
+ # Create the distribution from scratch
+ rm -rf $(TEMP_DIR)
+ mkdir $(TEMP_DIR)
+
+ rm -rf $(CIL_TAR_GZ)
+ mkdir $(TOP_DIR) \
+ $(TOP_DIR)/bin \
+ $(TOP_DIR)/doc \
+ $(TOP_DIR)/doc/api \
+ $(TOP_DIR)/debian \
+ $(TOP_DIR)/lib \
+ $(TOP_DIR)/obj \
+ $(TOP_DIR)/obj/.depend \
+ $(TOP_DIR)/src \
+ $(TOP_DIR)/src/frontc \
+ $(TOP_DIR)/src/ext \
+ $(TOP_DIR)/src/ext/pta \
+ $(TOP_DIR)/test \
+ $(TOP_DIR)/test/small1 \
+ $(TOP_DIR)/ocamlutil
+
+ cp $(patsubst %,%,$(DISTRIB_ROOT)) $(TOP_DIR)
+
+ cp $(patsubst %,src/%,$(DISTRIB_SRC)) $(TOP_DIR)/src
+ cp $(patsubst %,ocamlutil/%,$(DISTRIB_OCAMLUTIL)) $(TOP_DIR)/ocamlutil
+ cp $(patsubst %,src/ext/%,$(DISTRIB_SRC_EXT)) $(TOP_DIR)/src/ext
+ cp $(patsubst %,src/ext/pta/%,$(DISTRIB_SRC_EXT_PTA)) \
+ $(TOP_DIR)/src/ext/pta
+ cp $(patsubst %,src/frontc/%,$(DISTRIB_SRC_FRONTC)) \
+ $(TOP_DIR)/src/frontc
+ cp $(patsubst %,lib/%,$(DISTRIB_LIB)) $(TOP_DIR)/lib
+ cp $(patsubst %,bin/%,$(DISTRIB_BIN)) $(TOP_DIR)/bin
+ cp $(patsubst %,test/small1/%,$(DISTRIB_SMALL1)) $(TOP_DIR)/test/small1
+
+ cp -r doc/html/cil/* $(TOP_DIR)/doc
+ cp debian/* $(TOP_DIR)/debian
+
+# Delete all Subversion metadata directories
+ find $(TEMP_DIR) -name .svn -print0 | xargs --null --no-run-if-empty rm -rf
+
+# Now make the TAR ball
+ cd $(TEMP_DIR); tar cfz $(CIL_TAR_GZ) cil
+ mv $(TEMP_DIR)/$(CIL_TAR_GZ) .
+
+# rm -rf $(TEMP_DIR)
+
+## Check a distribution
+checkdistrib:
+ cd $(TOP_DIR) && ./configure && \
+ $(MAKE) && $(MAKE) quicktest
+
+distclean: clean
+ rm -f src/frontc/cparser.output
+ rm -f src/formatparse.output
+ rm -f ocamlutil/perfcount.c
+ rm -f bin/cilly.bat
+ rm -f bin/patcher.bat
+ rm -f bin/CilConfig.pm
+ rm -f config.log
+ rm -f config.h
+ rm -f Makefile
+
+## Publish the distribution
+CILHTMLDEST=/var/www/cil
+publish_distrib: publish_doc
+ if test -d $(CILHTMLDEST); then \
+ cp -rf doc/html/cil/* $(CILHTMLDEST); \
+ cp -f $(CIL_TAR_GZ) $(CILHTMLDEST)/distrib; \
+ ln -sf $(CILHTMLDEST)/distrib/$(CIL_TAR_GZ) $(CILHTMLDEST)/distrib/cil-latest.tar.gz ; \
+ echo "Publish succeeded"; \
+ else \
+ error "Cannot publish because $(CILHTMLDEST) does not exist" ; \
+ fi
+
+publish_doc: doc
+ if test -d $(CILHTMLDEST); then \
+ cp -rf doc/html/cil/* $(CILHTMLDEST); echo "Done publishing doc"; \
+ else \
+ error "Cannot publish because $(CILHTMLDEST) does not exist" ; \
+ fi
+
+cleancheck:
+ rm -f test/small1/*.o
+ rm -f test/small1/hello
+ rm -f test/small1/vararg1
+ rm -f test/small1/wchar1
+
+clean: cleancaml cleancheck
+
+
+# Now include the compiler specific stuff
+ifdef _MSVC
+ include Makefile.msvc
+else
+ ifdef _GNUCC
+ include Makefile.gcc
+ endif
+endif
+
+test/%:
+ bin/cilly $(CONLY) test/small1/$*.c $(OBJOUT)test/small1/$*.o
+
+testrun/%:
+ bin/cilly test/small1/$*.c $(OBJOUT)test/small1/$*
+ test/small1/$*
+
+
+
+.PHONY: quicktest
+quicktest: $(patsubst %,test/%,func init init1) \
+ $(patsubst %,testrun/%,hello wchar1 vararg1)
+
+.PHONY: check
+check: quicktest
+
+############# Binary distribution ################
+.PHONY: bindistrb checkbindistrib
+
+BINCIL_TAR_GZ:=cil-win32-@CIL_VERSION@.tar.gz
+
+# Work in a temporary directory
+BINTEMP_DIR = TEMP_cil-bindistrib
+
+# The tar archive members will be relative to this directory
+BINTOP_DIR = $(BINTEMP_DIR)/cil
+
+BINDISTRIB_ROOT = README LICENSE
+
+BINDISTRIB_LIB = Cilly.pm KeptFile.pm OutputFile.pm TempFile.pm
+
+BINDISTRIB_BIN = CilConfig.pm.in cilly cilly.bat.in \
+ patcher patcher.bat.in
+
+BINDISTRIB_OBJ = cilly.byte.exe cilly.asm.exe
+
+BINDISTRIB_SMALL1=hello.c
+
+bindistrib-nocheck: $(BINDISTRIB_ROOT) obj/x86_WIN32/cilly.asm.exe
+ # Create the distribution from scratch
+ rm -rf $(BINTEMP_DIR)
+ mkdir $(BINTEMP_DIR)
+
+ mkdir $(BINTOP_DIR) \
+ $(BINTOP_DIR)/obj \
+ $(BINTOP_DIR)/doc \
+ $(BINTOP_DIR)/lib \
+ $(BINTOP_DIR)/bin \
+ $(BINTOP_DIR)/doc/api \
+ $(BINTOP_DIR)/obj/.depend \
+ $(BINTOP_DIR)/obj/x86_WIN32 \
+ $(BINTOP_DIR)/test \
+ $(BINTOP_DIR)/test/small1
+
+ cp $(patsubst %,%,$(BINDISTRIB_ROOT)) $(BINTOP_DIR)
+ cp $(patsubst %,lib/%,$(BINDISTRIB_LIB)) $(BINTOP_DIR)/lib
+ cat bin/CilConfig.pm.in \
+ | sed -e "s|@||g" \
+ | sed -e "s|CC|cl|" \
+ | sed -e "s|DEFAULT_CIL_MODE|MSVC|" \
+ | sed -e "s|ARCHOS|x86_WIN32|" \
+ > $(BINTOP_DIR)/bin/CilConfig.pm
+ cat bin/patcher.bat.in | sed -e "s|@||g" >$(BINTOP_DIR)/bin/patcher.bat
+ cp bin/patcher $(BINTOP_DIR)/bin
+ cp bin/cilly $(BINTOP_DIR)/bin
+ cat bin/cilly.bat.in | sed -e "s|@||g" > $(BINTOP_DIR)/bin/cilly.bat
+ cp $(patsubst %,test/small1/%,$(BINDISTRIB_SMALL1)) \
+ $(BINTOP_DIR)/test/small1
+ cp $(patsubst %,obj/x86_WIN32/%,$(BINDISTRIB_OBJ)) \
+ $(BINTOP_DIR)/obj/x86_WIN32
+
+ cp -r doc/html/cil/* $(BINTOP_DIR)/doc
+# Delete all CVS directories
+ if find $(BINTEMP_DIR) -name CVS -print >cvss.txt ; then \
+ rm -rf `cat cvss.txt` ;fi
+# Now make the TAR ball
+ cd $(BINTEMP_DIR); tar cfz $(BINCIL_TAR_GZ) cil
+ mv $(BINTEMP_DIR)/$(BINCIL_TAR_GZ) .
+
+# rm -rf $(TEMP_DIR)
+
+## Check a distribution
+checkbindistrib:
+
+########################################################################
+
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+libdir = @libdir@
+pkglibdir = $(libdir)/cil
+datadir = @datadir@
+pkgdatadir = $(datadir)/cil
+
+all_distrib := $(DISTRIB_OCAMLUTIL) $(DISTRIB_SRC) $(DISTRIB_SRC_FRONTC) $(DISTRIB_SRC_EXT) $(DISTRIB_SRC_EXT_PTA)
+all_ml := $(filter %.ml, $(all_distrib))
+all_mli := $(filter %.mli, $(all_distrib))
+install_ml := $(filter $(OCAML_CIL_LIB_MODULES:=.ml), $(all_ml))
+install_cmx := $(install_ml:%.ml=$(OBJDIR)/%.cmx)
+install_mli := $(filter $(OCAML_CIL_LIB_MODULES:=.mli), $(all_mli))
+install_cmi := $(install_mli:%.mli=$(OBJDIR)/%.cmi)
+install_cma := $(addprefix $(OBJDIR)/cil., cma cmxa a)
+install_lib := $(OCAML_CIL_LIB_CMODULES:%=$(OBJDIR)/lib%.a)
+
+install: $(install_cmi) $(install_cma) $(install_lib)
+ $(INSTALL) -d $(DESTDIR)$(pkglibdir)
+ $(INSTALL_DATA) $(install_cma) $(DESTDIR)$(pkglibdir)
+ $(INSTALL_DATA) $(install_cmi) $(DESTDIR)$(pkglibdir)
+ $(INSTALL_DATA) $(install_cmx) $(DESTDIR)$(pkglibdir)
+ $(INSTALL_DATA) $(install_lib) $(DESTDIR)$(pkglibdir)
+ $(INSTALL) -d $(DESTDIR)$(pkgdatadir)
+ $(INSTALL_DATA) $(addprefix lib/, $(filter %.pm, $(DISTRIB_LIB))) $(DESTDIR)$(pkgdatadir)
+
+cil.spec: cil.spec.in
+ ./config.status $@
+
+rpms: distrib
+ rpmbuild -ta $(CIL_TAR_GZ)
+
diff --git a/cil/Makefile.msvc b/cil/Makefile.msvc
new file mode 100644
index 0000000..be1bb38
--- /dev/null
+++ b/cil/Makefile.msvc
@@ -0,0 +1,42 @@
+#
+# Makefile for CCured. The Microsoft Visual C part
+#
+COMPILERNAME=MSVC
+
+CC:=cl /nologo
+ifdef RELEASELIB
+#matth: we need the frame pointer for CHECK_GETFRAME, so
+# use /Oy- to prevent that optimization.
+ CFLAGS:=/DRELEASE /D_MSVC /Ox /Ob2 /G6 /Oy-
+else
+ CFLAGS:=/D_DEBUG /D_MSVC /Zi /MLd
+endif
+CONLY:=/c
+
+OPT_O2:= /Ox /Ob2 /G6
+
+OBJOUT:=/Fo
+OBJEXT:=obj
+
+EXEOUT:=/Fe
+LIBEXT:=lib
+LDEXT:=.exe
+
+DEF:=/D
+ASMONLY:=/Fa
+INC:=/I
+
+CPPSTART:=cl /Dx86_WIN32 /D_MSVC /E /TC /I./lib /DCCURED
+CPPOUT:= >%o
+CPP:=$(CPPSTART) /FI fixup.h %i $(CPPOUT)
+
+PATCHECHO:=echo
+
+AR:=lib
+LIBOUT:=/OUT:
+
+# The system include files to be patched
+PATCH_SYSINCLUDES:=stdio.h ctype.h string.h io.h stdarg.h crtdbg.h \
+ varargs.h stdlib.h time.h malloc.h
+
+
diff --git a/cil/NOTES b/cil/NOTES
new file mode 100644
index 0000000..6b9309b
--- /dev/null
+++ b/cil/NOTES
@@ -0,0 +1,86 @@
+
+TODO list
+
+
+CIL
+------
+
+Front-end
+ - trigraph sequences (??:, ...) ISO 5.2.1.1
+ - name spaces for struct/enum/union are the same ISO 6.2.3
+ - check integer conversion ISO 6.3.1.1
+ - character constants (type, value, escapes) ISO 6.4.4.4
+ - string literals (value, escapes) ISO 6.4.5
+ - punctuation tokens ISO 6.4.6
+ - default argument promotions in function calls ISO 6.5.2.2
+ - compound literals ISO 6.5.2.5. Missing fields initialized to 0!!
+ - check that long long is properly done in type specs ISO 6.7.2
+ - Initialization ISO 6.7.8
+
+- MSVC has a bug in the handling of shift operators: arithemtic conversions
+are applies on both operands instead of just integral promotions. We duplicate
+this bug in doBinOp in cabs2cil.
+
+ - we should allow the user to specify a logging function that takes
+ printf()-style arguments (rather than hardcoding syslog/printk/printf).
+
+ - the restrict attribute is dropped in cabs2cil
+
+ - struct and union must share the name space
+
+ - when merging we use too much memory. We should be droping the references to
+ the CABS files once we convert each one to CIL.
+
+CCURED
+==============
+
+ - if we use memcpy to copy some stuff from local variables to the heap we
+ might be moving stack pointers that way. The only way to prevent that is to
+ disallow storing stack pointers in local variables that are arrays or whose
+ address is taken.
+
+ - in box.ml offsetOfFirstScalar looks only at the first field of a union.
+
+ - in box.ml when we check tags we check all fields in a union. This is sound
+ but excessive.
+
+(2) Make a file with global declarations of common functions like strcpy().
+ These declarations should include pointer annotations and should be
+ used instead of the ones that appear in the source.
+?(9) Find some way to describe [recursive] types at runtime and use them as
+ tags.
+
+
+ - on MSVC we turn on 32-bit packing of stuff
+
+ - Writing or reading unaligned pointers is not allowed.
+
+ - Right now when we try to read a pointer and we don't find one in tags, we
+ overwrite the base part of the pointer to be read with 0. But this might
+ have undesired side-effects.
+
+ - I wonder what do we do when casting between abstract types (struct foo *
+ where struct foo is not defined)
+
+ - change CHECK_RETURNPTR and CHECK_STOREPTR so that the range checked
+ is 512K (instead of 1 meg) for Linux Kernel Drivers.
+
+ - add a flag that effectively puts #pragma box(off) / #pragma box(on)
+ around all global initializers in a file.
+
+
+ - turning interface char* into ROSTRING is unsound. This is done even when
+ the item is subject to writes.
+
+ - printf is not quite safe. If we do not manage to verify statically the
+ arguments we should be calling a wrapper. Do we do that?
+
+ - in a SEQ pointer we must keep the end = null if the poiner is an integer.
+ Else there is trouble when we cast to FSEQ. Can we cast integers into FSEQ?
+
+
+ - sm: because wild area lengths have word-level granularity, we can't protect
+ the final 0 of a char array unless the alignment works out; solutions
+ include changing granularity to bytes (painful) or changing the array-
+ expander to ensure alignment (potentially wasteful of a few bytes here
+ and there)
diff --git a/cil/README b/cil/README
new file mode 100644
index 0000000..52710f2
--- /dev/null
+++ b/cil/README
@@ -0,0 +1,2 @@
+
+ See the documentation in doc/html.
diff --git a/cil/_tags b/cil/_tags
new file mode 100644
index 0000000..909e08c
--- /dev/null
+++ b/cil/_tags
@@ -0,0 +1,3 @@
+# subdirectories containing source code
+"ocamlutil": include
+"src": include
diff --git a/cil/aclocal.m4 b/cil/aclocal.m4
new file mode 100644
index 0000000..28fde84
--- /dev/null
+++ b/cil/aclocal.m4
@@ -0,0 +1,69 @@
+dnl check whether integer types $1 and $2 are the same
+
+AC_DEFUN([__CIL_CHECK_INTEGER_TYPE_TYPE], [
+ if test -z "$real_type"; then
+ AC_COMPILE_IFELSE(AC_LANG_SOURCE([
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+$2 foo($2 x);
+$1 foo($1 x) { return x; }]),
+ real_type='$2')
+ fi
+])
+
+
+dnl check whether integer type $1 is the
+dnl the signed or unsigned variant of $2
+
+AC_DEFUN([__CIL_CHECK_INTEGER_TYPE_SIGNS], [
+ __CIL_CHECK_INTEGER_TYPE_TYPE([$1], [$2])
+ __CIL_CHECK_INTEGER_TYPE_TYPE([$1], [unsigned $2])
+])
+
+
+dnl set configuration macro $2 to a string representing
+dnl the real integer type corresponding to typedef $1
+
+AC_DEFUN([CIL_CHECK_INTEGER_TYPE], [
+ AC_MSG_CHECKING([for real definition of $1])
+ real_type=''
+ __CIL_CHECK_INTEGER_TYPE_SIGNS([$1], int)
+ __CIL_CHECK_INTEGER_TYPE_SIGNS([$1], long)
+ __CIL_CHECK_INTEGER_TYPE_SIGNS([$1], short)
+ __CIL_CHECK_INTEGER_TYPE_SIGNS([$1], char)
+ if test -z "$real_type"; then
+ AC_MSG_ERROR([cannot find definition of $1])
+ fi
+ AC_DEFINE_UNQUOTED([$2], "[$real_type]")
+ AC_MSG_RESULT([$real_type])
+])
+
+
+# I find it useful to mark generated files as read-only so I don't
+# accidentally edit them (and them lose my changes when ./configure
+# runs again); I had originally done the chmod after AC_OUTPUT, but
+# the problem is then the chmod doesn't run inside ./config.status
+
+# CIL_CONFIG_FILES(filename)
+# do AC_CONFIG_FILES(filename, chmod a-w filename)
+define([CIL_CONFIG_FILES],
+[{
+ if test -f [$1].in; then
+ AC_CONFIG_FILES([$1], chmod a-w [$1])
+ else
+ true
+ #echo "skipping [$1] because it's not in this distribution"
+ fi
+}])
+define([CIL_CONFIG_EXE_FILES],
+[{
+ if test -f [$1].in; then
+ AC_CONFIG_FILES([$1], [chmod a-w,a+x $1])
+ else
+ true
+ #echo "skipping [$1] because it's not in this distribution"
+ fi
+}])
diff --git a/cil/bin/.cvsignore b/cil/bin/.cvsignore
new file mode 100644
index 0000000..abf1dea
--- /dev/null
+++ b/cil/bin/.cvsignore
@@ -0,0 +1,5 @@
+scaninfer.bat
+ccured.bat
+cilly.bat
+patcher.bat
+CilConfig.pm
\ No newline at end of file
diff --git a/cil/bin/CilConfig.pm.in b/cil/bin/CilConfig.pm.in
new file mode 100644
index 0000000..94241b1
--- /dev/null
+++ b/cil/bin/CilConfig.pm.in
@@ -0,0 +1,6 @@
+
+$::archos = "@ARCHOS@";
+$::cc = "@CC@";
+$::cilhome = "@CILHOME@";
+$::default_mode = "@DEFAULT_CIL_MODE@";
+
diff --git a/cil/bin/cabsxform b/cil/bin/cabsxform
new file mode 100755
index 0000000..11bac73
--- /dev/null
+++ b/cil/bin/cabsxform
@@ -0,0 +1,16 @@
+#!/bin/sh
+# apply my CABS transformer to a file
+
+if [ "$3" = "" ]; then
+ echo "usage: $0 [-debug] input.c patch.xform output.c"
+ exit 0
+fi
+
+args=""
+if [ "$1" = "-debug" ]; then
+ args="--tr sm,patch,patchDebug,patchTime"
+ shift
+fi
+
+exec `dirname $0`/../obj/x86_LINUX/cilly.byte.exe $args \
+ --cabsonly "$3" --patchFile "$2" "$1"
diff --git a/cil/bin/cilly b/cil/bin/cilly
new file mode 100755
index 0000000..e4bf737
--- /dev/null
+++ b/cil/bin/cilly
@@ -0,0 +1,152 @@
+#!/usr/bin/perl
+# A simple use of the Cilly module
+#
+#
+#
+# Copyright (c) 2001-2002,
+# George C. Necula
+# Scott McPeak
+# Wes Weimer
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. The names of the contributors may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+use strict;
+use Data::Dumper;
+use FindBin;
+use lib "$FindBin::Bin";
+use lib "$FindBin::Bin/../lib"; # The libraries are in the lib directory
+# Read the configuration script
+use CilConfig;
+
+use Cilly;
+
+$::default_is_merge = 0;
+my $stub = CilCompiler->new(@ARGV);
+
+$stub->setVersion ();
+
+# print Dumper($stub);
+$stub->doit();
+
+
+# Define here your favorite compiler by overriding Merger methods
+package CilCompiler;
+use File::Basename;
+use strict;
+BEGIN {
+ @CilCompiler::ISA = qw(Cilly);
+ $CilCompiler::base = "$::cilhome/obj/$::archos/cilly";
+ # Use the most recent version of cilly
+ $CilCompiler::mtime_asm = int((stat("$CilCompiler::base.asm.exe"))[9]);
+ $CilCompiler::mtime_byte = int((stat("$CilCompiler::base.byte.exe"))[9]);
+ $CilCompiler::use_debug =
+ grep(/--bytecode/, @ARGV) ||
+ grep(/--ocamldebug/, @ARGV) ||
+ ($CilCompiler::mtime_asm < $CilCompiler::mtime_byte);
+ $CilCompiler::compiler =
+ $CilCompiler::base .
+ ($CilCompiler::use_debug ? ".byte" : ".asm") . ".exe";
+ if($CilCompiler::use_debug) {
+ $ENV{"OCAMLRUNPARAM"} = "b" . $ENV{"OCAMLRUNPARAM"};
+ }
+}
+
+# We need to customize the collection of arguments
+sub collectOneArgument {
+ my($self, $arg, $pargs) = @_;
+ if($arg =~ m|--transval=(.+)$|) {
+ $self->{TRANSVAL} = $1; return 1;
+ }
+ if($arg eq '--ocamldebug') {
+ $self->{OCAMLDEBUG} = 1; return 1;
+ }
+ if($arg eq '--cabsonly') {
+ $self->{CABSONLY} = 1; return 1;
+ }
+ # See if the super class understands this
+ return $self->SUPER::collectOneArgument($arg, $pargs);
+}
+
+sub usage {
+ print "Usage: cilly [options] [gcc_or_mscl arguments]\n";
+}
+
+sub helpMessage {
+ my($self) = @_;
+ # Print first the original
+ $self->SUPER::helpMessage();
+ print <runShell(@cmd);
+}
+
+
+sub CillyCommand {
+ my ($self, $ppsrc, $dest) = @_;
+
+ my $aftercil;
+ my @cmd = ($CilCompiler::compiler);
+
+ if(defined $ENV{OCAMLDEBUG} || $self->{OCAMLDEBUG}) {
+ print "OCAMLDEBUG is on\n";
+ my @idirs = ("src", "src/frontc", "src/ccured", "src/ext",
+ "ocamlutil",
+ "obj/$::archos");
+ my @iflags = map { ('-I', "$::cilhome/$_") } @idirs;
+ unshift @cmd, 'ocamldebug', '-emacs', @iflags;
+ }
+ if($::docxx) {
+ push @cmd, '--cxx';
+ }
+ if($self->{CABSONLY}) {
+ $aftercil = $self->cilOutputFile($dest, 'cabs.c');
+ push @cmd, '--cabsonly', $aftercil;
+ } else {
+ if(defined $self->{CILLY_OUT}) {
+ $aftercil = new OutputFile($dest, $self->{CILLY_OUT});
+ return ($aftercil, @cmd);
+ }
+ $aftercil = $self->cilOutputFile($dest, 'cil.c');
+ }
+ return ($aftercil, @cmd, '--out', $aftercil);
+}
+
+sub MergeCommand {
+ my ($self, $ppsrc, $dir, $base) = @_;
+
+ return ('', $CilCompiler::compiler);
+}
+
+
+1;
diff --git a/cil/bin/cilly.bat.in b/cil/bin/cilly.bat.in
new file mode 100755
index 0000000..9e5a36e
--- /dev/null
+++ b/cil/bin/cilly.bat.in
@@ -0,0 +1 @@
+perl @CILHOME@/bin/cilly %*
diff --git a/cil/bin/patcher b/cil/bin/patcher
new file mode 100755
index 0000000..5325ed1
--- /dev/null
+++ b/cil/bin/patcher
@@ -0,0 +1,630 @@
+#!/usr/bin/perl
+# A Perl script that patches a bunch of files
+#
+#
+#
+# Copyright (c) 2001-2002,
+# George C. Necula
+# Scott McPeak
+# Wes Weimer
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. The names of the contributors may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+use strict;
+use File::Basename;
+use File::Copy;
+use Getopt::Long; # Command-line option processing
+use Data::Dumper;
+use FindBin;
+use lib "$FindBin::Bin";
+use lib "$FindBin::Bin/../lib";
+# Read the configuration script
+use CilConfig;
+
+$::iswin32 = $^O eq 'MSWin32' || $^O eq 'cygwin';
+# matth: On cygwin, ^O is either MSWin32 or cygwin, depending on how you build
+# perl. We don't care about the distinction, so just treat all windows
+# platforms the same when looking at "system=cygwin" tags on patches.
+$::platform = $::iswin32 ? 'cygwin' : $^O;
+
+
+# Set filename parsing according to current operating system.
+File::Basename::fileparse_set_fstype($^O);
+
+sub printHelp {
+ print <)
+
+ --clean Remove all files in the destination directory
+ --skipmissing Skip patches for files whose original cannot be found
+ --stdoutpp For MSVC only, use the "preprocess to stdout" mode. This
+ is for some versions of MSVC that do not support
+ well the /P file
+ --dumpversion Print the version name used for the current compiler
+
+ All of the other arguments are passed to the preprocessor.
+
+We will use \"$::platform\" as your system type.
+
+Send bugs to necula\@cs.berkeley.edu.
+EOL
+}
+
+
+my %option;
+&Getopt::Long::Configure("pass_through");
+&Getopt::Long::GetOptions
+ (\%option,
+ "--help", # Display help information
+ "--verbose|v", # Display information about programs invoked
+ "--mode=s", # The mode (GNUCC, MSVC)
+ "--dest=s", # The destination directory
+ "--patch=s@", # Patch files
+ "--ufile=s@", # User include files
+ "--sfile=s@", # System include files
+ "--stdoutpp", # pp to stdout
+ "--skipmissing",
+ "--dumpversion",
+ "--clean",
+ );
+
+if($option{help}) {
+ &printHelp();
+ exit 0;
+}
+
+# print Dumper({"option" => \%option, "ARGV" => \@ARGV});
+
+my $cversion; # Compiler version
+my $cname; # Compiler name
+my @patches; # A list of the patches to apply
+
+my $ppargs = join(' ', @ARGV);
+
+my %groups;
+
+&findCompilerVersion();
+
+if($option{dumpversion}) {
+ print $cversion;
+ exit 0;
+}
+
+# Find the destination directory
+if(!defined($option{dest})) {
+ die "Must give a --dest directory\n";
+}
+if(! -d $option{dest}) {
+ die "The destination directory $option{dest} does not exist\n";
+}
+
+if($option{clean}) {
+ # Find the destination directory for a dummy file
+ my $dest = &destinationFileName("");
+ chop $dest; # The final /
+ print "Cleaning all files in $dest\n";
+ (!system("rm -rf $dest")) || die "Cannot remove directory\n";
+ exit 0;
+}
+
+print "Patching files for $cname version $cversion\n";
+
+# Prepare the patches
+if(defined($option{patch})) {
+ my $pFile;
+ foreach $pFile (@{$option{patch}}) {
+ &preparePatchFile($pFile);
+ }
+}
+
+# print Dumper(\@patches);
+
+my $file;
+foreach $file (@{$option{ufile}}) {
+ &patchOneFile($file, 0);
+}
+foreach $file (@{$option{sfile}}) {
+ &patchOneFile($file, 1);
+}
+
+# Now check whether we have used all the patches
+my $hadError = 0;
+foreach my $patch (@patches) {
+ # It was optional
+ if(defined $patch->{FLAGS}->{optional} ||
+ defined $patch->{FLAGS}->{disabled}) { next; }
+ # It was for another system
+ if(defined $patch->{FLAGS}->{system} &&
+ $patch->{FLAGS}->{system} ne $::platform) { next; }
+ # Its group was done
+ if(defined $patch->{FLAGS}->{group}) {
+ if(! defined $groups{$patch->{FLAGS}->{group}}) {
+ $hadError = 1;
+ print "None of the following patches from group $patch->{FLAGS}->{group} was used:\n";
+ foreach my $gp (@patches) {
+ if($gp->{FLAGS}->{group} eq $patch->{FLAGS}->{group}) {
+ print "\tfrom $gp->{PATCHFILE} at $gp->{PATCHLINENO}\n";
+ }
+ }
+ $groups{$patch->{FLAGS}->{group}} = 1; # We're done with it
+ }
+ next;
+ }
+ # It was not in a group and was not optional
+ if(! defined $patch->{USED}) {
+ $hadError = 1;
+ print "Non-optional patch was not used:\n\tfrom $patch->{PATCHFILE} at $patch->{PATCHLINENO}\n";
+ next;
+ }
+}
+exit $hadError;
+
+
+############# SUBROUTINES
+sub findCompilerVersion {
+ $cname = "";
+ $cversion = 0;
+ if($option{mode} eq "GNUCC") {
+ $cname = "GNU CC";
+ open(VER, "$::cc -dumpversion $ppargs|")
+ || die "Cannot start $cname";
+ while() {
+ # sm: had to modify this to match "egcs-2.91.66", which is
+ # how egcs responds to the -dumpversion request
+ if($_ =~ m|^(\d+\S+)| ||
+ $_ =~ m|^(egcs-\d+\S+)|) {
+ $cversion = "gcc_$1";
+ close(VER) || die "Cannot start $cname\n";
+ return;
+ }
+ }
+ die "Cannot find the version for GCC\n";
+ }
+ if($option{mode} eq "MSVC") {
+ $cname = "Microsoft cl";
+ $ppargs =~ s|/nologo||g;
+ open(VER, "cl $ppargs 2>&1|") || die "Cannot start $cname: cl $ppargs\n";
+ while() {
+ if($_ =~ m|Compiler Version (\S+) |) {
+ $cversion = "cl_$1";
+ close(VER);
+ return;
+ }
+ }
+ die "Cannot find the version for Microsoft CL\n";
+ }
+ die "You must specify a --mode (either GNUCC or MSVC)";
+}
+
+sub lineDirective {
+ my ($fileName, $lineno) = @_;
+ if($::iswin32) {
+ $fileName =~ s|\\|/|g;
+ }
+ if($option{mode} eq "GNUCC" || $option{mode} eq "MSVC") {
+ return "#line $lineno \"$fileName\"\n";
+ }
+ if($option{mode} eq "EDG") {
+ return "# $lineno \"$fileName\"\n";
+ }
+ die "lineDirective: invalid mode";
+}
+
+# Find the absolute name for a file
+sub patchOneFile {
+ my ($fname, $issys) = @_;
+ my $fname1 = $issys ? "<$fname>" : "\"$fname\"";
+ print "Patching $fname1\n";
+ my $preprocfile = "__topreproc";
+ unlink "$preprocfile.i";
+ open(TOPREPROC, ">$preprocfile.c") || die "Cannot open preprocessor file";
+ print TOPREPROC "#include $fname1\n";
+ close(TOPREPROC);
+ # Do not test for error while running the preprocessor because the
+ # error might be due to an #error directive
+ my $preproccmd = "";
+ if($option{mode} eq "GNUCC") {
+ $preproccmd = "$::cc -E $ppargs $preprocfile.c >$preprocfile.i";
+ if ($^O ne 'MSWin32') { # Windows has no /dev/null
+ # ignore stderr (e.g. #error directives)
+ $preproccmd .= " 2>/dev/null";
+ }
+ } elsif($option{mode} eq "MSVC") {
+ if($option{stdoutpp}) {
+ $preproccmd = "cl /nologo /E $ppargs >$preprocfile.i";
+ } else {
+ $preproccmd = "cl /nologo /P $ppargs $preprocfile.c";
+ }
+ } else { die "Invalid --mode"; }
+
+ if(system($preproccmd) && $option{mode} eq "MSVC" ) {
+ # For some reason the gcc returns spurious error codes
+ die "Error running preprocessor: $preproccmd"
+ }
+
+ # Now scan the resulting file and get the real name of the file
+ my $absname = "";
+ open(PPOUT, "<$preprocfile.i") || die "Cannot find $preprocfile.i";
+ while() {
+ if($_ =~ m|^\#.+\"(.+$fname)\"|) {
+ $absname = $1;
+ last;
+ }
+ }
+ close(PPOUT);
+ unlink "$preprocfile.c";
+ unlink "$preprocfile.i";
+
+ # Did we find the original file?
+ if($absname eq "") {
+ if($option{skipmissing}) {
+ # Skip this file, mkaing all relevant patches optional
+ print " Original header file not found; skipping...\n";
+ foreach my $patch (@patches) {
+ my $infile = $patch->{FLAGS}->{file};
+ if(defined $infile && $fname =~ m|$infile$|) {
+ $patch->{FLAGS}->{optional} = 1;
+ }
+ }
+ return;
+ } else {
+ die "Cannot find the absolute name of $fname1 in $preprocfile.i\n";
+ }
+ }
+
+ # If we fail then maybe we are using cygwin paths in a Win32 system
+ if($option{mode} eq "GNUCC" && $::iswin32) {
+ open(WINNAME, "cygpath -w $absname|")
+ || die "Cannot run cygpath to convert $absname to a Windows name";
+ $absname = ;
+ if($absname =~ m|\n$|) {
+ chop $absname;
+ }
+ # print "Converted $fileName to $newName\n";
+ close(WINNAME) || die "Cannot run cygpath to convert $absname";
+ }
+ if(! -f $absname) { #matth: we need to do this test after calling cygpath
+ die "Cannot find the absolute name of $fname1 (\"$absname\")\n";
+ }
+ print " Absolute name is $absname\n";
+ # Decide where to put the result
+ my $dest = &destinationFileName($fname);
+ print " Destination is $dest\n";
+ &applyPatches($absname, $dest);
+}
+
+# Is absolute path name?
+sub isAbsolute {
+ my($name) = @_;
+ if($::iswin32) {
+ return ($name =~ m%^([a-zA-Z]:)?[/\\]%);
+ } else {
+ return ($name =~ m%^[/\\]%);
+ }
+}
+
+# Compute the destination file name and create all necessary directories
+sub destinationFileName {
+ my ($fname) = @_;
+ if(&isAbsolute($fname)) {
+ die "Cannot process files that have absolute names\n";
+ }
+ my $dest = $option{dest} . "/" . $cversion;
+ # Break the file name into components
+ my @fnamecomp = split(m%[/\\]%, $fname);
+ # Add one component at a time
+ do {
+ if(! -d $dest) {
+ (mkdir $dest, 0777) || die "Cannot create directory $dest\n";
+ }
+ my $comp = shift @fnamecomp;
+ $dest .= ('/' . $comp);
+ } while($#fnamecomp >= 0);
+ return $dest;
+}
+#####################################################################
+# Patching of files
+#
+sub preparePatchFile {
+ my ($pFile) = @_;
+ open(PFILE, "<$pFile") ||
+ die "Cannot read patch file $pFile\n";
+ my $patchLineNo = 0;
+ my $patchStartLine = 0;
+ NextPattern:
+ while() {
+ $patchLineNo ++;
+ if($_ !~ m|^<<<(.*)$|) {
+ next;
+ }
+ # Process the flags
+ my @patchflags = split(/\s*,\s*/, $1);
+ my %valueflags;
+ foreach my $flg (@patchflags) {
+ $flg = &trimSpaces($flg);
+ if($flg =~ m|^(.+)\s*=\s*(.+)$|) {
+ $valueflags{$1} = $2;
+ } else {
+ $valueflags{$flg} = 1;
+ }
+ }
+ # Now we have found the start
+ $_ = ;
+ $patchLineNo ++;
+ my $current_pattern = [];
+ my @all_patterns = ();
+ if($_ =~ m|^===|) {
+ if(! defined $valueflags{ateof} &&
+ ! defined $valueflags{atsof}) {
+ die "A pattern is missing in $pFile";
+ }
+ goto AfterPattern;
+ }
+ if($_ eq "") {
+ die "A pattern is missing in $pFile";
+ }
+ push @{$current_pattern}, $_;
+
+ while() {
+ $patchLineNo ++;
+ if($_ =~ m|^===|) {
+ last;
+ }
+ if($_ =~ m%^\|\|\|%) {
+ # This is an alternate pattern
+ push @all_patterns, $current_pattern;
+ $current_pattern = [];
+ next;
+ }
+ push @{$current_pattern}, $_;
+ }
+ AfterPattern:
+ # Finish off the last pattern
+ push @all_patterns, $current_pattern;
+ if($_ !~ m|^===|) {
+ die "No separator found after pattern in $pFile";
+ }
+ $patchStartLine = $patchLineNo + 1;
+ my $replacement = "";
+ # If we have more than one non-optional pattern with no group
+ # specified, then create a group
+ if(@all_patterns > 1 &&
+ ! defined $valueflags{group} &&
+ ! defined $valueflags{optional}) {
+ $valueflags{group} = $pFile . "_$patchStartLine";
+ }
+ while() {
+ $patchLineNo ++;
+ if($_ =~ m|^>>>|) {
+ # For each alternate pattern
+ my $patt;
+ foreach $patt (@all_patterns) {
+ # Maybe the @__pattern__@ string appears in the replacement
+ my $pattern_repl = join('', @{$patt});
+ my $nrlines = int(@{$patt});
+ my $local_repl = $replacement;
+ $local_repl =~ s/\@__pattern__\@/$pattern_repl/g;
+ # Strip the spaces from patterns
+ my @pattern_no_space = ();
+ my $i;
+ foreach $i (@{$patt}) {
+ $i =~ s/\s+//g;
+ push @pattern_no_space, $i;
+ }
+ push @patches, { HEAD => $pattern_no_space[0],
+ FLAGS => \%valueflags,
+ NRLINES => $nrlines,
+ PATTERNS => \@pattern_no_space,
+ REPLACE => $local_repl,
+ PATCHFILE => $pFile,
+ PATCHLINENO => $patchStartLine,
+ };
+ }
+ next NextPattern;
+ }
+ $replacement .= $_;
+ }
+ die "Unfinished replacement for pattern in $pFile";
+ }
+ close(PFILE) ||
+ die "Cannot close patch file $pFile\n";
+ print "Loaded patches from $pFile\n";
+ # print Dumper(\@patches); die "Here\n";
+
+}
+
+sub trimSpaces {
+ my($str) = @_;
+ if($str =~ m|^\s+(\S.*)$|) {
+ $str = $1;
+ }
+ if($str =~ m|^(.*\S)\s+$|) {
+ $str = $1;
+ }
+ return $str;
+}
+
+
+my @includeReadAhead = ();
+sub readIncludeLine {
+ my($infile) = @_;
+ if($#includeReadAhead < 0) {
+ my $newLine = <$infile>;
+ return $newLine;
+ } else {
+ return shift @includeReadAhead;
+ }
+}
+
+sub undoReadIncludeLine {
+ my($line) = @_;
+ push @includeReadAhead, $line;
+}
+
+sub applyPatches {
+ my($in, $out) = @_;
+ # Initialize all the patches
+ my $patch;
+ # And remember the EOF patches that are applicable here
+ my @eof_patches = ();
+ foreach $patch (@patches) {
+ $patch->{USE} = 1;
+ my $infile = $patch->{FLAGS}->{file};
+ if(defined $infile && $in !~ m|$infile$|) {
+# print "Will not use patch ",
+# &lineDirective($patch->{PATCHFILE},$patch->{PATCHLINENO});
+ $patch->{USE} = 0;
+ next;
+ }
+ # Disable the system specific patterns
+ if(defined $patch->{FLAGS}->{system} &&
+ $patch->{FLAGS}->{system} ne $::platform) {
+ $patch->{USE} = 0;
+ next;
+ }
+ # Disable also (for now) the patches that must be applied at EOF
+ if(defined $patch->{FLAGS}->{ateof} ||
+ defined $patch->{FLAGS}->{atsof} ||
+ defined $patch->{FLAGS}->{disabled} ) {
+ $patch->{USE} = 0;
+ push @eof_patches, $patch;
+ }
+
+ }
+
+ open(OUT, ">$out") || die "Cannot open patch output file $out";
+ open(IN, "<$in") || die "Cannot open patch input file $in";
+
+ @includeReadAhead = ();
+
+ my $lineno = 0;
+ my $line; # The current line
+
+ # the file name that should be printed in the line directives
+ my $lineDirectiveFile = $in;
+ # Now apply the SOF patches
+ foreach my $patch (@eof_patches) {
+ if(defined $patch->{FLAGS}->{atsof}) {
+ my $line = &applyOnePatch($patch, &lineDirective($in, $lineno));
+ print OUT $line;
+ }
+ }
+
+ while($line = &readIncludeLine(\*IN)) {
+ $lineno ++;
+ # Now we have a line to print out. See if it needs patching
+ my $patch;
+ my @lines = ($line); # A number of lines
+ my $nrLines = 1; # How many lines
+ my $toundo = 0;
+ NextPatch:
+ foreach $patch (@patches) {
+ if(! $patch->{USE}) { next; } # We are not using this patch
+ my $line_no_spaces = $line;
+ $line_no_spaces =~ s/\s+//g;
+ if($line_no_spaces eq $patch->{HEAD}) {
+ # Now see if all the lines match
+ my $patNrLines = $patch->{NRLINES};
+ if($patNrLines > 1) {
+ # Make sure we have enough lines
+ while($nrLines < $patNrLines) {
+ push @lines, &readIncludeLine(\*IN);
+ $nrLines ++;
+ $toundo ++;
+ }
+ my @checkLines = @{$patch->{PATTERNS}};
+ my $i;
+ # print "check: ", join(":", @checkLines);
+ # print "with $nrLines lines: ", join("+", @lines);
+ for($i=0;$i<$patNrLines;$i++) {
+ $line_no_spaces = $lines[$i];
+ $line_no_spaces =~ s/\s+//g;
+ if($checkLines[$i] ne $line_no_spaces) {
+ # print "No match for $patch->{HEAD}\n";
+ next NextPatch;
+ }
+ }
+ }
+ # print "Using patch from $patch->{PATCHFILE}:$patch->{PATCHLINENO} at $in:$lineno\n";
+ # Now replace
+ $lineno += ($patNrLines - 1);
+ $toundo -= ($patNrLines - 1);
+ $line = &applyOnePatch($patch, &lineDirective($in, $lineno + 1));
+ last;
+ }
+ }
+ print OUT $line;
+ # Now undo all but the first line
+ my $i;
+ for($i=$nrLines - $toundo;$i<$nrLines;$i++) {
+ &undoReadIncludeLine($lines[$i]);
+ }
+ }
+ close(IN) || die "Cannot close file $in";
+ # Now apply the EOF patches
+ foreach $patch (@eof_patches) {
+ if(defined $patch->{FLAGS}->{ateof}) {
+ my $line = &applyOnePatch($patch, &lineDirective($in, $lineno));
+ print OUT $line;
+ }
+ }
+
+ close(OUT);
+ return 1;
+}
+
+
+sub applyOnePatch {
+ my($patch, $after) = @_;
+ my $line = &lineDirective($patch->{PATCHFILE},
+ $patch->{PATCHLINENO});
+ $line .= $patch->{REPLACE};
+ $line .= $after;
+ # Mark that we have used this group
+ $patch->{USED} = 1;
+ if(defined $patch->{FLAGS}->{group}) {
+ $groups{$patch->{FLAGS}->{group}} = 1;
+ }
+ return $line;
+}
diff --git a/cil/bin/patcher.bat.in b/cil/bin/patcher.bat.in
new file mode 100755
index 0000000..2e356ae
--- /dev/null
+++ b/cil/bin/patcher.bat.in
@@ -0,0 +1 @@
+perl @CILHOME@/bin/patcher %*
diff --git a/cil/bin/teetwo b/cil/bin/teetwo
new file mode 100755
index 0000000..2aa68fa
--- /dev/null
+++ b/cil/bin/teetwo
@@ -0,0 +1,36 @@
+#!/bin/bash
+# run a command, sending stdout to one file and stderr to another,
+# but also sending both to this process' stdout/stderr, respectively
+
+if [ "$3" = "" ]; then
+ echo "usage: $0 stdout-file stderr-file cmd [args..]"
+ exit 0
+fi
+
+stdoutFile="$1"
+stderrFile="$2"
+command="$3"
+shift
+shift
+shift
+
+result=0
+handler() {
+ # this signal means the underlying command exit erroneously,
+ # though we don't know the code
+ echo "The command failed!"
+ result=2
+}
+trap handler SIGUSR1
+
+# dup my stdout/err on fd 3,4
+exec 3>&1
+exec 4>&2
+
+
+# run the command with tees to duplicate the data
+mypid=$$
+# echo "mypid = $mypid, command=$command, args=$@, stdout=$stdoutFile, stderr=$stderrFile"
+(("$command" "$@" || kill -s USR1 $mypid) | tee "$stdoutFile" >&3) 2>&1 | tee "$stderrFile" >&4
+
+exit $result
diff --git a/cil/bin/test-bad b/cil/bin/test-bad
new file mode 100755
index 0000000..4eacdc0
--- /dev/null
+++ b/cil/bin/test-bad
@@ -0,0 +1,202 @@
+#!/bin/sh
+# run a regression test containing one or more intentional failures
+#
+# To create a source file to be processed by this script do the following:
+# - the file should be a standalone program with main without any arguments
+# You can add other files as part of the CFLAGS variable
+# - add a comment
+# // NUMERRORS n
+# where n is the number of errors to be tested by this file
+#
+# This file is processed n+1 times. The first time, it should succeed (main returns or
+# exits with code 0) and the other n times it should fail.
+# For each run the preprocessor variable ERROR is defined to be
+# be k (0 <= k <= n).
+# You can mark certain lines in your program so that they are used ONLY in a certain run: put the
+# following comment after a line to make it appear only in the run with ERROR == 3
+#
+# some_code; // ERROR(3)
+#
+#
+# Furthermore, for each run that is intended to fail you can specify a string that
+# must appear in the output.
+#
+# some_code; // ERROR(3):this string must appear in output
+#
+# Do not put any spaces around the :
+#
+# Simple example:
+#
+# #define E(n) {printf("Error %d\n", n); exit(n); }
+# #define SUCCESS {printf("Success\n"); exit(0); }
+#
+# // NUMERRORS 3
+# int main() {
+#
+# char char x; // ERROR(1):invalid type specifier
+# int y;
+# int z = ++y;
+# // This conditional should be true
+# if(z == y) E(2); // ERROR(2):Error 2
+#
+# #if ERROR == 3
+# z = (++y, y--);
+# if(z == y + 1) E(3); // ERROR(3):Error 3
+# #endif
+#
+# SUCCESS;
+# }
+#
+#
+# set RUNONLY=n to run only the test case n
+#
+
+if [ "$1" = "" ]; then
+ # most parameters are passed by name, instead of as positional
+ # arguments, for better impedance match with Makefile; but it's
+ # good to have at least 1 positional arg so when it's missing I
+ # can easily tell, and print this message
+ echo "usage: CILHOME=... CILLY=... CFLAGS=... $0 source-file.c"
+ echo "You can also set RUNONLY=n to run only the nth iteration"
+ exit 0
+fi
+echo "CILLY=$CILLY"
+echo "CFLAGS=$CFLAGS"
+srcfile="$1"
+# Construct the name of the temporary file to use
+srcfilenoext=`echo $srcfile | sed s/.c\$//`
+tmpname="$srcfilenoext-tmp"
+
+# for GCC, use "# xx foo.c". For MSVC, use "#line xx foo.c"
+if [ "$_MSVC" != "" ]; then
+ LINEOPT="line"
+ OUTFLAG="/Fe"
+ OUTEXT=".exe"
+else
+ LINEOPT=""
+ OUTFLAG="-o "
+ OUTEXT=".exe" # So that I can delete the executables
+fi
+
+# Start it in the right directory
+# cd "$CILLYHOME/test/small2" || exit
+
+# read how many failure cases are in the file; expect line of form
+# "// NUMERRORS n"
+numcases=`grep NUMERRORS "$srcfile" | perl -e '$_ = <>; m|(\d+)|; print $1;'`
+if [ -z "$numcases" ]; then
+ echo "didn't find a string of form NUMERRORS in the file"
+ exit 2
+fi
+echo "there are $numcases failure cases in this file"
+
+
+# iterate through the cases; first case (0) is where no errors are present
+i=0
+if [ "$RUNONLY" != "" ] ;then
+ i=$RUNONLY
+fi
+while [ $i -le $numcases ]; do
+ echo
+ echo
+ echo "********************** Iteration $i"
+ echo
+ echo
+ # generate a temporary file; first hide the ERROR tags which identify
+ # the current test, then remove all remaining ERROR lines
+ # (syntax for errors has parentheses so if I have >=10 cases I don't
+ # run into problems where e.g. ERROR1 is a substring of ERROR10)
+ # use the little perl script to put line number directives where we remove
+ # lines
+ echo "generating test $i"
+ rm -f $tmpname.c 2>/dev/null
+ ( echo "#define ERROR $i"; echo "#$LINEOPT 1 \"$srcfile\"";cat "$srcfile") |\
+ sed "s|ERROR($i)|(selected: $i)|" | \
+ perl -e 'my $ln = 0; while(<>) { if($_ =~ m|ERROR\(|) { print "#'$LINEOPT' $ln\n"; } else { print $_; }; $ln ++}' \
+ > "$tmpname.c"
+ chmod a-w "$tmpname.c"
+
+ # Grab the errorline for this test case
+ themsg=`cat "$srcfile" | grep "ERROR($i).*:" | sed "s/^.*ERROR.*://" `
+ if [ "x$themsg" != "x" ] ;then
+ echo "Expecting error message:$themsg"
+ fi
+
+ # compile this with our tool
+ rm -f test-bad.out test-bad.err ${tmpname}$OUTEXT
+ echo $CILLY $CFLAGS $tmpname.c ${OUTFLAG}${tmpname}$OUTEXT
+ $CILHOME/bin/teetwo test-bad.out test-bad.err \
+ $CILLY $CFLAGS -DERROR=$i $tmpname.c ${OUTFLAG}${tmpname}$OUTEXT
+ # cat test-bad.out test-bad.err
+ status=$?
+ runit=1
+ if [ $status != 0 ]; then
+ if [ $i = 0 ] ;then
+ echo "The 0th iteration failed to CURE! It is supposed to succeed."
+ exit $status
+ else
+ if [ "x$themsg" != "x" ] ;then
+ echo "grep \"$themsg\" test-bad.out test-bad.err"
+ if ! grep "$themsg" test-bad.out test-bad.err ;then
+ echo "The ${i}th iteration failed to CURE but cannot find: $themsg"
+ exit 3
+ else
+ echo "The ${i}th iteration failed to CURE, as expected!"
+ fi
+ else
+ echo "The ${i}th iteration failed to CURE. We expected some failure!"
+ fi
+ runit=0
+ fi
+ fi
+
+ # run it
+ if [ $runit != 0 ]; then
+ echo "./$tmpname$OUTEXT"
+ rm -f test-bad.out test-bad.err
+ if $CILHOME/bin/teetwo test-bad.out test-bad.err ./$tmpname$OUTEXT ; then
+ # cat test-bad.out test-bad.err
+ if [ $i = 0 ]; then
+ # expected success on 0th iteration
+ echo "(succeeded as expected)"
+ else
+ # unexpected success on >0th iteration
+ echo "The ${i}th iteration did not fail! It is supposed to fail."
+ exit 2
+ fi
+ else
+ # cat test-bad.out test-bad.err
+ if [ $i = 0 ]; then
+ # unexpected failure on 0th iteration
+ echo "The 0th iteration failed! It is supposed to succeed."
+ #cat $tmpname.c
+ exit 2
+ else
+ # expected failure on >0th iteration
+ if [ "x$themsg" != "x" ] ;then
+ echo "grep \"$themsg\" test-bad.out test-bad.err"
+ if ! grep "$themsg" test-bad.out test-bad.err ;then
+ echo "The ${i}th iteration failed but cannot find:$themsg"
+ exit 3
+ fi
+ fi
+ echo "(failed as expected)"
+ fi
+ fi
+ fi
+
+ # possibly bail after 0th
+ if [ "$TESTBADONCE" != "" ]; then
+ echo "bailing after 0th iteration because TESTBADONCE is set"
+ exit 0
+ fi
+ if [ "$RUNONLY" != "" ]; then
+ echo "bailing after ${RUNONLY}th iteration because RUNONLY is set"
+ exit 0
+ fi
+
+ i=`expr $i + 1`
+done
+
+echo "all $numcases cases in $srcfile failed as expected"
+
diff --git a/cil/cil.itarget b/cil/cil.itarget
new file mode 100644
index 0000000..3ccdede
--- /dev/null
+++ b/cil/cil.itarget
@@ -0,0 +1,2 @@
+doc/cil.otarget
+src/cil.otarget
diff --git a/cil/cil.spec.in b/cil/cil.spec.in
new file mode 100644
index 0000000..a3b97bb
--- /dev/null
+++ b/cil/cil.spec.in
@@ -0,0 +1,90 @@
+Name: cil
+Version: @CIL_VERSION@
+Release: 1
+License: BSD
+URL: http://hal.cs.berkeley.edu/cil/
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildRequires: gcc
+BuildRequires: hevea
+BuildRequires: ocaml >= 3.08
+BuildRequires: perl >= 5.6.1
+
+# No ELF executables or shared libraries
+%define debug_package %{nil}
+
+
+########################################################################
+#
+# Package cil
+#
+
+Summary: OCaml library for C program analysis and transformation
+Group: Development/Libraries
+Requires: perl >= 5.6.1
+
+%description
+CIL (C Intermediate Language) is a high-level representation along
+with a set of tools that permit easy analysis and source-to-source
+transformation of C programs.
+
+This package provides Perl modules which are useful for building
+compiler wrappers. A wrapper can use CIL to transform C code before
+passing it along to the native C compiler.
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE
+%{_datadir}/%{name}
+
+
+########################################################################
+#
+# Package cil-devel
+#
+
+%package devel
+
+Summary: OCaml library for C program analysis and transformation
+Group: Development/Libraries
+Requires: ocaml >= 3.04
+
+%description devel
+CIL (C Intermediate Language) is a high-level representation along
+with a set of tools that permit easy analysis and source-to-source
+transformation of C programs.
+
+This package provides OCaml interfaces and an OCaml library which form
+the CIL API.
+
+%files devel
+%defattr(-,root,root,-)
+%doc LICENSE
+%{_libdir}/%{name}
+
+
+########################################################################
+#
+# General scripts
+#
+
+%prep
+%setup -q -n %{name}
+
+%build
+%configure
+make cilversion machdep
+make cillib NATIVECAML=
+make cillib NATIVECAML=1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=%buildroot install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%changelog
+* Tue Aug 5 2003 Ben Liblit
+- Initial build.
diff --git a/cil/config.guess b/cil/config.guess
new file mode 100755
index 0000000..4bf27fc
--- /dev/null
+++ b/cil/config.guess
@@ -0,0 +1,1497 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-05-13'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner .
+# Please send patches to . Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include
+ #include
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+# amd64)
+# echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ x86:Interix*:[345]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[345]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes .
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <
+# include
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 < in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/cil/config.h.in b/cil/config.h.in
new file mode 100644
index 0000000..9a2fe39
--- /dev/null
+++ b/cil/config.h.in
@@ -0,0 +1,27 @@
+#undef HAVE_WCHAR_T
+
+#undef HAVE_STDLIB_H
+
+#undef HAVE_STRINGS_H
+
+#undef HAVE_SYS_TIME_H
+
+#undef HAVE_UNISTD_H
+
+#undef HAVE_CONST
+
+#undef HAVE_INLINE
+
+#undef HAVE_TIME_H
+
+#undef HAVE_MEMCP
+
+#undef HAVE_MKDIR
+
+#undef HAVE_SELECT
+
+#undef HAVE_SOCKET
+
+#undef TYPE_SIZE_T
+
+#undef TYPE_WCHAR_T
diff --git a/cil/config.mk.in b/cil/config.mk.in
new file mode 100644
index 0000000..879885e
--- /dev/null
+++ b/cil/config.mk.in
@@ -0,0 +1,6 @@
+# A bunch of variables -*- Mode: makefile -*-
+export ARCHOS=@ARCHOS@
+export HAS_MSVC=@HAS_MSVC@
+export CILHOME=@CILHOME@
+export DEFAULT_COMPILER=@DEFAULT_COMPILER@
+export @DEFAULT_COMPILER@=1
diff --git a/cil/config.sub b/cil/config.sub
new file mode 100755
index 0000000..f0675aa
--- /dev/null
+++ b/cil/config.sub
@@ -0,0 +1,1469 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-11-30'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to . Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit 0;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k \
+ | m32r | m68000 | m68k | m88k | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | ns16k | ns32k \
+ | openrisc | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
+ | clipper-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* \
+ | m32r-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39 | mipstx39el \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ or32 | or32-*)
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i686-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3d)
+ basic_machine=alpha-cray
+ os=-unicos
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic4x | c4x*)
+ basic_machine=tic4x-unknown
+ os=-coff
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
+ basic_machine=sh-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparc | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/cil/configure b/cil/configure
new file mode 100755
index 0000000..f6e6b21
--- /dev/null
+++ b/cil/configure
@@ -0,0 +1,7005 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 &1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="src/cil.mli"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include
+#ifdef HAVE_SYS_TYPES_H
+# include
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include
+#endif
+#ifdef STDC_HEADERS
+# include
+# include
+#else
+# ifdef HAVE_STDLIB_H
+# include
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include
+# endif
+# include
+#endif
+#ifdef HAVE_STRINGS_H
+# include
+#endif
+#ifdef HAVE_INTTYPES_H
+# include
+#endif
+#ifdef HAVE_STDINT_H
+# include
+#endif
+#ifdef HAVE_UNISTD_H
+# include
+#endif"
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+target
+target_cpu
+target_vendor
+target_os
+CPP
+GREP
+EGREP
+LIBOBJS
+ARCHOS
+CILHOME
+HAS_MSVC
+DEFAULT_COMPILER
+DEFAULT_CIL_MODE
+CIL_VERSION_MAJOR
+CIL_VERSION_MINOR
+CIL_VERSION_REV
+CIL_VERSION
+CYCLES_PER_USEC
+HAS_PERFCOUNT
+HAVE_BUILTIN_VA_LIST
+THREAD_IS_KEYWORD
+UNDERSCORE_NAME
+EXTRAFEATURES
+EXTRASRCDIRS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-blockinggraph enable the blocking graph feature
+ --with-zrapp enable the zrapp pretty-printer
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L if you have libraries in a
+ nonstandard directory
+ LIBS libraries to pass to the linker, e.g. -l
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if
+ you have headers in a nonstandard directory
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# sm: require a late-enough autoconf; this is the version number
+# that's on manju, so I assume it's ok
+
+
+#
+# Assign here the CIL version numbers
+CIL_VERSION_MAJOR=1
+CIL_VERSION_MINOR=3
+CIL_VERSION_REV=6
+CIL_VERSION=$CIL_VERSION_MAJOR.$CIL_VERSION_MINOR.$CIL_VERSION_REV
+
+
+# make sure I haven't forgotten to run autoconf
+if test configure -ot configure.in; then
+ { { echo "$as_me:$LINENO: error: configure is older than configure.in; you forgot to run autoconf" >&5
+echo "$as_me: error: configure is older than configure.in; you forgot to run autoconf" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# check for C compiler; this typically finds gcc; it sets the
+# variable CC to whatever it finds, which then gets substituted
+# for @CC@ in output files; you have to do this even if you don't
+# care about @CC@, because system feature tests later on in
+# the ./configure script will expect $CC to be set right
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+# find system type (using this macro means we must include
+# the files install-sh, config.sub, and config.guess (all from
+# the autoconf distribution) in our source tree!)
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+echo "$as_me: error: invalid value of canonical target" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+
+# ---------------- generic functions -----------------
+# debugging diagnostic; set to 'echo' to debug or 'true' for production
+# (technically you're not supposed to use shell functions in
+# configure scripts, because some-obscure-sh somewhere doesn't
+# support them.. but they're too convenient to not use)
+diagnostic() {
+ #echo "$@"
+ true "$@"
+}
+
+# determine if a binary is in the path
+binaryExists() {
+ # on cygwin, 'which' always returns success, so use 'type' instead
+ if type "$1" >/dev/null 2>&1; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+
+# -------------- portable configuration ----------------
+# this specifies the root of the source tree; it's just the
+# directory where ./configure runs, except on cygwin, which
+# overrides this below
+CILHOME=`pwd`
+
+DEFAULT_COMPILER=_GNUCC
+DEFAULT_CIL_MODE=GNUCC
+
+# is the microsoft compiler available?
+# hmm.. I think we should check the version or something, because
+# sometimes people have Common Lisp's interpreter called 'cl' ..
+{ echo "$as_me:$LINENO: checking for msvc cl.exe (optional)" >&5
+echo $ECHO_N "checking for msvc cl.exe (optional)... $ECHO_C" >&6; }
+# See if CC points to the MS compiler
+if "$CC" 2>&1 | grep "Microsoft" >/dev/null; then
+ { echo "$as_me:$LINENO: result: found, set as default" >&5
+echo "${ECHO_T}found, set as default" >&6; }
+ HAS_MSVC=yes
+ DEFAULT_COMPILER=_MSVC
+ DEFAULT_CIL_MODE=MSVC
+else
+ if cl 2>&1 | grep "Microsoft" >/dev/null ;then
+ { echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; }
+ HAS_MSVC=yes
+ else
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+ HAS_MSVC=no
+ fi
+fi
+
+# is ocaml available?
+# needed binaries: ocamllex ocamlyacc ocamldep ocamlopt ocamlc
+ocamlDownloadInstructions="
+ OCaml can be downloaded from http://caml.inria.fr/ocaml/.
+ After downloading and unpacking the source distribution, in the ocaml
+ directory, do
+ ./configure
+ make world
+ make opt
+ make install
+ Then come back here and re-run ./configure."
+
+# required major/minor.
+# required major/minor
+reqMaj=3
+reqMin=08
+knownMaj=3
+knownMin=10
+{ echo "$as_me:$LINENO: checking ocaml version is at least $reqMaj.$reqMin" >&5
+echo $ECHO_N "checking ocaml version is at least $reqMaj.$reqMin... $ECHO_C" >&6; }
+if binaryExists ocamlc; then
+ # what version?
+ ver=`ocamlc -v | grep version | sed 's/^.*version //'`
+ diagnostic "ver is $ver"
+ # major: anything before the .
+ major=`echo $ver | sed 's/\..*$//'`
+ diagnostic "major is $major"
+ # minor: numbers after the .
+ # (the outer level of bracket-quotation protects the inner brackets)
+ minor=`echo $ver | sed 's/^[^.]*\.\([0-9][0-9]*\).*$/\1/'`
+ diagnostic "minor is $minor"
+
+ # I would think autoconf would already have a facility for doing
+ # these kinds of major/minor version checks, but I can't find it
+ if test $major -gt $reqMaj -o $major -ge $reqMaj -a $minor -ge $reqMin; then
+ { echo "$as_me:$LINENO: result: version is $ver, ok" >&5
+echo "${ECHO_T}version is $ver, ok" >&6; }
+
+ # sm: added this test when we found that CCured needed to be changed
+ # a little when 3.06 came out (it had previously worked with 3.04)
+ if test "$major" -gt $knownMaj -o "$major" -ge $knownMaj -a "$minor" -gt $knownMin; then
+ { echo "$as_me:$LINENO: WARNING: Your ocaml version is $ver, but the latest version this program
+ is known to work with is $knownMaj.$knownMin. If you have
+ trouble compiling, please try using an earlier version
+ or see if there is a later version of this program." >&5
+echo "$as_me: WARNING: Your ocaml version is $ver, but the latest version this program
+ is known to work with is $knownMaj.$knownMin. If you have
+ trouble compiling, please try using an earlier version
+ or see if there is a later version of this program." >&2;}
+ fi
+ else
+ { { echo "$as_me:$LINENO: error:
+ I found OCaml version $ver; this program requires at least $reqMaj.$reqMin.
+ Please download a newer OCaml distribution.
+ $ocamlDownloadInstructions
+ " >&5
+echo "$as_me: error:
+ I found OCaml version $ver; this program requires at least $reqMaj.$reqMin.
+ Please download a newer OCaml distribution.
+ $ocamlDownloadInstructions
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ # check for existence of other binaries
+ { echo "$as_me:$LINENO: checking existence of related ocaml tools" >&5
+echo $ECHO_N "checking existence of related ocaml tools... $ECHO_C" >&6; }
+ if binaryExists ocamllex && \
+ binaryExists ocamlyacc && \
+ binaryExists ocamldep && \
+ binaryExists ocamlopt; then
+ { echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6; }
+ else
+ { { echo "$as_me:$LINENO: error:
+ At least one of ocamllex, ocamlyacc, ocamldep or ocamlopt is missing.
+ In particular, ocamlopt requires you to \"make opt\" when building
+ OCaml from source. Please make sure all these tools are built and
+ in the path.
+ " >&5
+echo "$as_me: error:
+ At least one of ocamllex, ocamlyacc, ocamldep or ocamlopt is missing.
+ In particular, ocamlopt requires you to \"make opt\" when building
+ OCaml from source. Please make sure all these tools are built and
+ in the path.
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ { { echo "$as_me:$LINENO: error:
+ The \"ocamlc\" OCaml compiler was not found in the path: $PATH.
+
+ Most of this program is written in the OCaml language, so its compiler
+ is required.
+ $ocamlDownloadInstructions
+ " >&5
+echo "$as_me: error:
+ The \"ocamlc\" OCaml compiler was not found in the path: $PATH.
+
+ Most of this program is written in the OCaml language, so its compiler
+ is required.
+ $ocamlDownloadInstructions
+ " >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+#
+# ------------------- Perl ----------------
+#
+{ echo "$as_me:$LINENO: checking for Perl" >&5
+echo $ECHO_N "checking for Perl... $ECHO_C" >&6; }
+ if ! binaryExists perl; then
+ { { echo "$as_me:$LINENO: error:
+ perl not found.
+ You need perl version 5.6.1 or later for CIL.
+ You can get perl at http://www.cpan.org/src/index.html .
+ " >&5
+echo "$as_me: error:
+ perl not found.
+ You need perl version 5.6.1 or later for CIL.
+ You can get perl at http://www.cpan.org/src/index.html .
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ # sm: oh how nice it would be to just say "use English;
+ # print($PERL_VERSION)", but that appears broken on 5.6.1.. so I'm
+ # trying to say "caret right-bracket", but then that would run afoul
+ # of autoconf's quoting characters, so I use the "quadrigraph" ]
+ # to stand for right-bracket. what a mess.
+ perlver=`perl -e 'print($]);'`
+ if perl -e "exit( $perlver >= 5.006001 );"; then
+ { { echo "$as_me:$LINENO: error:
+ Found perl version $perlver, but at least 5.6.1 is required.
+ You can get a newer perl at http://www.cpan.org/src/index.html .
+ " >&5
+echo "$as_me: error:
+ Found perl version $perlver, but at least 5.6.1 is required.
+ You can get a newer perl at http://www.cpan.org/src/index.html .
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ perlport=`perl -e "print $^O;"`
+ case "$perlport" in
+ cygwin)
+ ;;
+ MSWin32) # ActivePerl
+ ;;
+ linux)
+ ;;
+ freebsd)
+ ;;
+ openbsd)
+ ;;
+ darwin) # Mac OS X
+ ;;
+ solaris)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error:
+ Unsupported Perl port $perlport -- sorry.
+ cygwin, MSWin32 (ActivePerl), linux, freebsd, openbsd, darwin,
+ and solaris are the supported ports.
+ " >&5
+echo "$as_me: error:
+ Unsupported Perl port $perlport -- sorry.
+ cygwin, MSWin32 (ActivePerl), linux, freebsd, openbsd, darwin,
+ and solaris are the supported ports.
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ esac
+{ echo "$as_me:$LINENO: result: found version $perlver, port $perlport" >&5
+echo "${ECHO_T}found version $perlver, port $perlport" >&6; }
+
+ # The cygwin port has some bugs in the File::Spec module
+if test "$perlport" = "cygwin" ;then
+ { echo "$as_me:$LINENO: checking for known cygwin Perl bug in File::Spec" >&5
+echo $ECHO_N "checking for known cygwin Perl bug in File::Spec... $ECHO_C" >&6; }
+ perlfixres=`perl -e '
+ use File::Spec;
+ if(File::Spec->file_name_is_absolute("C:/test")) {
+ print "no bug found"; exit 0;
+ } else {
+ print "bug";
+ foreach $d (@INC) {
+ if(-f "$d/File/Spec/Unix.pm") {
+ open(IN, "<$d/File/Spec/Unix.pm");
+ open(OUT, ">$d/File/Spec/Unix.pm.fixed")
+ || die "Cannot open $d/File/Spec/Unix.pm.fixed";
+ while() {
+ if($_ =~ m|sub file_name_is_absolute|) {
+ print OUT $_;
+ print OUT scalar();
+ print OUT <file_name_is_absolute("C:/test")) {
+ print "bug fixed"; exit 0;
+ } else {
+ print "cannot fix bug"; exit 1;
+ }'`
+ fi
+ if test "x$perlfixres" = "x" ;then
+ { { echo "$as_me:$LINENO: error:
+ Cannot run perl
+ " >&5
+echo "$as_me: error:
+ Cannot run perl
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ elif test "$perlfixres" = "cannot fix bug" ;then
+ { { echo "$as_me:$LINENO: error:
+ Found a bug but cannot fix it.
+ " >&5
+echo "$as_me: error:
+ Found a bug but cannot fix it.
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me:$LINENO: result: $perlfixres" >&5
+echo "${ECHO_T}$perlfixres" >&6; }
+ fi
+fi
+
+#
+# Now setup the performance counters
+#
+# At runtime, we'll try to get the cycle speed from /proc/cpuinfo
+# or FreeBSD sysctl. This means binaries can be moved to different computers.
+# CYCLES_PER_USEC is only a backup in case these aren't available.
+# (See the subversion history for the old code that read /proc/cpuinfo here.)
+{ echo "$as_me:$LINENO: checking if performance counters are usable" >&5
+echo $ECHO_N "checking if performance counters are usable... $ECHO_C" >&6; }
+# Create a C file from src/perfcount.c.in
+rm -f ./cycles.exe
+if gcc -DCONFIGURATION_ONLY \
+ -x c ocamlutil/perfcount.c.in -lm -o ./cycles.exe >/dev/null 2>&1; then
+
+ if CYCLES_PER_USEC=`./cycles.exe 2>&1` ;then
+ { echo "$as_me:$LINENO: result: ok ($CYCLES_PER_USEC cycles per us)" >&5
+echo "${ECHO_T}ok ($CYCLES_PER_USEC cycles per us)" >&6; }
+ else
+ # Print what we got
+ { echo "$as_me:$LINENO: result: no ($CYCLES_PER_USEC)" >&5
+echo "${ECHO_T}no ($CYCLES_PER_USEC)" >&6; }
+ CYCLES_PER_USEC=0
+ fi
+else
+ CYCLES_PER_USEC=0
+ { echo "$as_me:$LINENO: result: no (cannot compile perfcount.c)" >&5
+echo "${ECHO_T}no (cannot compile perfcount.c)" >&6; }
+fi
+rm -f ./cycles.exe
+
+if test "$CYCLES_PER_USEC" != "0" ;then
+ HAS_PERFCOUNT=1
+else
+ HAS_PERFCOUNT=0
+fi
+
+# additional tools we might check for:
+# - gnu make
+
+#
+# -------------------- GCC --------------
+#
+
+{ echo "$as_me:$LINENO: checking for gcc version" >&5
+echo $ECHO_N "checking for gcc version... $ECHO_C" >&6; }
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+{ echo "$as_me:$LINENO: checking for __builtin_va_list" >&5
+echo $ECHO_N "checking for __builtin_va_list... $ECHO_C" >&6; }
+if test "${ac_cv_type___builtin_va_list+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+typedef __builtin_va_list ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type___builtin_va_list=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type___builtin_va_list=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type___builtin_va_list" >&5
+echo "${ECHO_T}$ac_cv_type___builtin_va_list" >&6; }
+if test $ac_cv_type___builtin_va_list = yes; then
+ HAVE_BUILTIN_VA_LIST=true
+else
+ HAVE_BUILTIN_VA_LIST=false
+fi
+
+{ echo "$as_me:$LINENO: checking if __thread is a keyword" >&5
+echo $ECHO_N "checking if __thread is a keyword... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+int main(int __thread) { return 0; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ THREAD_IS_KEYWORD=false
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ THREAD_IS_KEYWORD=true
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $THREAD_IS_KEYWORD" >&5
+echo "${ECHO_T}$THREAD_IS_KEYWORD" >&6; }
+
+# Does gcc add underscores to identifiers to make assembly labels?
+# (I think MSVC always does)
+{ echo "$as_me:$LINENO: checking if gcc adds underscores to assembly labels." >&5
+echo $ECHO_N "checking if gcc adds underscores to assembly labels.... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+int main() { __asm__("jmp _main"); }
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ UNDERSCORE_NAME=true
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ UNDERSCORE_NAME=false
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $UNDERSCORE_NAME" >&5
+echo "${ECHO_T}$UNDERSCORE_NAME" >&6; }
+
+
+# ----------- some stuff 'autoscan' put here --------------
+# (autoscan is part of the autoconf distribution)
+
+# checks for header files
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+for ac_header in stdlib.h strings.h sys/time.h unistd.h wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# checks for typedefs, structures, and compiler characteristics
+{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_const=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_inline=$ac_kw
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6; }
+
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_time=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+# checks for library functions; more autoscan stuff
+{ echo "$as_me:$LINENO: checking for working memcmp" >&5
+echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; }
+if test "${ac_cv_func_memcmp_working+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_memcmp_working=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Some versions of memcmp are not 8-bit clean. */
+ char c0 = '\100', c1 = '\200', c2 = '\201';
+ if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+ return 1;
+
+ /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+ or more and with at least one buffer not starting on a 4-byte boundary.
+ William Lewis provided this test program. */
+ {
+ char foo[21];
+ char bar[21];
+ int i;
+ for (i = 0; i < 4; i++)
+ {
+ char *a = foo + i;
+ char *b = bar + i;
+ strcpy (a, "--------01111111");
+ strcpy (b, "--------10000000");
+ if (memcmp (a, b, 16) >= 0)
+ return 1;
+ }
+ return 0;
+ }
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_memcmp_working=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_memcmp_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
+echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; }
+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
+ *" memcmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+ ;;
+esac
+
+
+
+
+
+
+for ac_func in mkdir select socket __sysv_signal
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case declares $ac_func.
+ For example, HP-UX 11i declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# Find out the true definitions of some integer types
+
+ { echo "$as_me:$LINENO: checking for real definition of size_t" >&5
+echo $ECHO_N "checking for real definition of size_t... $ECHO_C" >&6; }
+ real_type=''
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+int foo(int x);
+size_t foo(size_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='int'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+unsigned int foo(unsigned int x);
+size_t foo(size_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='unsigned int'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+long foo(long x);
+size_t foo(size_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='long'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+unsigned long foo(unsigned long x);
+size_t foo(size_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='unsigned long'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+short foo(short x);
+size_t foo(size_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='short'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+unsigned short foo(unsigned short x);
+size_t foo(size_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='unsigned short'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+char foo(char x);
+size_t foo(size_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='char'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+unsigned char foo(unsigned char x);
+size_t foo(size_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='unsigned char'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ { { echo "$as_me:$LINENO: error: cannot find definition of size_t" >&5
+echo "$as_me: error: cannot find definition of size_t" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ cat >>confdefs.h <<_ACEOF
+#define TYPE_SIZE_T "$real_type"
+_ACEOF
+
+ { echo "$as_me:$LINENO: result: $real_type" >&5
+echo "${ECHO_T}$real_type" >&6; }
+
+
+ { echo "$as_me:$LINENO: checking for real definition of wchar_t" >&5
+echo $ECHO_N "checking for real definition of wchar_t... $ECHO_C" >&6; }
+ real_type=''
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+int foo(int x);
+wchar_t foo(wchar_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='int'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+unsigned int foo(unsigned int x);
+wchar_t foo(wchar_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='unsigned int'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+long foo(long x);
+wchar_t foo(wchar_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='long'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+unsigned long foo(unsigned long x);
+wchar_t foo(wchar_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='unsigned long'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+short foo(short x);
+wchar_t foo(wchar_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='short'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+unsigned short foo(unsigned short x);
+wchar_t foo(wchar_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='unsigned short'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+char foo(char x);
+wchar_t foo(wchar_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='char'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+/* We define a prototype with one type and the function with
+ another type. This will result in compilation error
+ unless the types are really identical. */
+unsigned char foo(unsigned char x);
+wchar_t foo(wchar_t x) { return x; }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ real_type='unsigned char'
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+ if test -z "$real_type"; then
+ { { echo "$as_me:$LINENO: error: cannot find definition of wchar_t" >&5
+echo "$as_me: error: cannot find definition of wchar_t" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ cat >>confdefs.h <<_ACEOF
+#define TYPE_WCHAR_T "$real_type"
+_ACEOF
+
+ { echo "$as_me:$LINENO: result: $real_type" >&5
+echo "${ECHO_T}$real_type" >&6; }
+
+
+
+# ----------- platform-specific code -------------
+# $target is typically processor-vendor-os
+case "$target" in
+
+ *86*linux*)
+ { echo "$as_me:$LINENO: result: configuring for linux/x86" >&5
+echo "${ECHO_T}configuring for linux/x86" >&6; }
+
+ ARCHOS=x86_LINUX
+ ;;
+
+ *86*openbsd*)
+ { echo "$as_me:$LINENO: result: configuring for OpenBSD/x86" >&5
+echo "${ECHO_T}configuring for OpenBSD/x86" >&6; }
+
+ ARCHOS=x86_OPENBSD
+ ;;
+
+ *i386*freebsd*|*amd64*freebsd*)
+
+ if test x"${ARCH}" = x""; then
+ ARCH=`uname -p`
+ fi
+
+ { echo "$as_me:$LINENO: result: configuring for freebsd/${ARCH}" >&5
+echo "${ECHO_T}configuring for freebsd/${ARCH}" >&6; }
+
+ ARCHOS=${ARCH}_FREEBSD
+ ;;
+
+
+ # Mac OS X
+ *86*darwin*)
+ { echo "$as_me:$LINENO: result: configuring for darwin/x86" >&5
+echo "${ECHO_T}configuring for darwin/x86" >&6; }
+
+ ARCHOS=x86_DARWIN
+ ;;
+
+ *powerpc*darwin*)
+ { echo "$as_me:$LINENO: result: configuring for powerpc/darwin" >&5
+echo "${ECHO_T}configuring for powerpc/darwin" >&6; }
+
+ ARCHOS=ppc_DARWIN
+ ;;
+
+ # cygwin
+ *86*cygwin*)
+ { echo "$as_me:$LINENO: result: configuring for Cygwin on win32/x86" >&5
+echo "${ECHO_T}configuring for Cygwin on win32/x86" >&6; }
+
+ ARCHOS=x86_WIN32
+
+ # override CILHOME; even on cygwin we want forward slashes
+ # sm: I folded this into what I hope will be the only
+ # case-analysis of machine type
+ #CILHOME=`cygpath -wa "$CILHOME" | sed -e "s/\\\\\/\\//g"`
+ # Try to use the Unix paths even on cygwin. The newest versions of make
+ # do not like colons in file names
+ CILHOME=`cygpath -u "$CILHOME"`
+ CC=`which $CC`
+ CC=`cygpath -wa "$CC" | sed -e "s/\\\\\/\\//g"`
+ ;;
+
+ # Solaris
+ *sparc*solaris*)
+ { echo "$as_me:$LINENO: result: configuring for SPARC/Solaris" >&5
+echo "${ECHO_T}configuring for SPARC/Solaris" >&6; }
+
+ ARCHOS=sparc_SOLARIS
+ ;;
+
+ *)
+ { { echo "$as_me:$LINENO: error:
+ Unsupported platform $target -- sorry.
+ ./configure supports these platforms:
+ on x86: Linux, Win32(with Cygwin), FreeBSD, OpenBSD, and Mac OS X
+ on amd64: FreeBSD
+ on PowerPC: Mac OS X
+ on SPARC: Solaris
+ " >&5
+echo "$as_me: error:
+ Unsupported platform $target -- sorry.
+ ./configure supports these platforms:
+ on x86: Linux, Win32(with Cygwin), FreeBSD, OpenBSD, and Mac OS X
+ on amd64: FreeBSD
+ on PowerPC: Mac OS X
+ on SPARC: Solaris
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+# Make the object directory if not already present
+as_ac_File=`echo "ac_cv_file_obj/$ARCHOS" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for obj/$ARCHOS" >&5
+echo $ECHO_N "checking for obj/$ARCHOS... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ test "$cross_compiling" = yes &&
+ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+if test -r "obj/$ARCHOS"; then
+ eval "$as_ac_File=yes"
+else
+ eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+ :
+else
+ { echo "$as_me:$LINENO: result: creating obj/$ARCHOS" >&5
+echo "${ECHO_T}creating obj/$ARCHOS" >&6; };
+ mkdir -p obj/$ARCHOS
+fi
+
+
+{ echo "$as_me:$LINENO: checking delete the obj/$ARCHOS/feature_config.ml and obj/$ARCHOS/machdep.ml file" >&5
+echo $ECHO_N "checking delete the obj/$ARCHOS/feature_config.ml and obj/$ARCHOS/machdep.ml file... $ECHO_C" >&6; }
+rm -f obj/$ARCHOS/machdep.ml
+rm -f obj/.depend/machdep.d
+rm -f obj/$ARCHOS/feature_config.ml
+rm -f obj/.depend/feature_config.d
+{ echo "$as_me:$LINENO: result: done" >&5
+echo "${ECHO_T}done" >&6; }
+
+
+
+#
+# CIL features
+#
+#
+
+# Set the defaults
+
+
+# Give a space-separated list of features with the defaults
+features="blockinggraph=no zrapp=no"
+
+
+# Check whether --with-blockinggraph was given.
+if test "${with_blockinggraph+set}" = set; then
+ withval=$with_blockinggraph;
+fi
+
+
+# Check whether --with-zrapp was given.
+if test "${with_zrapp+set}" = set; then
+ withval=$with_zrapp;
+fi
+
+
+# Now add any features specified in the command-line
+
+features="$features $EXTRAFEATURES"
+
+rm -f Makefile.features
+echo "# -*- Mode: makefile -*-">Makefile.features
+echo "# This file was generated automatically by ./configure.in">>Makefile.features
+echo "# We will not need this once configure supports multiline variables">>Makefile.features
+
+for f_val in $features
+do
+ # If there is no =, then we default to yes
+ if ! (echo $f_val | grep "=" >/dev/null) ;then f_val="$f_val=yes"; fi
+ # echo "Testing feature $f_val"
+ f=`echo $f_val | sed -e s%=.*$%%`
+ { echo "$as_me:$LINENO: checking whether to use CIL feature $f" >&5
+echo $ECHO_N "checking whether to use CIL feature $f... $ECHO_C" >&6; }
+ # default value from "features"
+ defval=`echo $f_val | sed -e s%^.*=%%`
+ # current value
+ getcurval="echo \${with_$f:=$defval}"
+ curval=`eval $getcurval`
+ { echo "$as_me:$LINENO: result: $curval" >&5
+echo "${ECHO_T}$curval" >&6; }
+ if test $curval = yes ;then
+ CIL_FEATURES="$CIL_FEATURES $f"
+ f_up=`echo $f | tr a-z A-Z`
+ echo "export USE_$f_up=yes">>Makefile.features
+ fi
+done
+echo "TYPE_SIZE_T=\"$TYPE_SIZE_T\"" >>Makefile.features
+echo "TYPE_WCHAR_T=\"$TYPE_WCHAR_T\"" >>Makefile.features
+chmod -w Makefile.features
+
+
+# ----------------- finish up -------------------
+# names of the variables that get substituted in files; for example,
+# write @ARCHOS@ somewhere in a written file to get it substituted
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# finish the configure script and generate various files; ./configure
+# will apply variable substitutions to .in to generate ;
+
+{
+ if test -f Makefile.in; then
+ ac_config_files="$ac_config_files Makefile"
+
+ else
+ true
+ #echo "skipping [Makefile] because it's not in this distribution"
+ fi
+}
+{
+ if test -f cil.spec.in; then
+ ac_config_files="$ac_config_files cil.spec"
+
+ else
+ true
+ #echo "skipping [cil.spec] because it's not in this distribution"
+ fi
+}
+{
+ if test -f config.mk.in; then
+ ac_config_files="$ac_config_files config.mk"
+
+ else
+ true
+ #echo "skipping [config.mk] because it's not in this distribution"
+ fi
+}
+{
+ if test -f test/Makefile.in; then
+ ac_config_files="$ac_config_files test/Makefile"
+
+ else
+ true
+ #echo "skipping [test/Makefile] because it's not in this distribution"
+ fi
+}
+{
+ if test -f bin/cilly.bat.in; then
+ ac_config_files="$ac_config_files bin/cilly.bat"
+
+ else
+ true
+ #echo "skipping [bin/cilly.bat] because it's not in this distribution"
+ fi
+}
+{
+ if test -f bin/patcher.bat.in; then
+ ac_config_files="$ac_config_files bin/patcher.bat"
+
+ else
+ true
+ #echo "skipping [bin/patcher.bat] because it's not in this distribution"
+ fi
+}
+{
+ if test -f bin/CilConfig.pm.in; then
+ ac_config_files="$ac_config_files bin/CilConfig.pm"
+
+ else
+ true
+ #echo "skipping [bin/CilConfig.pm] because it's not in this distribution"
+ fi
+}
+{
+ if test -f doc/index.html.in; then
+ ac_config_files="$ac_config_files doc/index.html"
+
+ else
+ true
+ #echo "skipping [doc/index.html] because it's not in this distribution"
+ fi
+}
+{
+ if test -f doc/header.html.in; then
+ ac_config_files="$ac_config_files doc/header.html"
+
+ else
+ true
+ #echo "skipping [doc/header.html] because it's not in this distribution"
+ fi
+}
+{
+ if test -f ocamlutil/perfcount.c.in; then
+ ac_config_files="$ac_config_files ocamlutil/perfcount.c"
+
+ else
+ true
+ #echo "skipping [ocamlutil/perfcount.c] because it's not in this distribution"
+ fi
+}
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to ."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "cil.spec") CONFIG_FILES="$CONFIG_FILES cil.spec" ;;
+ "config.mk") CONFIG_FILES="$CONFIG_FILES config.mk" ;;
+ "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+ "bin/cilly.bat") CONFIG_FILES="$CONFIG_FILES bin/cilly.bat" ;;
+ "bin/patcher.bat") CONFIG_FILES="$CONFIG_FILES bin/patcher.bat" ;;
+ "bin/CilConfig.pm") CONFIG_FILES="$CONFIG_FILES bin/CilConfig.pm" ;;
+ "doc/index.html") CONFIG_FILES="$CONFIG_FILES doc/index.html" ;;
+ "doc/header.html") CONFIG_FILES="$CONFIG_FILES doc/header.html" ;;
+ "ocamlutil/perfcount.c") CONFIG_FILES="$CONFIG_FILES ocamlutil/perfcount.c" ;;
+
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+target!$target$ac_delim
+target_cpu!$target_cpu$ac_delim
+target_vendor!$target_vendor$ac_delim
+target_os!$target_os$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+ARCHOS!$ARCHOS$ac_delim
+CILHOME!$CILHOME$ac_delim
+HAS_MSVC!$HAS_MSVC$ac_delim
+DEFAULT_COMPILER!$DEFAULT_COMPILER$ac_delim
+DEFAULT_CIL_MODE!$DEFAULT_CIL_MODE$ac_delim
+CIL_VERSION_MAJOR!$CIL_VERSION_MAJOR$ac_delim
+CIL_VERSION_MINOR!$CIL_VERSION_MINOR$ac_delim
+CIL_VERSION_REV!$CIL_VERSION_REV$ac_delim
+CIL_VERSION!$CIL_VERSION$ac_delim
+CYCLES_PER_USEC!$CYCLES_PER_USEC$ac_delim
+HAS_PERFCOUNT!$HAS_PERFCOUNT$ac_delim
+HAVE_BUILTIN_VA_LIST!$HAVE_BUILTIN_VA_LIST$ac_delim
+THREAD_IS_KEYWORD!$THREAD_IS_KEYWORD$ac_delim
+UNDERSCORE_NAME!$UNDERSCORE_NAME$ac_delim
+EXTRAFEATURES!$EXTRAFEATURES$ac_delim
+EXTRASRCDIRS!$EXTRASRCDIRS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 80; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status. If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless. But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+ sed -n '
+ t rset
+ :rset
+ s/^[ ]*#[ ]*define[ ][ ]*//
+ t ok
+ d
+ :ok
+ s/[\\&,]/\\&/g
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+ ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+ # Write a here document:
+ cat >>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
+b
+:def
+_ACEOF
+ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+ grep . conftest.tail >/dev/null || break
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+ if test x"$ac_file" != x-; then
+ echo "/* $configure_input */" >"$tmp/config.h"
+ cat "$ac_result" >>"$tmp/config.h"
+ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f $ac_file
+ mv "$tmp/config.h" $ac_file
+ fi
+ else
+ echo "/* $configure_input */"
+ cat "$ac_result"
+ fi
+ rm -f "$tmp/out12"
+ ;;
+
+
+ esac
+
+
+ case $ac_file$ac_mode in
+ "Makefile":F) chmod a-w Makefile ;;
+ "cil.spec":F) chmod a-w cil.spec ;;
+ "config.mk":F) chmod a-w config.mk ;;
+ "test/Makefile":F) chmod a-w test/Makefile ;;
+ "bin/cilly.bat":F) chmod a-w,a+x bin/cilly.bat ;;
+ "bin/patcher.bat":F) chmod a-w,a+x bin/patcher.bat ;;
+ "bin/CilConfig.pm":F) chmod a-w bin/CilConfig.pm ;;
+ "doc/index.html":F) chmod a-w doc/index.html ;;
+ "doc/header.html":F) chmod a-w doc/header.html ;;
+ "ocamlutil/perfcount.c":F) chmod a-w ocamlutil/perfcount.c ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+# show the user what the variables have been set to
+cat </dev/null 2>&1; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+
+# -------------- portable configuration ----------------
+# this specifies the root of the source tree; it's just the
+# directory where ./configure runs, except on cygwin, which
+# overrides this below
+CILHOME=`pwd`
+
+DEFAULT_COMPILER=_GNUCC
+DEFAULT_CIL_MODE=GNUCC
+
+# is the microsoft compiler available?
+# hmm.. I think we should check the version or something, because
+# sometimes people have Common Lisp's interpreter called 'cl' ..
+AC_MSG_CHECKING(for msvc cl.exe (optional))
+# See if CC points to the MS compiler
+if "$CC" 2>&1 | grep "Microsoft" >/dev/null; then
+ AC_MSG_RESULT([found, set as default])
+ HAS_MSVC=yes
+ DEFAULT_COMPILER=_MSVC
+ DEFAULT_CIL_MODE=MSVC
+else
+ if cl 2>&1 | grep "Microsoft" >/dev/null ;then
+ AC_MSG_RESULT(found)
+ HAS_MSVC=yes
+ else
+ AC_MSG_RESULT(not found)
+ HAS_MSVC=no
+ fi
+fi
+
+# is ocaml available?
+# needed binaries: ocamllex ocamlyacc ocamldep ocamlopt ocamlc
+ocamlDownloadInstructions="
+ OCaml can be downloaded from http://caml.inria.fr/ocaml/.
+ After downloading and unpacking the source distribution, in the ocaml
+ directory, do
+ ./configure
+ make world
+ make opt
+ make install
+ Then come back here and re-run ./configure."
+
+# required major/minor.
+# required major/minor
+reqMaj=3
+reqMin=08
+knownMaj=3
+knownMin=10
+AC_MSG_CHECKING(ocaml version is at least $reqMaj.$reqMin)
+if binaryExists ocamlc; then
+ # what version?
+ ver=`ocamlc -v | grep version | sed 's/^.*version //'`
+ diagnostic "ver is $ver"
+ # major: anything before the .
+ major=`echo $ver | sed 's/\..*$//'`
+ diagnostic "major is $major"
+ # minor: numbers after the .
+ # (the outer level of bracket-quotation protects the inner brackets)
+ [minor=`echo $ver | sed 's/^[^.]*\.\([0-9][0-9]*\).*$/\1/'`]
+ diagnostic "minor is $minor"
+
+ # I would think autoconf would already have a facility for doing
+ # these kinds of major/minor version checks, but I can't find it
+ if test $major -gt $reqMaj -o $major -ge $reqMaj -a $minor -ge $reqMin; then
+ AC_MSG_RESULT([version is $ver, ok])
+
+ # sm: added this test when we found that CCured needed to be changed
+ # a little when 3.06 came out (it had previously worked with 3.04)
+ if test "$major" -gt $knownMaj -o "$major" -ge $knownMaj -a "$minor" -gt $knownMin; then
+ AC_MSG_WARN([Your ocaml version is $ver, but the latest version this program
+ is known to work with is $knownMaj.$knownMin. If you have
+ trouble compiling, please try using an earlier version
+ or see if there is a later version of this program.])
+ fi
+ else
+ AC_MSG_ERROR([
+ I found OCaml version $ver; this program requires at least $reqMaj.$reqMin.
+ Please download a newer OCaml distribution.
+ $ocamlDownloadInstructions
+ ])
+ fi
+
+ # check for existence of other binaries
+ AC_MSG_CHECKING(existence of related ocaml tools)
+ if binaryExists ocamllex && \
+ binaryExists ocamlyacc && \
+ binaryExists ocamldep && \
+ binaryExists ocamlopt; then
+ AC_MSG_RESULT(ok)
+ else
+ AC_MSG_ERROR([
+ At least one of ocamllex, ocamlyacc, ocamldep or ocamlopt is missing.
+ In particular, ocamlopt requires you to "make opt" when building
+ OCaml from source. Please make sure all these tools are built and
+ in the path.
+ ])
+ fi
+else
+ AC_MSG_ERROR([
+ The "ocamlc" OCaml compiler was not found in the path: $PATH.
+
+ Most of this program is written in the OCaml language, so its compiler
+ is required.
+ $ocamlDownloadInstructions
+ ])
+fi
+
+#
+# ------------------- Perl ----------------
+#
+AC_MSG_CHECKING([for Perl])
+ if ! binaryExists perl; then
+ AC_MSG_ERROR([
+ perl not found.
+ You need perl version 5.6.1 or later for CIL.
+ You can get perl at http://www.cpan.org/src/index.html .
+ ])
+ fi
+
+ # sm: oh how nice it would be to just say "use English;
+ # print($PERL_VERSION)", but that appears broken on 5.6.1.. so I'm
+ # trying to say "caret right-bracket", but then that would run afoul
+ # of autoconf's quoting characters, so I use the "quadrigraph" @:>@
+ # to stand for right-bracket. what a mess.
+ perlver=`perl -e 'print($@:>@);'`
+ if perl -e "exit( $perlver >= 5.006001 );"; then
+ AC_MSG_ERROR([
+ Found perl version $perlver, but at least 5.6.1 is required.
+ You can get a newer perl at http://www.cpan.org/src/index.html .
+ ])
+ fi
+
+ perlport=`perl -e "print $^O;"`
+ case "$perlport" in
+ cygwin)
+ ;;
+ MSWin32) # ActivePerl
+ ;;
+ linux)
+ ;;
+ freebsd)
+ ;;
+ openbsd)
+ ;;
+ darwin) # Mac OS X
+ ;;
+ solaris)
+ ;;
+ *)
+ AC_MSG_ERROR([
+ Unsupported Perl port $perlport -- sorry.
+ cygwin, MSWin32 (ActivePerl), linux, freebsd, openbsd, darwin,
+ and solaris are the supported ports.
+ ])
+ esac
+AC_MSG_RESULT([found version $perlver, port $perlport])
+
+ # The cygwin port has some bugs in the File::Spec module
+if test "$perlport" = "cygwin" ;then
+ AC_MSG_CHECKING([for known cygwin Perl bug in File::Spec])
+ perlfixres=[`perl -e '
+ use File::Spec;
+ if(File::Spec->file_name_is_absolute("C:/test")) {
+ print "no bug found"; exit 0;
+ } else {
+ print "bug";
+ foreach $d (@INC) {
+ if(-f "$d/File/Spec/Unix.pm") {
+ open(IN, "<$d/File/Spec/Unix.pm");
+ open(OUT, ">$d/File/Spec/Unix.pm.fixed")
+ || die "Cannot open $d/File/Spec/Unix.pm.fixed";
+ while() {
+ if($_ =~ m|sub file_name_is_absolute|) {
+ print OUT $_;
+ print OUT scalar();
+ print OUT <file_name_is_absolute("C:/test")) {
+ print "bug fixed"; exit 0;
+ } else {
+ print "cannot fix bug"; exit 1;
+ }'`
+ fi
+ if test "x$perlfixres" = "x" ;then
+ AC_MSG_ERROR([
+ Cannot run perl
+ ])
+ elif test "$perlfixres" = "cannot fix bug" ;then
+ AC_MSG_ERROR([
+ Found a bug but cannot fix it.
+ ])
+ else
+ AC_MSG_RESULT([$perlfixres])
+ fi
+fi
+
+#
+# Now setup the performance counters
+#
+# At runtime, we'll try to get the cycle speed from /proc/cpuinfo
+# or FreeBSD sysctl. This means binaries can be moved to different computers.
+# CYCLES_PER_USEC is only a backup in case these aren't available.
+# (See the subversion history for the old code that read /proc/cpuinfo here.)
+AC_MSG_CHECKING(if performance counters are usable)
+# Create a C file from src/perfcount.c.in
+rm -f ./cycles.exe
+if gcc -DCONFIGURATION_ONLY \
+ -x c ocamlutil/perfcount.c.in -lm -o ./cycles.exe >/dev/null 2>&1; then
+
+ if CYCLES_PER_USEC=`./cycles.exe 2>&1` ;then
+ AC_MSG_RESULT([ok ($CYCLES_PER_USEC cycles per us)])
+ else
+ # Print what we got
+ AC_MSG_RESULT([no ($CYCLES_PER_USEC)])
+ CYCLES_PER_USEC=0
+ fi
+else
+ CYCLES_PER_USEC=0
+ AC_MSG_RESULT([no (cannot compile perfcount.c)])
+fi
+rm -f ./cycles.exe
+
+if test "$CYCLES_PER_USEC" != "0" ;then
+ HAS_PERFCOUNT=1
+else
+ HAS_PERFCOUNT=0
+fi
+
+# additional tools we might check for:
+# - gnu make
+
+#
+# -------------------- GCC --------------
+#
+
+AC_MSG_CHECKING([for gcc version])
+AC_CHECK_TYPE(__builtin_va_list,
+ HAVE_BUILTIN_VA_LIST=true,
+ HAVE_BUILTIN_VA_LIST=false)
+AC_MSG_CHECKING([if __thread is a keyword])
+AC_COMPILE_IFELSE([int main(int __thread) { return 0; }],
+ THREAD_IS_KEYWORD=false,
+ THREAD_IS_KEYWORD=true)
+AC_MSG_RESULT($THREAD_IS_KEYWORD)
+
+# Does gcc add underscores to identifiers to make assembly labels?
+# (I think MSVC always does)
+AC_MSG_CHECKING([if gcc adds underscores to assembly labels.])
+AC_LINK_IFELSE([int main() { __asm__("jmp _main"); }],
+ UNDERSCORE_NAME=true,
+ UNDERSCORE_NAME=false)
+AC_MSG_RESULT($UNDERSCORE_NAME)
+
+
+# ----------- some stuff 'autoscan' put here --------------
+# (autoscan is part of the autoconf distribution)
+
+# checks for header files
+AC_HEADER_STDC
+AC_CHECK_HEADERS(stdlib.h strings.h sys/time.h unistd.h wchar.h)
+
+# checks for typedefs, structures, and compiler characteristics
+AC_C_CONST
+AC_C_INLINE
+AC_HEADER_TIME
+
+# checks for library functions; more autoscan stuff
+AC_FUNC_MEMCMP
+AC_CHECK_FUNCS(mkdir select socket __sysv_signal)
+
+# Find out the true definitions of some integer types
+CIL_CHECK_INTEGER_TYPE(size_t, TYPE_SIZE_T)
+CIL_CHECK_INTEGER_TYPE(wchar_t, TYPE_WCHAR_T)
+
+
+# ----------- platform-specific code -------------
+# $target is typically processor-vendor-os
+case "$target" in
+
+ *86*linux*)
+ AC_MSG_RESULT(configuring for linux/x86)
+
+ ARCHOS=x86_LINUX
+ ;;
+
+ *86*openbsd*)
+ AC_MSG_RESULT(configuring for OpenBSD/x86)
+
+ ARCHOS=x86_OPENBSD
+ ;;
+
+ *i386*freebsd*|*amd64*freebsd*)
+
+ if test x"${ARCH}" = x""; then
+ ARCH=`uname -p`
+ fi
+
+ AC_MSG_RESULT(configuring for freebsd/${ARCH})
+
+ ARCHOS=${ARCH}_FREEBSD
+ ;;
+
+
+ # Mac OS X
+ *86*darwin*)
+ AC_MSG_RESULT(configuring for darwin/x86)
+
+ ARCHOS=x86_DARWIN
+ ;;
+
+ *powerpc*darwin*)
+ AC_MSG_RESULT(configuring for powerpc/darwin, which we treat like linux/x86)
+
+ ARCHOS=ppc_DARWIN
+ ;;
+
+ # cygwin
+ *86*cygwin*)
+ AC_MSG_RESULT(configuring for Cygwin on win32/x86)
+
+ ARCHOS=x86_WIN32
+
+ # override CILHOME; even on cygwin we want forward slashes
+ # sm: I folded this into what I hope will be the only
+ # case-analysis of machine type
+ #CILHOME=`cygpath -wa "$CILHOME" | sed -e "s/\\\\\/\\//g"`
+ # Try to use the Unix paths even on cygwin. The newest versions of make
+ # do not like colons in file names
+ CILHOME=`cygpath -u "$CILHOME"`
+ CC=`which $CC`
+ CC=`cygpath -wa "$CC" | sed -e "s/\\\\\/\\//g"`
+ ;;
+
+ # Solaris
+ *sparc*solaris*)
+ AC_MSG_RESULT(configuring for SPARC/Solaris)
+
+ ARCHOS=sparc_SOLARIS
+ ;;
+
+ *)
+ AC_MSG_ERROR([
+ Unsupported platform $target -- sorry.
+ ./configure supports these platforms:
+ on x86: Linux, Win32(with Cygwin), FreeBSD, OpenBSD, and Mac OS X
+ on amd64: FreeBSD
+ on PowerPC: Mac OS X
+ on SPARC: Solaris
+ ])
+ ;;
+esac
+
+# Make the object directory if not already present
+AC_CHECK_FILE(obj/$ARCHOS,, AC_MSG_RESULT(creating obj/$ARCHOS);
+ mkdir -p obj/$ARCHOS)
+
+AC_MSG_CHECKING([delete the obj/$ARCHOS/feature_config.ml and obj/$ARCHOS/machdep.ml file])
+rm -f obj/$ARCHOS/machdep.ml
+rm -f obj/.depend/machdep.d
+rm -f obj/$ARCHOS/feature_config.ml
+rm -f obj/.depend/feature_config.d
+AC_MSG_RESULT([done])
+
+
+
+#
+# CIL features
+#
+#
+
+# Set the defaults
+
+
+# Give a space-separated list of features with the defaults
+features="blockinggraph=no zrapp=no"
+
+AC_ARG_WITH(blockinggraph,
+ AC_HELP_STRING([--with-blockinggraph],
+ [enable the blocking graph feature]))
+AC_ARG_WITH(zrapp,
+ AC_HELP_STRING([--with-zrapp],
+ [enable the zrapp pretty-printer]))
+
+# Now add any features specified in the command-line
+
+features="$features $EXTRAFEATURES"
+
+rm -f Makefile.features
+echo "# -*- Mode: makefile -*-">Makefile.features
+echo "# This file was generated automatically by ./configure.in">>Makefile.features
+echo "# We will not need this once configure supports multiline variables">>Makefile.features
+
+for f_val in $features
+do
+ # If there is no =, then we default to yes
+ if ! (echo $f_val | grep "=" >/dev/null) ;then f_val="$f_val=yes"; fi
+ # echo "Testing feature $f_val"
+ f=`echo $f_val | sed -e s%=.*$%%`
+ AC_MSG_CHECKING(whether to use CIL feature $f)
+ # default value from "features"
+ defval=`echo $f_val | sed -e s%^.*=%%`
+ # current value
+ getcurval="echo \${with_$f:=$defval}"
+ curval=`eval $getcurval`
+ AC_MSG_RESULT($curval)
+ if test $curval = yes ;then
+ CIL_FEATURES="$CIL_FEATURES $f"
+ f_up=`echo $f | tr a-z A-Z`
+ echo "export USE_$f_up=yes">>Makefile.features
+ fi
+done
+echo "TYPE_SIZE_T=\"$TYPE_SIZE_T\"" >>Makefile.features
+echo "TYPE_WCHAR_T=\"$TYPE_WCHAR_T\"" >>Makefile.features
+chmod -w Makefile.features
+
+
+# ----------------- finish up -------------------
+# names of the variables that get substituted in files; for example,
+# write @ARCHOS@ somewhere in a written file to get it substituted
+AC_SUBST(ARCHOS)
+AC_SUBST(CILHOME)
+AC_SUBST(HAS_MSVC)
+AC_SUBST(DEFAULT_COMPILER)
+AC_SUBST(DEFAULT_CIL_MODE)
+AC_SUBST(CIL_VERSION_MAJOR)
+AC_SUBST(CIL_VERSION_MINOR)
+AC_SUBST(CIL_VERSION_REV)
+AC_SUBST(CIL_VERSION)
+AC_SUBST(CYCLES_PER_USEC)
+AC_SUBST(HAS_PERFCOUNT)
+AC_SUBST(HAVE_BUILTIN_VA_LIST)
+AC_SUBST(THREAD_IS_KEYWORD)
+AC_SUBST(UNDERSCORE_NAME)
+AC_SUBST(EXTRAFEATURES)
+AC_SUBST(EXTRASRCDIRS)
+
+# finish the configure script and generate various files; ./configure
+# will apply variable substitutions to .in to generate ;
+
+CIL_CONFIG_FILES(Makefile)
+CIL_CONFIG_FILES(cil.spec)
+CIL_CONFIG_FILES(config.mk)
+CIL_CONFIG_FILES(test/Makefile)
+CIL_CONFIG_EXE_FILES(bin/cilly.bat)
+CIL_CONFIG_EXE_FILES(bin/patcher.bat)
+CIL_CONFIG_FILES(bin/CilConfig.pm)
+CIL_CONFIG_FILES(doc/index.html)
+CIL_CONFIG_FILES(doc/header.html)
+CIL_CONFIG_FILES(ocamlutil/perfcount.c)
+
+AC_OUTPUT()
+
+# show the user what the variables have been set to
+cat < Fri, 15 Jan 2008 14:00:52 +0200
+
+cil (1.3.5-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Luis Cañas DÃÂaz Tue, 17 Apr 2007 18:30:53 +0200
+
+cil (1.3.2-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Ben Liblit Sat, 5 Mar 2005 22:08:14 -0600
+
+cinterlang (1.3.1-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Jesus M. Gonzalez-Barahona Thu, 19 Aug 2004 15:46:39 +0000
+
+cinterlang (1.2.5-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Jesus M. Gonzalez-Barahona Wed, 18 Aug 2004 00:40:43 +0200
diff --git a/cil/debian/cil-dev.install b/cil/debian/cil-dev.install
new file mode 100644
index 0000000..d7ff26f
--- /dev/null
+++ b/cil/debian/cil-dev.install
@@ -0,0 +1,2 @@
+usr/lib
+usr/share/doc/cil-dev
diff --git a/cil/debian/cil.install b/cil/debian/cil.install
new file mode 100644
index 0000000..7102075
--- /dev/null
+++ b/cil/debian/cil.install
@@ -0,0 +1,2 @@
+usr/share/cil
+usr/share/doc/cil
diff --git a/cil/debian/compat b/cil/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/cil/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/cil/debian/control b/cil/debian/control
new file mode 100644
index 0000000..cd7b7c2
--- /dev/null
+++ b/cil/debian/control
@@ -0,0 +1,29 @@
+Source: cil
+Section: devel
+Priority: optional
+Maintainer: Ben Liblit
+Build-Depends: autotools-dev, debhelper (>= 4.0.0), fakeroot, hevea, libc6-i686, libncurses5-dev, locales, ocaml-base-nox (>= 3.08), ocaml-interp (>= 3.08), ocaml-nox (>= 3.08), perl-base (>= 5.6.1)
+Standards-Version: 3.6.1
+
+Package: cil
+Architecture: any
+Depends: perl (>= 5.6.1)
+Description: OCaml library for C program analysis and transformation
+ CIL (C Intermediate Language) is a high-level representation along
+ with a set of tools that permit easy analysis and source-to-source
+ transformation of C programs.
+ .
+ This package provides Perl modules which are useful for building
+ compiler wrappers. A wrapper can use CIL to transform C code before
+ passing it along to the native C compiler.
+
+Package: cil-dev
+Architecture: any
+Depends: ocaml (>= 3.08)
+Description: OCaml library for C program analysis and transformation
+ CIL (C Intermediate Language) is a high-level representation along
+ with a set of tools that permit easy analysis and source-to-source
+ transformation of C programs.
+ .
+ This package provides OCaml interfaces and an OCaml library which form
+ the CIL API.
diff --git a/cil/debian/copyright b/cil/debian/copyright
new file mode 100644
index 0000000..d92d6d7
--- /dev/null
+++ b/cil/debian/copyright
@@ -0,0 +1,46 @@
+This package is maintained by Ben Liblit based on
+initial debianizing by Jesus M. Gonzalez-Barahona .
+
+It was downloaded from http://manju.cs.berkeley.edu/cil/distrib
+
+Upstream Authors: George C. Necula ,
+ Scott McPeak ,
+ Wes Weimer ,
+ Ben Liblit
+
+Copyright:
+
+Copyright (c) 2001-2005,
+ George C. Necula
+ Scott McPeak
+ Wes Weimer
+ Ben Liblit
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. The names of the contributors may not be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+(See http://www.opensource.org/licenses/bsd-license.php)
diff --git a/cil/debian/rules b/cil/debian/rules
new file mode 100755
index 0000000..b88b429
--- /dev/null
+++ b/cil/debian/rules
@@ -0,0 +1,90 @@
+#!/usr/bin/make -f
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+
+config.status: configure
+ dh_testdir
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+build: debian/build-stamp
+
+debian/build-stamp: config.status
+ dh_testdir
+ # Add here commands to compile the package.
+ $(MAKE) setup #doc
+ touch $@
+
+check: build
+ $(MAKE) check
+
+
+clean: config.status
+ dh_testdir
+ dh_testroot
+ rm -f debian/build-stamp
+ # Add here commands to clean up after the build process.
+ -$(MAKE) distclean
+ rm -f config.status
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+ mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/cil/html
+ mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/cil-dev
+ cp LICENSE $(CURDIR)/debian/tmp/usr/share/doc/cil/
+ cp LICENSE $(CURDIR)/debian/tmp/usr/share/doc/cil-dev/
+ #cp -f doc/*.html $(CURDIR)/debian/tmp/usr/share/doc/cil/html
+ #cp -f doc/*.gif $(CURDIR)/debian/tmp/usr/share/doc/cil/html
+ #cp -a doc/api $(CURDIR)/debian/tmp/usr/share/doc/cil/html
+ #cp -a doc/*.pdf $(CURDIR)/debian/tmp/usr/share/doc/cil
+ #cp -a doc/examples $(CURDIR)/debian/tmp/usr/share/doc/cil
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_install --list-missing --sourcedir=$(CURDIR)/debian/tmp
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/cil/debian/watch b/cil/debian/watch
new file mode 100644
index 0000000..83b9d32
--- /dev/null
+++ b/cil/debian/watch
@@ -0,0 +1,6 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site Directory Pattern Version Script
+version=2
+http://manju.cs.berkeley.edu/cil/distrib/cil-(.*)\.tar\.gz
diff --git a/cil/doc/.cvsignore b/cil/doc/.cvsignore
new file mode 100644
index 0000000..4726247
--- /dev/null
+++ b/cil/doc/.cvsignore
@@ -0,0 +1,24 @@
+*.mfj
+*.dvi
+*.aux
+*.ps
+*.log
+*.blg
+*.bbl
+*.lof
+*.lot
+*.toc
+*.pdf
+*.png
+*.out
+*.xyc
+*.xyd
+auto
+cil-api.tex
+cil.version.tex
+cilpp.tex
+cilcode.tmp
+cil.version
+header.html
+index.html
+ocamldoc.sty
diff --git a/cil/doc/cil.itarget b/cil/doc/cil.itarget
new file mode 100644
index 0000000..871e1cf
--- /dev/null
+++ b/cil/doc/cil.itarget
@@ -0,0 +1 @@
+cil.docdir/index.html
diff --git a/cil/doc/cil.odocl b/cil/doc/cil.odocl
new file mode 100644
index 0000000..97972da
--- /dev/null
+++ b/cil/doc/cil.odocl
@@ -0,0 +1,11 @@
+Alpha
+Cfg
+Cil
+Cillower
+Clist
+Dataflow
+Dominators
+Errormsg
+Formatcil
+Pretty
+Stats
diff --git a/cil/doc/cil.tex b/cil/doc/cil.tex
new file mode 100644
index 0000000..f50c1ea
--- /dev/null
+++ b/cil/doc/cil.tex
@@ -0,0 +1,3834 @@
+\documentclass{article}
+
+\usepackage{hevea}
+
+% ww: this gibberish is ignored by hevea but makes the PDF look better
+\begin{latexonly}
+\oddsidemargin 4.5pc
+\evensidemargin 4.5pc
+\advance\oddsidemargin by -1.2in
+\advance\evensidemargin by -1.2in
+\marginparwidth 0pt
+\marginparsep 11pt
+\topmargin 4.5pc
+\advance\topmargin by -1in
+\headheight 0pt
+\headsep 0pt
+\advance\topmargin by -37pt
+\headheight 12pt
+\headsep 25pt
+\textheight 666pt
+\textwidth 44pc
+\end{latexonly}
+
+% cilversion.tex is generated automatically to define \cilversion
+\include{cil.version}
+
+\def\secref#1{Section~\ref{sec-#1}}
+\def\chref#1{Chapter~\ref{ch-#1}}
+
+\def\apiref#1#2#3{\ahref{api/#1.html\##2#3}{#1.#3}}
+\def\moduleref#1{\ahref{api/#1.html}{#1}}
+
+% Use this to refer to a Cil type/val
+\def\ciltyperef#1{\apiref{Cil}{TYPE}{#1}}
+\def\cilvalref#1{\apiref{Cil}{VAL}{#1}}
+\def\cilvisit#1{\apiref{Cil.cilVisitor}{#1}}
+\def\cilprinter#1{\apiref{Cil.cilPrinter}{#1}}
+
+% Use this to refer to a type/val in the Pretty module
+\def\ptyperef#1{\apiref{Pretty}{TYPE}{#1}}
+\def\pvalref#1{\apiref{Pretty}{VAL}{#1}}
+
+% Use this to refer to a type/val in the Errormsg module
+\def\etyperef#1{\apiref{Errormsg}{TYPE}{#1}}
+\def\evalref#1{\apiref{Errormsg}{VAL}{#1}}
+
+\def\formatcilvalref#1{\apiref{Formatcil}{VAL}{#1}}
+\def\cfgref#1{\apiref{Cfg}{VAL}{#1}}
+
+
+%----------------------------------------------------------------------
+% MACROS
+
+\newcommand{\hsp}{\hspace{0.5in}}
+\def\t#1{{\tt #1}}
+\newcommand\codecolor{\ifhevea\blue\else\fi}
+\renewcommand\c[1]{{\codecolor #1}} % Use for code fragments
+
+%%% Define an environment for code
+%% Unfortunately since hevea is not quite TeX you have to use this as follows
+%\begin{code}
+% ...
+%\end{verbatim}\end{code}
+\def\code{\begingroup\codecolor\begin{verbatim}}
+\def\endcode{\endgroup}
+
+%use this for links to external pages. It will open pages in the
+%top frame.
+\newcommand\ahreftop[2]{{\ahref{javascript:loadTop('#1')}{#2}}}
+
+%----------------------------------------------------------------------
+
+% Make sure that most documents show up in the main frame,
+% and define javascript:loadTop for those links that should fill the window.
+\makeatletter
+\let\oldmeta=\@meta
+\def\@meta{%
+\oldmeta
+\begin{rawhtml}
+
+
+\end{rawhtml}}
+\makeatother
+
+\begin{document}
+\begin{latexonly}
+\title{CIL: Infrastructure for C Program Analysis and Transformation}
+\end{latexonly}
+\maketitle
+
+
+\section{Introduction}
+
+ New: CIL now has a Source Forge page:
+ \ahreftop{http://sourceforge.net/projects/cil}
+ {http://sourceforge.net/projects/cil}.
+
+ CIL ({\bf C} {\bf I}ntermediate {\bf L}anguage) is a high-level representation
+along with a set of tools that permit easy analysis and source-to-source
+transformation of C programs.
+
+ CIL is both lower-level than abstract-syntax trees, by clarifying ambiguous
+constructs and removing redundant ones, and also higher-level than typical
+intermediate languages designed for compilation, by maintaining types and a
+close relationship with the source program. The main advantage of CIL is that
+it compiles all valid C programs into a few core constructs with a very clean
+semantics. Also CIL has a syntax-directed type system that makes it easy to
+analyze and manipulate C programs. Furthermore, the CIL front-end is able to
+process not only ANSI-C programs but also those using Microsoft C or GNU C
+extensions. If you do not use CIL and want instead to use just a C parser and
+analyze programs expressed as abstract-syntax trees then your analysis will
+have to handle a lot of ugly corners of the language (let alone the fact that
+parsing C itself is not a trivial task). See \secref{simplec} for some
+examples of such extreme programs that CIL simplifies for you.
+
+ In essence, CIL is a highly-structured, ``clean'' subset of C. CIL features a
+reduced number of syntactic and conceptual forms. For example, all looping
+constructs are reduced to a single form, all function bodies are given
+explicit {\tt return} statements, syntactic sugar like {\tt "->"} is
+eliminated and function arguments with array types become pointers. (For an
+extensive list of how CIL simplifies C programs, see \secref{cabs2cil}.)
+This reduces the number of cases that must be considered when manipulating a C
+program. CIL also separates type declarations from code and flattens scopes
+within function bodies. This structures the program in a manner more amenable
+to rapid analysis and transformation. CIL computes the types of all program
+expressions, and makes all type promotions and casts explicit. CIL supports
+all GCC and MSVC extensions except for nested functions and complex numbers.
+Finally, CIL organizes C's imperative features into expressions, instructions
+and statements based on the presence and absence of side-effects and
+control-flow. Every statement can be annotated with successor and predecessor
+information. Thus CIL provides an integrated program representation that can
+be used with routines that require an AST (e.g. type-based analyses and
+pretty-printers), as well as with routines that require a CFG (e.g., dataflow
+analyses). CIL also supports even lower-level representations (e.g.,
+three-address code), see \secref{Extension}.
+
+ CIL comes accompanied by a number of Perl scripts that perform generally
+useful operations on code:
+\begin{itemize}
+\item A \ahrefloc{sec-driver}{driver} which behaves as either the \t{gcc} or
+Microsoft VC compiler and can invoke the preprocessor followed by the CIL
+application. The advantage of this script is that you can easily use CIL and
+the analyses written for CIL with existing make files.
+\item A \ahrefloc {sec-merger}{whole-program merger} that you can use as a
+replacement for your compiler and it learns all the files you compile when you
+make a project and merges all of the preprocessed source files into a single
+one. This makes it easy to do whole-program analysis.
+\item A \ahrefloc{sec-patcher}{patcher} makes it easy to create modified
+copies of the system include files. The CIL driver can then be told to use
+these patched copies instead of the standard ones.
+\end{itemize}
+
+ CIL has been tested very extensively. It is able to process the SPECINT95
+benchmarks, the Linux kernel, GIMP and other open-source projects. All of
+these programs are compiled to the simple CIL and then passed to \t{gcc} and
+they still run! We consider the compilation of Linux a major feat especially
+since Linux contains many of the ugly GCC extensions (see \secref{ugly-gcc}).
+This adds to about 1,000,000 lines of code that we tested it on. It is also
+able to process the few Microsoft NT device drivers that we have had access
+to. CIL was tested against GCC's c-torture testsuite and (except for the tests
+involving complex numbers and inner functions, which CIL does not currently
+implement) CIL passes most of the tests. Specifically CIL fails 23 tests out
+of the 904 c-torture tests that it should pass. GCC itself fails 19 tests. A
+total of 1400 regression test cases are run automatically on each change to
+the CIL sources.
+
+ CIL is relatively independent on the underlying machine and compiler. When
+you build it CIL will configure itself according to the underlying compiler.
+However, CIL has only been tested on Intel x86 using the gcc compiler on Linux
+and cygwin and using the MS Visual C compiler. (See below for specific
+versions of these compilers that we have used CIL for.)
+
+ The largest application we have used CIL for is
+\ahreftop{../ccured/index.html}{CCured}, a compiler that compiles C code into
+type-safe code by analyzing your pointer usage and inserting runtime checks in
+the places that cannot be guaranteed statically to be type safe.
+
+ You can also use CIL to ``compile'' code that uses GCC extensions (e.g. the
+Linux kernel) into standard C code.
+
+ CIL also comes accompanies by a growing library of extensions (see
+\secref{Extension}). You can use these for your projects or as examples of
+using CIL.
+
+\t{PDF} versions of \ahref{CIL.pdf}{this manual} and the
+\ahref{CIL-API.pdf}{CIL API} are available. However, we recommend the
+\t{HTML} versions because the postprocessed code examples are easier to
+view.
+
+ If you use CIL in your project, we would appreciate letting us know. If you
+want to cite CIL in your research writings, please refer to the paper ``CIL:
+Intermediate Language and Tools for Analysis and Transformation of C
+Programs'' by George C. Necula, Scott McPeak, S.P. Rahul and Westley Weimer,
+in ``Proceedings of Conference on Compilier Construction'', 2002.
+
+\section{Installation}
+
+ You need the following tools to build CIL:
+\begin{itemize}
+\item A Unix-like shell environment (with bash, perl, make, mv, cp,
+ etc.). On Windows, you will need cygwin with those packages.
+\item An ocaml compiler. You will need OCaml release 3.08 or higher to build
+CIL. CIL has been tested on Linux and on Windows (where it can behave as
+either Microsoft Visual C or gcc). On Windows, you can build CIL both with the
+cygwin version of ocaml (preferred) and with the Win32 version of ocaml.
+\item An underlying C compiler, which can be either gcc or Microsoft Visual C.
+\end{itemize}
+
+\begin{enumerate}
+\item Get the source code.
+\begin{itemize}
+\item {\em Official distribution} (Recommended):
+\begin{enumerate}
+\item Download the CIL \ahref{distrib}{distribution} (latest version is
+\ahrefurl{distrib/cil-\cilversion.tar.gz}). See the \secref{changes} for recent changes to the CIL distribution.
+\item Unzip and untar the source distribution. This will create a directory
+ called \t{cil} whose structure is explained below. \\
+ \t{~~~~tar xvfz cil-\cilversion.tar.gz}
+\end{enumerate}
+\item {\em Subversion Repository}: \\
+ Alternately, you can download an up to the minute version of CIL
+ from our Subversion repository at:
+\begin{verbatim}
+ svn co svn://hal.cs.berkeley.edu/home/svn/projects/trunk/cil
+\end{verbatim}
+However, the Subversion version may be less stable than the released
+version. See the Changes section of doc/cil.tex to see what's
+changed since the last release. There may be changes that aren't yet
+documented in the .tex file or this website.
+
+For those who were using the CVS server before we switched to
+Subversion, revision 8603 in Subversion corresponds to the last CVS
+version.
+
+\end{itemize}
+\item Enter the \t{cil} directory and run the \t{configure} script and then
+ GNU make to build the distribution. If you are on Windows, at least the
+ \t{configure} step must be run from within \t{bash}. \\
+ \hsp\verb!cd cil!\\
+ \hsp\verb!./configure!\\
+ \hsp\verb!make!\\
+ \hsp\verb!make quicktest!\\
+
+\item You should now find \t{cilly.asm.exe} in a subdirectory of \t{obj}. The
+name of the subdirectory is either \t{x86\_WIN32} if you are using \t{cygwin}
+on Windows or \t{x86\_LINUX} if you are using Linux (although you should be
+using instead the Perl wrapper \t{bin/cilly}). Note that we do not have an
+\t{install} make target and you should use Cil from the development directory.
+\item If you decide to use CIL, {\bf please}
+\ahref{mailto:necula@cs.berkeley.edu}{send us a note}. This will help recharge
+our batteries after a few years of development. And of course, do send us
+your bug reports as well.
+\end{enumerate}
+
+ The \t{configure} script tries to find appropriate defaults for your system.
+You can control its actions by passing the following arguments:
+\begin{itemize}
+\item \t{CC=foo} Specifies the path for the \t{gcc} executable. By default
+whichever version is in the PATH is used. If \t{CC} specifies the Microsoft
+\t{cl} compiler, then that compiler will be set as the default one. Otherwise,
+the \t{gcc} compiler will be the default.
+\end{itemize}
+
+ CIL requires an underlying C compiler and preprocessor. CIL depends on the
+underlying compiler and machine for the sizes and alignment of types. The
+installation procedure for CIL queries the underlying compiler for
+architecture and compiler dependent configuration parameters, such as the size
+of a pointer or the particular alignment rules for structure fields. (This
+means, of course, that you should re-run \t{./configure} when you move CIL to
+another machine.)
+
+We have tested CIL on the following compilers:
+
+\begin{itemize}
+\item On Windows, \t{cl} compiler version 12.00.8168 (MSVC 6),
+ 13.00.9466 (MSVC .Net), and 13.10.3077 (MSVC .Net 2003). Run \t{cl}
+ with no arguments to get the compiler version.
+\item On Windows, using \t{cygwin} and \t{gcc} version 2.95.3, 3.0,
+ 3.2, 3.3, and 3.4.
+\item On Linux, using \t{gcc} version 2.95.3, 3.0, 3.2, 3.3, 4.0, and 4.1.
+\end{itemize}
+
+Others have successfully used CIL on x86 processors with Mac OS X,
+FreeBSD and OpenBSD; on amd64 processors with FreeBSD; on SPARC
+processors with Solaris; and on PowerPC processors with Mac OS X. If
+you make any changes to the build system in order to run CIL on your
+platform, please send us a patch.
+
+ \subsection{Building CIL on Windows with Microsoft Visual C}
+
+ Some users might want to build a standalone CIL executable on Windows (an
+executable that does not require cygwin.dll to run). You will need cygwin for
+the build process only. Here is how we do it
+
+\begin{enumerate}
+\item Start with a clean CIL directory
+\item Start a command-line window setup with the environment variables for
+ Microsoft Visual Studio. You can do this by choosing Programs/Microsoft
+ Visual Studio/Tools/Command Prompt. Check that you can run \t{cl}.
+\item Ensure that \t{ocamlc} refers to a Win32 version of ocaml. Run \t{ocamlc
+ -v} and look at the path to the standard library. If you have several
+ versions of ocaml, you must set the following variables:
+ \begin{verbatim}
+ set OCAMLWIN=C:/Programs/ocaml-win
+
+ set OCAMLLIB=%OCAMLWIN%/lib
+ set PATH=%OCAMLWIN%/bin;%PATH%
+ set INCLUDE=%INCLUDE%;%OCAMLWIN%/inc
+ set LIB=%LIB%;%OCAMLWIN%/lib;obj/x86_WIN32
+ \end{verbatim}
+
+\item Run \t{bash -c "./configure CC=cl"}.
+\item Run \t{bash -c "make WIN32=1 quickbuild"}
+\item Run \t{bash -c "make WIN32=1 NATIVECAML=1 cilly}
+\item Run \t{bash -c "make WIN32=1 bindistrib-nocheck}
+\end{enumerate}
+
+ The above steps do not build the CIL library, but just the executable. The
+last step will create a subdirectory \t{TEMP\_cil-bindistrib} that contains
+everything that you need to run CIL on another machine. You will have to edit
+manually some of the files in the \t{bin} directory to replace \t{CILHOME}.
+The resulting CIL can be run with ActiveState Perl also.
+
+
+ \section{Distribution Contents}
+
+The file \ahrefurl{distrib/cil-\cilversion.tar.gz}
+contains the complete source CIL distribution,
+consisting of the following files:
+
+\begin{tabular}{ll}
+Filename & Description \\
+\t{Makefile.in} & \t{configure} source for the
+ Makefile that builds CIL \\
+\t{configure} & The configure script \\
+\t{configure.in} & The \t{autoconf} source for \t{configure} \\
+\t{config.guess}, \t{config.sub}, \t{install-sh} & stuff required by
+ \t{configure} \\
+\\
+\t{doc/} & HTML documentation of the CIL API \\
+\t{obj/} & Directory that will contain the compiled
+ CIL modules and executables\\
+\t{bin/cilly.in} & The \t{configure} source for a Perl script
+ that can be invoked with the
+ same arguments as either \t{gcc} or
+ Microsoft Visual C and will convert the
+ program to CIL, perform some simple
+ transformations, emit it and compile it as
+ usual. \\
+\t{lib/CompilerStub.pm} & A Perl class that can be used to write code
+ that impersonates a compiler. \t{cilly}
+ uses it. \\
+\t{lib/Merger.pm} & A subclass of \t{CompilerStub.pm} that can
+ be used to merge source files into a single
+ source file.\t{cilly}
+ uses it. \\
+\t{bin/patcher.in} & A Perl script that applies specified patches
+ to standard include files.\\
+\\
+\t{src/check.ml,mli} & Checks the well-formedness of a CIL file \\
+\t{src/cil.ml,mli} & Definition of CIL abstract syntax and
+ utilities for manipulating it\\
+\t{src/clist.ml,mli} & Utilities for efficiently managing lists
+ that need to be concatenated often\\
+\t{src/errormsg.ml,mli} & Utilities for error reporting \\
+\t{src/ext/heapify.ml} & A CIL transformation that moves array local
+ variables from the stack to the heap \\
+\t{src/ext/logcalls.ml,mli} & A CIL transformation that logs every
+ function call \\
+\t{src/ext/sfi.ml} & A CIL transformation that can log every
+ memory read and write \\
+\t{src/frontc/clexer.mll} & The lexer \\
+\t{src/frontc/cparser.mly} & The parser \\
+\t{src/frontc/cabs.ml} & The abstract syntax \\
+\t{src/frontc/cprint.ml} & The pretty printer for CABS \\
+\t{src/frontc/cabs2cil.ml} & The elaborator to CIL \\
+\t{src/main.ml} & The \t{cilly} application \\
+\t{src/pretty.ml,mli} & Utilities for pretty printing \\
+\t{src/rmtmps.ml,mli} & A CIL tranformation that removes unused
+ types, variables and inlined functions \\
+\t{src/stats.ml,mli} & Utilities for maintaining timing statistics
+\\
+\t{src/testcil.ml} & A random test of CIL (against the resident
+ C compiler)\\
+\t{src/trace.ml,mli} & Utilities useful for printing debugging
+ information\\
+\\
+\t{ocamlutil/} & Miscellaneous libraries that are not
+ specific to CIL. \\
+\t{ocamlutil/Makefile.ocaml} & A file that is included by \t{Makefile} \\
+\t{ocamlutil/perfcount.c} & C code that links with src/stats.ml
+ and reads Intel performance
+ counters. \\
+\\
+\t{obj/@ARCHOS@/feature\_config.ml} & File generated by the Makefile
+ describing which extra ``features''
+ to compile. See \secref{cil} \\
+\t{obj/@ARCHOS@/machdep.ml} & File generated by the Makefile containing
+ information about your architecture,
+ such as the size of a pointer \\
+\t{src/machdep.c} & C program that generates
+ \t{machdep.ml} files \\
+\end{tabular}
+
+
+\section{Compiling C to CIL}\label{sec-cabs2cil}
+
+ In this section we try to describe a few of the many transformations that are
+applied to a C program to convert it to CIL. The module that implements this
+conversion is about 5000 lines of OCaml code. In contrast a simple program
+transformation that instruments all functions to keep a shadow stack of the
+true return address (thus preventing stack smashing) is only 70 lines of code.
+This example shows that the analysis is so much simpler because it has to
+handle only a few simple C constructs and also because it can leverage on CIL
+infrastructure such as visitors and pretty-printers.
+
+ In no particular order these are a few of the most significant ways in which
+C programs are compiled into CIL:
+\begin{enumerate}
+\item CIL will eliminate all declarations for unused entities. This means that
+just because your hello world program includes \t{stdio.h} it does not mean
+that your analysis has to handle all the ugly stuff from \t{stdio.h}.
+
+\item Type specifiers are interpreted and normalized:
+\begin{cilcode}[global]
+int long signed x;
+signed long extern x;
+long static int long y;
+
+// Some code that uses these declaration, so that CIL does not remove them
+int main() { return x + y; }
+\end{cilcode}
+
+\item Anonymous structure and union declarations are given a name.
+\begin{cilcode}[global]
+ struct { int x; } s;
+\end{cilcode}
+
+\item Nested structure tag definitions are pulled apart. This means that all
+structure tag definitions can be found by a simple scan of the globals.
+
+\begin{cilcode}[global]
+struct foo {
+ struct bar {
+ union baz {
+ int x1;
+ double x2;
+ } u1;
+ int y;
+ } s1;
+ int z;
+} f;
+\end{cilcode}
+
+\item All structure, union, enumeration definitions and the type definitions
+from inners scopes are moved to global scope (with appropriate renaming). This
+facilitates moving around of the references to these entities.
+
+\begin{cilcode}[global]
+int main() {
+ struct foo {
+ int x; } foo;
+ {
+ struct foo {
+ double d;
+ };
+ return foo.x;
+ }
+}
+\end{cilcode}
+
+\item Prototypes are added for those functions that are called before being
+defined. Furthermore, if a prototype exists but does not specify the type of
+parameters that is fixed. But CIL will not be able to add prototypes for those
+functions that are neither declared nor defined (but are used!).
+\begin{cilcode}[global]
+ int f(); // Prototype without arguments
+ int f(double x) {
+ return g(x);
+ }
+ int g(double x) {
+ return x;
+ }
+\end{cilcode}
+
+\item Array lengths are computed based on the initializers or by constant
+folding.
+\begin{cilcode}[global]
+ int a1[] = {1,2,3};
+ int a2[sizeof(int) >= 4 ? 8 : 16];
+\end{cilcode}
+
+\item Enumeration tags are computed using constant folding:
+\begin{cilcode}[global]
+int main() {
+ enum {
+ FIVE = 5,
+ SIX, SEVEN,
+ FOUR = FIVE - 1,
+ EIGHT = sizeof(double)
+ } x = FIVE;
+ return x;
+}
+
+\end{cilcode}
+
+\item Initializers are normalized to include specific initialization for the
+missing elements:
+\begin{cilcode}[global]
+ int a1[5] = {1,2,3};
+ struct foo { int x, y; } s1 = { 4 };
+\end{cilcode}
+
+\item Initializer designators are interpreted and eliminated. Subobjects are
+properly marked with braces. CIL implements
+the whole ISO C99 specification for initializer (neither GCC nor MSVC do) and
+a few GCC extensions.
+\begin{cilcode}[global]
+ struct foo {
+ int x, y;
+ int a[5];
+ struct inner {
+ int z;
+ } inner;
+ } s = { 0, .inner.z = 3, .a[1 ... 2] = 5, 4, y : 8 };
+\end{cilcode}
+
+\item String initializers for arrays of characters are processed
+
+\begin{cilcode}[global]
+char foo[] = "foo plus bar";
+\end{cilcode}
+
+\item String constants are concatenated
+
+\begin{cilcode}[global]
+char *foo = "foo " " plus " " bar ";
+\end{cilcode}
+
+\item Initializers for local variables are turned into assignments. This is in
+order to separate completely the declarative part of a function body from the
+statements. This has the unfortunate effect that we have to drop the \t{const}
+qualifier from local variables !
+
+\begin{cilcode}[local]
+ int x = 5;
+ struct foo { int f1, f2; } a [] = {1, 2, 3, 4, 5 };
+\end{cilcode}
+
+\item Local variables in inner scopes are pulled to function scope (with
+appropriate renaming). Local scopes thus disappear. This makes it easy to find
+and operate on all local variables in a function.
+
+\begin{cilcode}[global]
+ int x = 5;
+ int main() {
+ int x = 6;
+ {
+ int x = 7;
+ return x;
+ }
+ return x;
+ }
+\end{cilcode}
+
+\item Global declarations in local scopes are moved to global scope:
+\begin{cilcode}[global]
+ int x = 5;
+ int main() {
+ int x = 6;
+ {
+ static int x = 7;
+ return x;
+ }
+ return x;
+ }
+\end{cilcode}
+
+\item Return statements are added for functions that are missing them. If the
+return type is not a base type then a \t{return} without a value is added.
+The guaranteed presence of return statements makes it easy to implement a
+transformation that inserts some code to be executed immediately before
+returning from a function.
+\begin{cilcode}[global]
+ int foo() {
+ int x = 5;
+ }
+\end{cilcode}
+
+\item One of the most significant transformations is that expressions that
+contain side-effects are separated into statements.
+
+\begin{cilcode}[local]
+ int x, f(int);
+ return (x ++ + f(x));
+\end{cilcode}
+
+ Internally, the \t{x ++} statement is turned into an assignment which the
+pretty-printer prints like the original. CIL has only three forms of basic
+statements: assignments, function calls and inline assembly.
+
+\item Shortcut evaluation of boolean expressions and the \t{?:} operator are
+compiled into explicit conditionals:
+\begin{cilcode}[local]
+ int x;
+ int y = x ? 2 : 4;
+ int z = x || y;
+ // Here we duplicate the return statement
+ if(x && y) { return 0; } else { return 1; }
+ // To avoid excessive duplication, CIL uses goto's for
+ // statement that have more than 5 instructions
+ if(x && y || z) { x ++; y ++; z ++; x ++; y ++; return z; }
+\end{cilcode}
+
+\item GCC's conditional expression with missing operands are also compiled
+into conditionals:
+\begin{cilcode}[local]
+ int f();;
+ return f() ? : 4;
+\end{cilcode}
+
+\item All forms of loops (\t{while}, \t{for} and \t{do}) are compiled
+internally as a single \t{while(1)} looping construct with explicit \t{break}
+statement for termination. For simple \t{while} loops the pretty printer is
+able to print back the original:
+\begin{cilcode}[local]
+ int x, y;
+ for(int i = 0; i<5; i++) {
+ if(i == 5) continue;
+ if(i == 4) break;
+ i += 2;
+ }
+ while(x < 5) {
+ if(x == 3) continue;
+ x ++;
+ }
+\end{cilcode}
+
+\item GCC's block expressions are compiled away. (That's right there is an
+infinite loop in this code.)
+
+\begin{cilcode}[local]
+ int x = 5, y = x;
+ int z = ({ x++; L: y -= x; y;});
+ return ({ goto L; 0; });
+\end{cilcode}
+
+\item CIL contains support for both MSVC and GCC inline assembly (both in one
+internal construct)
+
+\item CIL compiles away the GCC extension that allows many kinds of constructs
+to be used as lvalues:
+
+\begin{cilcode}[local]
+ int x, y, z;
+ return &(x ? y : z) - & (x ++, x);
+\end{cilcode}
+
+\item All types are computed and explicit casts are inserted for all
+promotions and conversions that a compiler must insert:
+
+\item CIL will turn old-style function definition (without prototype) into
+new-style definitions. This will make the compiler less forgiving when
+checking function calls, and will catch for example cases when a function is
+called with too few arguments. This happens in old-style code for the purpose
+of implementing variable argument functions.
+
+\item Since CIL sees the source after preprocessing the code after CIL does
+not contain the comments and the preprocessing directives.
+
+\item CIL will remove from the source file those type declarations, local
+variables and inline functions that are not used in the file. This means that
+your analysis does not have to see all the ugly stuff that comes from the
+header files:
+\begin{cilcode}[global]
+#include
+
+typedef int unused_type;
+
+static char unused_static (void) { return 0; }
+
+int main() {
+ int unused_local;
+ printf("Hello world\n"); // Only printf will be kept from stdio.h
+}
+\end{cilcode}
+
+\end{enumerate}
+
+\section{How to Use CIL}\label{sec-cil}\cutname{cilly.html}
+
+There are two predominant ways to use CIL to write a program analysis or
+transformation. The first is to phrase your analysis as a module that is
+called by our existing driver. The second is to use CIL as a stand-alone
+library. We highly recommend that you use \t{cilly}, our driver.
+
+\subsection{Using \t{cilly}, the CIL driver}
+
+The most common way to use CIL is to write an Ocaml module containing your
+analysis and transformation, which you then link into our boilerplate
+driver application called \t{cilly}. \t{cilly} is a Perl script that
+processes and mimics \t{GCC} and \t{MSVC} command-line arguments and then
+calls \t{cilly.byte.exe} or \t{cilly.asm.exe} (CIL's Ocaml executable).
+
+An example of such module is \t{logwrites.ml}, a transformation that is
+distributed with CIL and whose purpose is to instrument code to print the
+addresses of memory locations being written. (We plan to release a
+C-language interface to CIL so that you can write your analyses in C
+instead of Ocaml.) See \secref{Extension} for a survey of other example
+modules.
+
+Assuming that you have written \t{/home/necula/logwrites.ml},
+here is how you use it:
+
+ \begin{enumerate}
+
+ \item Modify \t{logwrites.ml} so that it includes a CIL ``feature
+ descriptor'' like this:
+\begin{verbatim}
+let feature : featureDescr =
+ { fd_name = "logwrites";
+ fd_enabled = ref false;
+ fd_description = "generation of code to log memory writes";
+ fd_extraopt = [];
+ fd_doit =
+ (function (f: file) ->
+ let lwVisitor = new logWriteVisitor in
+ visitCilFileSameGlobals lwVisitor f)
+ }
+\end{verbatim}
+ The \t{fd\_name} field names the feature and its associated
+ command-line arguments. The \t{fd\_enabled} field is a \t{bool ref}.
+ ``\t{fd\_doit}'' will be invoked if \t{!fd\_enabled} is true after
+ argument parsing, so initialize the ref cell to true if you want
+ this feature to be enabled by default.
+
+ When the user passes the \t{-{}-{}dologwrites}
+ command-line option to \t{cilly}, the variable associated with the
+ \t{fd\_enabled} flag is set and the \t{fd\_doit} function is called
+ on the \t{Cil.file} that represents the merger (see \secref{merger}) of
+ all C files listed as arguments.
+
+ \item Invoke \t{configure} with the arguments
+\begin{verbatim}
+./configure EXTRASRCDIRS=/home/necula EXTRAFEATURES=logwrites
+\end{verbatim}
+
+ This step works if each feature is packaged into its own ML file, and the
+name of the entry point in the file is \t{feature}.
+
+ An alternative way to specify the new features is to change the build files
+yourself, as explained below. You'll need to use this method if a single
+feature is split across multiple files.
+
+\begin{enumerate}
+ \item Put \t{logwrites.ml} in the \t{src} or \t{src/ext} directory. This
+ will make sure that \t{make} can find it. If you want to put it in some
+ other directory, modify \t{Makefile.in} and add to \t{SOURCEDIRS} your
+ directory. Alternately, you can create a symlink from \t{src} or
+ \t{src/ext} to your file.
+
+ \item Modify the \t{Makefile.in} and add your module to the
+ \t{CILLY\_MODULES} or
+ \t{CILLY\_LIBRARY\_MODULES} variables. The order of the modules matters. Add
+ your modules somewhere after \t{cil} and before \t{main}.
+
+ \item If you have any helper files for your module, add those to
+ the makefile in the same way. e.g.:
+
+\begin{verbatim}
+CILLY_MODULES = $(CILLY_LIBRARY_MODULES) \
+ myutilities1 myutilities2 logwrites \
+ main
+\end{verbatim}
+ % $ <- emacs hack
+
+ Again, order is important: \t{myutilities2.ml} will be able to refer
+ to Myutilities1 but not Logwrites. If you have any ocamllex or ocamlyacc
+ files, add them to both \t{CILLY\_MODULES} and either \t{MLLS} or
+ \t{MLYS}.
+
+ \item Modify \t{main.ml} so that your new feature descriptor appears in
+ the global list of CIL features.
+\begin{verbatim}
+let features : C.featureDescr list =
+ [ Logcalls.feature;
+ Oneret.feature;
+ Heapify.feature1;
+ Heapify.feature2;
+ makeCFGFeature;
+ Partial.feature;
+ Simplemem.feature;
+ Logwrites.feature; (* add this line to include the logwrites feature! *)
+ ]
+ @ Feature_config.features
+\end{verbatim}
+
+ Features are processed in the order they appear on this list. Put
+ your feature last on the list if you plan to run any of CIL's
+ built-in features (such as makeCFGfeature) before your own.
+
+\end{enumerate}
+
+ Standard code in \t{cilly} takes care of adding command-line arguments,
+ printing the description, and calling your function automatically.
+ Note: do not worry about introducing new bugs into CIL by adding a single
+ line to the feature list.
+
+ \item Now you can invoke the \t{cilly} application on a preprocessed file, or
+ instead use the \t{cilly} driver which provides a convenient compiler-like
+ interface to \t{cilly}. See \secref{driver} for details using \t{cilly}.
+ Remember to enable your analysis by passing the right argument (e.g.,
+ \t{-{}-{}dologwrites}).
+
+\end{enumerate}
+
+\subsection{Using CIL as a library}
+
+CIL can also be built as a library that is called from your stand-alone
+application. Add \t{cil/src}, \t{cil/src/frontc}, \t{cil/obj/x86\_LINUX}
+(or \t{cil/obj/x86\_WIN32}) to your Ocaml project \t{-I} include paths.
+Building CIL will also build the library \t{cil/obj/*/cil.cma} (or
+\t{cil/obj/*/cil.cmxa}). You can then link your application against that
+library.
+
+You can call the \t{Frontc.parse: string -> unit -> Cil.file} function with
+the name of a file containing the output of the C preprocessor.
+The \t{Mergecil.merge: Cil.file list -> string -> Cil.file} function merges
+multiple files. You can then invoke your analysis function on the resulting
+\t{Cil.file} data structure. You might want to call
+\t{Rmtmps.removeUnusedTemps} first to clean up the prototypes and variables
+that are not used. Then you can call the function \t{Cil.dumpFile:
+cilPrinter -> out\_channel -> Cil.file -> unit} to print the file to a
+given output channel. A good \t{cilPrinter} to use is
+\t{defaultCilPrinter}.
+
+Check out \t{src/main.ml} and \t{bin/cilly} for other good ideas
+about high-level file processing. Again, we highly recommend that you just
+our \t{cilly} driver so that you can avoid spending time re-inventing the
+wheel to provide drop-in support for standard \t{makefile}s.
+
+Here is a concrete example of compiling and linking your project against
+CIL. Imagine that your program analysis or transformation is contained in
+the single file \t{main.ml}.
+
+\begin{verbatim}
+$ ocamlopt -c -I $(CIL)/obj/x86_LINUX/ main.ml
+$ ocamlopt -ccopt -L$(CIL)/obj/x86_LINUX/ -o main unix.cmxa str.cmxa \
+ $(CIL)/obj/x86_LINUX/cil.cmxa main.cmx
+\end{verbatim} % $
+
+The first line compiles your analysis, the second line links it against CIL
+(as a library) and the Ocaml Unix library. For more information about
+compiling and linking Ocaml programs, see the Ocaml home page
+at \ahreftop{http://caml.inria.fr/ocaml/}{http://caml.inria.fr/ocaml/}.
+
+In the next section we give an overview of the API that you can use
+to write your analysis and transformation.
+
+\section{CIL API Documentation}\label{sec-api}
+
+ The CIL API is documented in the file \t{src/cil.mli}. We also have an
+\ahref{api/index.html}{online documentation} extracted from
+\t{cil.mli} and other useful modules. We
+index below the main types that are used to represent C programs in CIL:
+
+\begin{itemize}
+\item \ahref{api/index\_types.html}{An index of all types}
+\item \ahref{api/index\_values.html}{An index of all values}
+\item \ciltyperef{file} is the representation of a file.
+\item \ciltyperef{global} is the representation of a global declaration or
+definitions. Values for \ahref{api/Cil.html\#VALemptyFunction}{operating on globals}.
+\item \ciltyperef{typ} is the representation of a type.
+Values for \ahref{api/Cil.html\#VALvoidType}{operating on types}.
+\item \ciltyperef{compinfo} is the representation of a structure or a union
+type
+\item \ciltyperef{fieldinfo} is the representation of a field in a structure
+or a union
+\item \ciltyperef{enuminfo} is the representation of an enumeration type.
+\item \ciltyperef{varinfo} is the representation of a variable
+\item \ciltyperef{fundec} is the representation of a function
+\item \ciltyperef{lval} is the representation of an lvalue.
+Values for \ahref{api/Cil.html\#VALmakeVarInfo}{operating on lvalues}.
+\item \ciltyperef{exp} is the representation of an expression without
+side-effects.
+Values for \ahref{api/Cil.html\#VALzero}{operating on expressions}.
+\item \ciltyperef{instr} is the representation of an instruction (with
+side-effects but without control-flow)
+\item \ciltyperef{stmt} is the representation of a control-flow statements.
+Values for \ahref{api/Cil.html\#VALmkStmt}{operating on statements}.
+\item \ciltyperef{attribute} is the representation of attributes.
+Values for \ahref{api/Cil.html\#TYPEattributeClass}{operating on attributes}.
+\end{itemize}
+
+
+ \subsection{Using the visitor}\label{sec-visitor}
+
+ One of the most useful tools exported by the CIL API is an implementation of
+the visitor pattern for CIL programs. The visiting engine scans depth-first
+the structure of a CIL program and at each node is queries a user-provided
+visitor structure whether it should do one of the following operations:
+\begin{itemize}
+\item Ignore this node and all its descendants
+\item Descend into all of the children and when done rebuild the node if any
+of the children have changed.
+\item Replace the subtree rooted at the node with another tree.
+\item Replace the subtree with another tree, then descend into the children
+and rebuild the node if necessary and then invoke a user-specified function.
+\item In addition to all of the above actions then visitor can specify that
+some instructions should be queued to be inserted before the current
+instruction or statement being visited.
+\end{itemize}
+
+ By writing visitors you can customize the program traversal and
+transformation. One major limitation of the visiting engine is that it does
+not propagate information from one node to another. Each visitor must use its
+own private data to achieve this effect if necessary.
+
+ Each visitor is an object that is an instance of a class of type \cilvisit{}.
+The most convenient way to obtain such classes is to specialize the
+\apiref{Cil.nopCilVisitor}{} class (which just traverses the tree doing
+nothing). Any given specialization typically overrides only a few of the
+methods. Take a look for example at the visitor defined in the module
+\t{logwrites.ml}. Another, more elaborate example of a visitor is the
+[copyFunctionVisitor] defined in \t{cil.ml}.
+
+ Once you have defined a visitor you can invoke it with one of the functions:
+\begin{itemize}
+\item \cilvalref{visitCilFile} or \cilvalref{visitCilFileSameGlobals} - visit a file
+\item \cilvalref{visitCilGlobal} - visit a global
+\item \cilvalref{visitCilFunction} - visit a function definition
+\item \cilvalref{visitCilExp} - visit an expression
+\item \cilvalref{visitCilLval} - visit an lvalue
+\item \cilvalref{visitCilInstr} - visit an instruction
+\item \cilvalref{visitCilStmt} - visit a statement
+\item \cilvalref{visitCilType} - visit a type. Note that this does not visit
+the files of a composite type. use visitGlobal to visit the [GCompTag] that
+defines the fields.
+\end{itemize}
+
+Some transformations may want to use visitors to insert additional
+instructions before statements and instructions. To do so, pass a list of
+instructions to the \cilvalref{queueInstr} method of the specialized
+object. The instructions will automatically be inserted before that
+instruction in the transformed code. The \cilvalref{unqueueInstr} method
+should not normally be called by the user.
+
+ \subsection{Interpreted Constructors and Deconstructors}
+
+ Interpreted constructors and deconstructors are a facility for constructing
+and deconstructing CIL constructs using a pattern with holes that can be
+filled with a variety of kinds of elements. The pattern is a string that uses
+the C syntax to represent C language elements. For example, the following
+code:
+\begin{code}
+Formatcil.cType "void * const (*)(int x)"
+\end{verbatim}\end{code}
+
+ is an alternative way to construct the internal representation of the type of pointer to function
+with an integer argument and a {void * const} as result:
+\begin{code}
+TPtr(TFun(TVoid [Attr("const", [])],
+ [ ("x", TInt(IInt, []), []) ], false, []), [])
+\end{verbatim}\end{code}
+
+ The advantage of the interpreted constructors is that you can use familiar C
+syntax to construct CIL abstract-syntax trees.
+
+ You can construct this way types, lvalues, expressions, instructions and
+statements. The pattern string can also contain a number of placeholders that
+are replaced during construction with CIL items passed as additional argument
+to the construction function. For example, the \t{\%e:id} placeholder means
+that the argument labeled ``id'' (expected to be of form \t{Fe exp}) will
+supply the expression to replace the placeholder. For example, the following
+code constructs an increment instruction at location \t{loc}:
+\begin{code}
+Formatcil.cInstr "%v:x = %v:x + %e:something"
+ loc
+ [ ("something", Fe some_exp);
+ ("x", Fv some_varinfo) ]
+\end{verbatim}\end{code}
+
+ An alternative way to construct the same CIL instruction is:
+\begin{code}
+Set((Var some_varinfo, NoOffset),
+ BinOp(PlusA, Lval (Var some_varinfo, NoOffset),
+ some_exp, intType),
+ loc)
+\end{verbatim}\end{code}
+
+ See \ciltyperef{formatArg} for a definition of the placeholders that are
+understood.
+
+ A dual feature is the interpreted deconstructors. This can be used to test
+whether a CIL construct has a certain form:
+\begin{code}
+Formatcil.dType "void * const (*)(int x)" t
+\end{verbatim}\end{code}
+
+ will test whether the actual argument \t{t} is indeed a function pointer of
+the required type. If it is then the result is \t{Some []} otherwise it is
+\t{None}. Furthermore, for the purpose of the interpreted deconstructors
+placeholders in patterns match anything of the right type. For example,
+\begin{code}
+Formatcil.dType "void * (*)(%F:t)" t
+\end{verbatim}\end{code}
+
+ will match any function pointer type, independent of the type and number of
+the formals. If the match succeeds the result is \t{Some [ FF forms ]} where
+\t{forms} is a list of names and types of the formals. Note that each member
+in the resulting list corresponds positionally to a placeholder in the
+pattern.
+
+ The interpreted constructors and deconstructors do not support the complete C
+syntax, but only a substantial fragment chosen to simplify the parsing. The
+following is the syntax that is supported:
+\begin{verbatim}
+Expressions:
+ E ::= %e:ID | %d:ID | %g:ID | n | L | ( E ) | Unop E | E Binop E
+ | sizeof E | sizeof ( T ) | alignof E | alignof ( T )
+ | & L | ( T ) E
+
+Unary operators:
+ Unop ::= + | - | ~ | %u:ID
+
+Binary operators:
+ Binop ::= + | - | * | / | << | >> | & | ``|'' | ^
+ | == | != | < | > | <= | >= | %b:ID
+
+Lvalues:
+ L ::= %l:ID | %v:ID Offset | * E | (* E) Offset | E -> ident Offset
+
+Offsets:
+ Offset ::= empty | %o:ID | . ident Offset | [ E ] Offset
+
+Types:
+ T ::= Type_spec Attrs Decl
+
+Type specifiers:
+ Type_spec ::= void | char | unsigned char | short | unsigned short
+ | int | unsigned int | long | unsigned long | %k:ID | float
+ | double | struct %c:ID | union %c:ID
+
+
+Declarators:
+ Decl ::= * Attrs Decl | Direct_decl
+
+
+Direct declarators:
+ Direct_decl ::= empty | ident | ( Attrs Decl )
+ | Direct_decl [ Exp_opt ]
+ | ( Attrs Decl )( Parameters )
+
+Optional expressions
+ Exp_opt ::= empty | E | %eo:ID
+
+Formal parameters
+ Parameters ::= empty | ... | %va:ID | %f:ID | T | T , Parameters
+
+List of attributes
+ Attrs ::= empty | %A:ID | Attrib Attrs
+
+Attributes
+ Attrib ::= const | restrict | volatile | __attribute__ ( ( GAttr ) )
+
+GCC Attributes
+ GAttr ::= ident | ident ( AttrArg_List )
+
+Lists of GCC Attribute arguments:
+ AttrArg_List ::= AttrArg | %P:ID | AttrArg , AttrArg_List
+
+GCC Attribute arguments
+ AttrArg ::= %p:ID | ident | ident ( AttrArg_List )
+
+Instructions
+ Instr ::= %i:ID ; | L = E ; | L Binop= E | Callres L ( Args )
+
+Actual arguments
+ Args ::= empty | %E:ID | E | E , Args
+
+Call destination
+ Callres ::= empty | L = | %lo:ID
+
+Statements
+ Stmt ::= %s:ID | if ( E ) then Stmt ; | if ( E ) then Stmt else Stmt ;
+ | return Exp_opt | break ; | continue ; | { Stmt_list }
+ | while (E ) Stmt | Instr_list
+
+Lists of statements
+ Stmt_list ::= empty | %S:ID | Stmt Stmt_list
+ | Type_spec Attrs Decl ; Stmt_list
+ | Type_spec Attrs Decl = E ; Stmt_list
+ | Type_spec Attrs Decl = L (Args) ; Stmt_list
+
+List of instructions
+ Instr_list ::= Instr | %I:ID | Instr Instr_list
+\end{verbatim}
+
+Notes regarding the syntax:
+\begin{itemize}
+\item In the grammar description above non-terminals are written with
+uppercase initial
+
+\item All of the patterns consist of the \t{\%} character followed by one or
+two letters, followed by ``:'' and an indentifier. For each such
+pattern there is a corresponding constructor of the \ciltyperef{formatArg}
+type, whose name is the letter 'F' followed by the same one or two letters as
+in the pattern. That constructor is used by the user code to pass a
+\ciltyperef{formatArg} actual argument to the interpreted constructor and by
+the interpreted deconstructor to return what was matched for a pattern.
+
+\item If the pattern name is uppercase, it designates a list of the elements
+designated by the corresponding lowercase pattern. E.g. \%E designated lists
+of expressions (as in the actual arguments of a call).
+
+\item The two-letter patterns whose second letter is ``o'' designate an
+optional element. E.g. \%eo designates an optional expression (as in the
+length of an array).
+
+\item Unlike in calls to \t{printf}, the pattern \%g is used for strings.
+
+\item The usual precedence and associativity rules as in C apply
+
+\item The pattern string can contain newlines and comments, using both the
+\t{/* ... */} style as well as the \t{//} one.
+
+\item When matching a ``cast'' pattern of the form \t{( T ) E}, the
+deconstructor will match even expressions that do not have the actual cast but
+in that case the type is matched against the type of the expression. E.g. the
+patters \t{"(int)\%e"} will match any expression of type \t{int} whether it
+has an explicit cast or not.
+
+\item The \%k pattern is used to construct and deconstruct an integer type of
+any kind.
+
+\item Notice that the syntax of types and declaration are the same (in order
+to simplify the parser). This means that technically you can write a whole
+declaration instead of a type in the cast. In this case the name that you
+declare is ignored.
+
+\item In lists of formal parameters and lists of attributes, an empty list in
+the pattern matches any formal parameters or attributes.
+
+\item When matching types, uses of named types are unrolled to expose a real
+type before matching.
+
+\item The order of the attributes is ignored during matching. The the pattern
+for a list of attributes contains \%A then the resulting \t{formatArg} will be
+bound to {\bf all} attributes in the list. For example, the pattern \t{"const
+\%A"} matches any list of attributes that contains \t{const} and binds the
+corresponding placeholder to the entire list of attributes, including
+\t{const}.
+
+\item All instruction-patterns must be terminated by semicolon
+
+\item The autoincrement and autodecrement instructions are not supported. Also
+not supported are complex expressions, the \t{\&\&} and \t{||} shortcut
+operators, and a number of other more complex instructions or statements. In
+general, the patterns support only constructs that can be represented directly
+in CIL.
+
+\item The pattern argument identifiers are not used during deconstruction.
+Instead, the result contains a sequence of values in the same order as the
+appearance of pattern arguments in the pattern.
+
+\item You can mix statements with declarations. For each declaration a new
+ temporary will be constructed (using a function you provive). You can then
+ refer to that temporary by name in the rest of the pattern.
+
+\item The \t{\%v:} pattern specifier is optional.
+\end{itemize}
+
+ The following function are defined in the \t{Formatcil} module for
+constructing and deconstructing:
+\begin{itemize}
+\item \formatcilvalref{cExp} constructs \ciltyperef{exp}.
+\item \formatcilvalref{cType} constructs \ciltyperef{typ}.
+\item \formatcilvalref{cLval} constructs \ciltyperef{lval}.
+\item \formatcilvalref{cInstr} constructs \ciltyperef{instr}.
+\item \formatcilvalref{cStmt} and \formatcilvalref{cStmts} construct \ciltyperef{stmt}.
+\item \formatcilvalref{dExp} deconstructs \ciltyperef{exp}.
+\item \formatcilvalref{dType} deconstructs \ciltyperef{typ}.
+\item \formatcilvalref{dLval} deconstructs \ciltyperef{lval}.
+\item \formatcilvalref{dInstr} deconstructs \ciltyperef{lval}.
+\end{itemize}
+
+ Below is an example using interpreted constructors. This example generates
+the CIL representation of code that scans an array backwards and initializes
+every even-index element with an expression:
+\begin{code}
+Formatcil.cStmts
+ loc
+ "int idx = sizeof(array) / sizeof(array[0]) - 1;
+ while(idx >= 0) {
+ // Some statements to be run for all the elements of the array
+ %S:init
+ if(! (idx & 1))
+ array[idx] = %e:init_even;
+ /* Do not forget to decrement the index variable */
+ idx = idx - 1;
+ }"
+ (fun n t -> makeTempVar myfunc ~name:n t)
+ [ ("array", Fv myarray);
+ ("init", FS [stmt1; stmt2; stmt3]);
+ ("init_even", Fe init_expr_for_even_elements) ]
+\end{verbatim}\end{code}
+
+ To write the same CIL statement directly in CIL would take much more effort.
+Note that the pattern is parsed only once and the result (a function that
+takes the arguments and constructs the statement) is memoized.
+
+ \subsubsection{Performance considerations for interpreted constructors}
+
+ Parsing the patterns is done with a LALR parser and it takes some time. To
+improve performance the constructors and deconstructors memoize the parsed
+patterns and will only compile a pattern once. Also all construction and
+deconstruction functions can be applied partially to the pattern string to
+produce a function that can be later used directly to construct or
+deconstruct. This function appears to be about two times slower than if the
+construction is done using the CIL constructors (without memoization the
+process would be one order of magnitude slower.) However, the convenience of
+interpreted constructor might make them a viable choice in many situations
+when performance is not paramount (e.g. prototyping).
+
+
+ \subsection{Printing and Debugging support}
+
+The Modules \moduleref{Pretty} and \moduleref{Errormsg} contain respectively
+utilities for pretty printing and reporting errors and provide a convenient
+\t{printf}-like interface.
+
+ Additionally, CIL defines for each major type a pretty-printing function that
+you can use in conjunction with the \moduleref{Pretty} interface. The
+following are some of the pretty-printing functions:
+\begin{itemize}
+\item \cilvalref{d\_exp} - print an expression
+\item \cilvalref{d\_type} - print a type
+\item \cilvalref{d\_lval} - print an lvalue
+\item \cilvalref{d\_global} - print a global
+\item \cilvalref{d\_stmt} - print a statment
+\item \cilvalref{d\_instr} - print an instruction
+\item \cilvalref{d\_init} - print an initializer
+\item \cilvalref{d\_attr} - print an attribute
+\item \cilvalref{d\_attrlist} - print a set of attributes
+\item \cilvalref{d\_loc} - print a location
+\item \cilvalref{d\_ikind} - print an integer kind
+\item \cilvalref{d\_fkind} - print a floating point kind
+\item \cilvalref{d\_const} - print a constant
+\item \cilvalref{d\_storage} - print a storage specifier
+\end{itemize}
+
+ You can even customize the pretty-printer by creating instances of
+\cilprinter{}. Typically such an instance extends
+\cilvalref{defaultCilPrinter}. Once you have a customized pretty-printer you
+can use the following printing functions:
+\begin{itemize}
+\item \cilvalref{printExp} - print an expression
+\item \cilvalref{printType} - print a type
+\item \cilvalref{printLval} - print an lvalue
+\item \cilvalref{printGlobal} - print a global
+\item \cilvalref{printStmt} - print a statment
+\item \cilvalref{printInstr} - print an instruction
+\item \cilvalref{printInit} - print an initializer
+\item \cilvalref{printAttr} - print an attribute
+\item \cilvalref{printAttrs} - print a set of attributes
+\end{itemize}
+
+
+ CIL has certain internal consistency invariants. For example, all references
+to a global variable must point to the same \t{varinfo} structure. This
+ensures that one can rename the variable by changing the name in the
+\t{varinfo}. These constraints are mentioned in the API documentation. There
+is also a consistency checker in file \t{src/check.ml}. If you suspect that
+your transformation is breaking these constraints then you can pass the
+\t{-{}-check} option to cilly and this will ensure that the consistency checker
+is run after each transformation.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
+\subsection{Attributes}\label{sec-attrib}\cutname{attributes.html}
+
+ In CIL you can attach attributes to types and to names (variables, functions
+and fields). Attributes are represented using the type \ciltyperef{attribute}.
+An attribute consists of a name and a number of arguments (represented using
+the type \ciltyperef{attrparam}). Almost any expression can be used as an
+attribute argument. Attributes are stored in lists sorted by the name of the
+attribute. To maintain list ordering, use the functions
+\cilvalref{typeAttrs} to retrieve the attributes of a type and the functions
+\cilvalref{addAttribute} and \cilvalref{addAttributes} to add attributes.
+Alternatively you can use \cilvalref{typeAddAttributes} to add an attribute to
+a type (and return the new type).
+
+ GCC already has extensive support for attributes, and CIL extends this
+support to user-defined attributes. A GCC attribute has the syntax:
+
+\begin{verbatim}
+ gccattribute ::= __attribute__((attribute)) (Note the double parentheses)
+\end{verbatim}
+
+ Since GCC and MSVC both support various flavors of each attribute (with or
+without leading or trailing \_) we first strip ALL leading and trailing \_
+from the attribute name (but not the identified in [ACons] parameters in
+\ciltyperef{attrparam}). When we print attributes, for GCC we add two leading
+and two trailing \_; for MSVC we add just two leading \_.
+
+ There is support in CIL so that you can control the printing of attributes
+(see \cilvalref{setCustomPrintAttribute} and
+\cilvalref{setCustomPrintAttributeScope}). This custom-printing support is now
+used to print the "const" qualifier as "\t{const}" and not as
+"\t{\_\_attribute\_\_((const))}".
+
+
+ The attributes are specified in declarations. This is unfortunate since the C
+syntax for declarations is already quite complicated and after writing the
+parser and elaborator for declarations I am convinced that few C programmers
+understand it completely. Anyway, this seems to be the easiest way to support
+attributes.
+
+ Name attributes must be specified at the very end of the declaration, just
+before the \t{=} for the initializer or before the \t{,} the separates a
+declaration in a group of declarations or just before the \t{;} that
+terminates the declaration. A name attribute for a function being defined can
+be specified just before the brace that starts the function body.
+
+ For example (in the following examples \t{A1},...,\t{An} are type attributes
+and \t{N} is a name attribute (each of these uses the \t{\_\_attribute\_\_} syntax):
+
+\begin{code}
+ int x N;
+ int x N, * y N = 0, z[] N;
+ extern void exit() N;
+ int fact(int x) N { ... }
+\end{verbatim}\end{code}
+
+
+ Type attributes can be specified along with the type using the following
+ rules:
+\begin{enumerate}
+ \item The type attributes for a base type (int, float, named type, reference
+ to struct or union or enum) must be specified immediately following the
+ type (actually it is Ok to mix attributes with the specification of the
+ type, in between unsigned and int for example).
+
+ For example:
+\begin{code}
+ int A1 x N; /* A1 applies to the type int. An example is an attribute
+ "even" restricting the type int to even values. */
+ struct foo A1 A2 x; // Both A1 and A2 apply to the struct foo type
+\end{verbatim}\end{code}
+
+ \item The type attributes for a pointer type must be specified immediately
+ after the * symbol.
+\begin{code}
+ /* A pointer (A1) to an int (A2) */
+ int A2 * A1 x;
+ /* A pointer (A1) to a pointer (A2) to a float (A3) */
+ float A3 * A2 * A1 x;
+\end{verbatim}\end{code}
+
+
+ Note: The attributes for base types and for pointer types are a strict
+ extension of the ANSI C type qualifiers (const, volatile and restrict). In
+ fact CIL treats these qualifiers as attributes.
+
+ \item The attributes for a function type or for an array type can be
+ specified using parenthesized declarators.
+
+ For example:
+\begin{code}
+ /* A function (A1) from int (A2) to float (A3) */
+ float A3 (A1 f)(int A2);
+
+ /* A pointer (A1) to a function (A2) that returns an int (A3) */
+ int A3 (A2 * A1 pfun)(void);
+
+ /* An array (A1) of int (A2) */
+ int A2 (A1 x0)[]
+
+ /* Array (A1) of pointers (A2) to functions (A3) that take an int (A4) and
+ * return a pointer (A5) to int (A6) */
+ int A6 * A5 (A3 * A2 (A1 x1)[5])(int A4);
+
+
+ /* A function (A4) that takes a float (A5) and returns a pointer (A6) to an
+ * int (A7) */
+ extern int A7 * A6 (A4 x2)(float A5 x);
+
+ /* A function (A1) that takes a int (A2) and that returns a pointer (A3) to
+ * a function (A4) that takes a float (A5) and returns a pointer (A6) to an
+ * int (A7) */
+ int A7 * A6 (A4 * A3 (A1 x3)(int A2 x))(float A5) {
+ return & x2;
+ }
+\end{verbatim}\end{code}
+
+\end{enumerate}
+
+ Note: ANSI C does not allow the specification of type qualifiers for function
+and array types, although it allows for the parenthesized declarator. With
+just a bit of thought (looking at the first few examples above) I hope that
+the placement of attributes for function and array types will seem intuitive.
+
+ This extension is not without problems however. If you want to refer just to
+a type (in a cast for example) then you leave the name out. But this leads to
+strange conflicts due to the parentheses that we introduce to scope the
+attributes. Take for example the type of x0 from above. It should be written
+as:
+
+\begin{code}
+ int A2 (A1 )[]
+\end{verbatim}\end{code}
+
+ But this will lead most C parsers into deep confusion because the parentheses
+around A1 will be confused for parentheses of a function designator. To push
+this problem around (I don't know a solution) whenever we are about to print a
+parenthesized declarator with no name but with attributes, we comment out the
+attributes so you can see them (for whatever is worth) without confusing the
+compiler. For example, here is how we would print the above type:
+
+\begin{code}
+ int A2 /*(A1 )*/[]
+\end{verbatim}\end{code}
+
+ \paragraph{Handling of predefined GCC attributes}
+
+ GCC already supports attributes in a lot of places in declarations. The only
+place where we support attributes and GCC does not is right before the \{ that
+starts a function body.
+
+ GCC classifies its attributes in attributes for functions, for variables and
+for types, although the latter category is only usable in definition of struct
+or union types and is not nearly as powerful as the CIL type attributes. We
+have made an effort to reclassify GCC attributes as name and type attributes
+(they only apply for function types). Here is what we came up with:
+
+\begin{itemize}
+ \item GCC name attributes:
+
+ section, constructor, destructor, unused, weak, no\_instrument\_function,
+ noreturn, alias, no\_check\_memory\_usage, dllinport, dllexport, exception,
+ model
+
+ Note: the "noreturn" attribute would be more appropriately qualified as a
+ function type attribute. But we classify it as a name attribute to make
+ it easier to support a similarly named MSVC attribute.
+
+ \item GCC function type attributes:
+
+ fconst (printed as "const"), format, regparm, stdcall,
+ cdecl, longcall
+
+ I was not able to completely decipher the position in which these attributes
+ must go. So, the CIL elaborator knows these names and applies the following
+ rules:
+ \begin{itemize}
+ \item All of the name attributes that appear in the specifier part (i.e. at
+ the beginning) of a declaration are associated with all declared names.
+
+ \item All of the name attributes that appear at the end of a declarator are
+ associated with the particular name being declared.
+
+ \item More complicated is the handling of the function type attributes, since
+ there can be more than one function in a single declaration (a function
+ returning a pointer to a function). Lacking any real understanding of how
+ GCC handles this, I attach the function type attribute to the "nearest"
+ function. This means that if a pointer to a function is "nearby" the
+ attribute will be correctly associated with the function. In truth I pray
+ that nobody uses declarations as that of x3 above.
+ \end{itemize}
+\end{itemize}
+
+\paragraph{Handling of predefined MSVC attributes}
+
+ MSVC has two kinds of attributes, declaration modifiers to be printed before
+ the storage specifier using the notation "\t{\_\_declspec(...)}" and a few
+ function type attributes, printed almost as our CIL function type
+ attributes.
+
+ The following are the name attributes that are printed using
+ \t{\_\_declspec} right before the storage designator of the declaration:
+ thread, naked, dllimport, dllexport, noreturn
+
+
+ The following are the function type attributes supported by MSVC:
+ fastcall, cdecl, stdcall
+
+ It is not worth going into the obscure details of where MSVC accepts these
+ type attributes. The parser thinks it knows these details and it pulls
+ these attributes from wherever they might be placed. The important thing
+ is that MSVC will accept if we print them according to the rules of the CIL
+ attributes !
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{The CIL Driver}\label{sec-driver}
+
+ We have packaged CIL as an application \t{cilly} that contains certain
+example modules, such as \t{logwrites.ml} (a module
+that instruments code to print the addresses of memory locations being
+written). Normally, you write another module like that, add command-line
+options and an invocation of your module in \t{src/main.ml}. Once you compile
+CIL you will obtain the file \t{obj/cilly.asm.exe}.
+
+ We wrote a driver for this executable that makes it easy to invoke your
+analysis on existing C code with very little manual intervention. This driver
+is \t{bin/cilly} and is quite powerful. Note that the \t{cilly} script
+is configured during installation with the path where CIL resides. This means
+that you can move it to any place you want.
+
+ A simple use of the driver is:
+\begin{verbatim}
+bin/cilly --save-temps -D HAPPY_MOOD -I myincludes hello.c -o hello
+\end{verbatim}
+
+\c{-{}-save-temps} tells CIL to save the resulting output files in the
+current directory. Otherwise, they'll be put in \t{/tmp} and deleted
+automatically. Not that this is the only CIL-specific flag in the
+list -- the other flags use \t{gcc}'s syntax.
+
+This performs the following actions:
+\begin{itemize}
+\item preprocessing using the -D and -I arguments with the resulting
+ file left in \t{hello.i},
+\item the invocation of the \t{cilly.asm} application which parses \t{hello.i}
+ converts it to CIL and the pretty-prints it to \t{hello.cil.c}
+\item another round of preprocessing with the result placed in \t{hello.cil.i}
+\item the true compilation with the result in \t{hello.cil.o}
+\item a linking phase with the result in \t{hello}
+\end{itemize}
+
+ Note that \t{cilly} behaves like the \t{gcc} compiler. This makes it
+easy to use it with existing \t{Makefiles}:
+\begin{verbatim}
+make CC="bin/cilly" LD="bin/cilly"
+\end{verbatim}
+
+ \t{cilly} can also behave as the Microsoft Visual C compiler, if the first
+ argument is \t{-{}-mode=MSVC}:
+\begin{verbatim}
+bin/cilly --mode=MSVC /D HAPPY_MOOD /I myincludes hello.c /Fe hello.exe
+\end{verbatim}
+
+ (This in turn will pass a \t{-{}-MSVC} flag to the underlying \t{cilly.asm}
+ process which will make it understand the Microsoft Visual C extensions)
+
+ \t{cilly} can also behave as the archiver \t{ar}, if it is passed an
+argument \t{-{}-mode=AR}. Note that only the \t{cr} mode is supported (create a
+new archive and replace all files in there). Therefore the previous version of
+the archive is lost.
+
+ Furthermore, \t{cilly} allows you to pass some arguments on to the
+underlying \t{cilly.asm} process. As a general rule all arguments that start
+with \t{-{}-} and that \t{cilly} itself does not process, are passed on. For
+example,
+\begin{verbatim}
+bin/cilly --dologwrites -D HAPPY_MOOD -I myincludes hello.c -o hello.exe
+\end{verbatim}
+
+ will produce a file \t{hello.cil.c} that prints all the memory addresses
+written by the application.
+
+ The most powerful feature of \t{cilly} is that it can collect all the
+sources in your project, merge them into one file and then apply CIL. This
+makes it a breeze to do whole-program analysis and transformation. All you
+have to do is to pass the \t{-{}-merge} flag to \t{cilly}:
+\begin{verbatim}
+make CC="bin/cilly --save-temps --dologwrites --merge"
+\end{verbatim}
+
+ You can even leave some files untouched:
+\begin{verbatim}
+make CC="bin/cilly --save-temps --dologwrites --merge --leavealone=foo --leavealone=bar"
+\end{verbatim}
+
+ This will merge all the files except those with the basename \t{foo} and
+\t{bar}. Those files will be compiled as usual and then linked in at the very
+end.
+
+ The sequence of actions performed by \t{cilly} depends on whether merging
+is turned on or not:
+\begin{itemize}
+\item If merging is off
+ \begin{enumerate}
+ \item For every file \t{file.c} to compile
+ \begin{enumerate}
+ \item Preprocess the file with the given arguments to
+ produce \t{file.i}
+ \item Invoke \t{cilly.asm} to produce a \t{file.cil.c}
+ \item Preprocess to \t{file.cil.i}
+ \item Invoke the underlying compiler to produce \t{file.cil.o}
+ \end{enumerate}
+ \item Link the resulting objects
+ \end{enumerate}
+\item If merging is on
+ \begin{enumerate}
+ \item For every file \t{file.c} to compile
+ \begin{enumerate}
+ \item Preprocess the file with the given arguments to
+ produce \t{file.i}
+ \item Save the preprocessed source as \t{file.o}
+ \end{enumerate}
+ \item When linking executable \t{hello.exe}, look at every object
+ file that must be linked and see if it actually
+ contains preprocessed source. Pass all those files to a
+ special merging application (described in
+ \secref{merger}) to produce \t{hello.exe\_comb.c}
+ \item Invoke \t{cilly.asm} to produce a \t{hello.exe\_comb.cil.c}
+ \item Preprocess to \t{hello.exe\_comb.cil.i}
+ \item Invoke the underlying compiler to produce \t{hello.exe\_comb.cil.o}
+ \item Invoke the actual linker to produce \t{hello.exe}
+ \end{enumerate}
+\end{itemize}
+
+ Note that files that you specify with \t{-{}-leavealone} are not merged and
+never presented to CIL. They are compiled as usual and then are linked in at
+the end.
+
+ And a final feature of \t{cilly} is that it can substitute copies of the
+system's include files:
+
+\begin{verbatim}
+make CC="bin/cilly --includedir=myinclude"
+\end{verbatim}
+
+ This will force the preprocessor to use the file \t{myinclude/xxx/stdio.h}
+(if it exists) whenever it encounters \t{\#include }. The \t{xxx} is
+a string that identifies the compiler version you are using. This modified
+include files should be produced with the patcher script (see
+\secref{patcher}).
+
+ \subsection{\t{cilly} Options}
+
+ Among the options for the \t{cilly} you can put anything that can normally
+go in the command line of the compiler that \t{cilly} is impersonating.
+\t{cilly} will do its best to pass those options along to the appropriate
+subprocess. In addition, the following options are supported (a complete and
+up-to-date list can always be obtained by running \t{cilly -{}-help}):
+
+\begin{itemize}
+\item \t{-{}-mode=mode} This must be the first argument if present. It makes
+\t{cilly} behave as a given compiled. The following modes are recognized:
+ \begin{itemize}
+ \item GNUCC - the GNU C Compiler. This is the default.
+ \item MSVC - the Microsoft Visual C compiler. Of course, you should
+ pass only MSVC valid options in this case.
+ \item AR - the archiver \t{ar}. Only the mode \t{cr} is supported and
+ the original version of the archive is lost.
+ \end{itemize}
+\item \t{-{}-help} Prints a list of the options supported.
+\item \t{-{}-verbose} Prints lots of messages about what is going on.
+\item \t{-{}-stages} Less than \t{-{}-verbose} but lets you see what \t{cilly}
+ is doing.
+\item \t{-{}-merge} This tells \t{cilly} to first attempt to collect into one
+source file all of the sources that make your application, and then to apply
+\t{cilly.asm} on the resulting source. The sequence of actions in this case is
+described above and the merger itself is described in \secref{merger}.
+
+\item \t{-{}-leavealone=xxx}. Do not merge and do not present to CIL the files
+whose basename is "xxx". These files are compiled as usual and linked in at
+the end.
+\item \t{-{}-includedir=xxx}. Override the include files with those in the given
+directory. The given directory is the same name that was given an an argument
+to the patcher (see \secref{patcher}). In particular this means that
+that directory contains subdirectories named based on the current compiler
+version. The patcher creates those directories.
+\item \t{-{}-usecabs}. Do not CIL, but instead just parse the source and print
+its AST out. This should looked like the preprocessed file. This is useful
+when you suspect that the conversion to CIL phase changes the meaning of the
+program.
+\item \t{-{}-save-temps=xxx}. Temporary files are preserved in the xxx
+ directory. For example, the output of CIL will be put in a file
+ named \t{*.cil.c}.
+\item \t{-{}-save-temps}. Temporay files are preserved in the current directory.
+\end{itemize}
+
+
+ \subsection{\t{cilly.asm} Options}
+ \label{sec-cilly-asm-options}
+
+ All of the options that start with \t{-{}-} and are not understood by
+\t{cilly} are passed on to \t{cilly.asm}. \t{cilly} also passes along to
+\t{cilly.asm} flags such as \t{-{}-MSVC} that both need to know
+about. The following options are supported. Many of these flags also
+have corresponding ``\t{-{}-no}*'' versions if you need to go back to
+the default, as in ``\t{-{}-nowarnall}''.
+
+\hspace*{2cm} {\bf General Options:}
+\begin{itemize}
+ \item \t{-{}-version} output version information and exit
+ \item \t{-{}-verbose} Print lots of random stuff. This is passed on from cilly
+ \item \t{-{}-warnall} Show all warnings.
+ \item \t{-{}-debug=xxx} turns on debugging flag xxx
+ \item \t{-{}-nodebug=xxx} turns off debugging flag xxx
+ \item \t{-{}-flush} Flush the output streams often (aids debugging).
+ \item \t{-{}-check} Run a consistency check over the CIL after every operation.
+ \item \t{-{}-strictcheck} Same as \t{-{}-check}, but it treats
+ consistency problems as errors instead of warnings.
+ \item \t{-{}-nocheck} turns off consistency checking of CIL.
+ \item \t{-{}-noPrintLn} Don't output \#line directives in the output.
+ \item \t{-{}-commPrintLn} Print \#line directives in the output, but
+ put them in comments.
+ \item \t{-{}-commPrintLnSparse} Like \t{-{}-commPrintLn} but print only new
+ line numbers.
+ \item \t{-{}-log=xxx} Set the name of the log file. By default stderr is used
+ \item \t{-{}-MSVC} Enable MSVC compatibility. Default is GNU.
+ %\item \t{-{}-testcil} test CIL using the given compiler
+ \item \t{-{}-ignore-merge-conflicts} ignore merging conflicts.
+ %\item \t{-{}-sliceGlobal} output is the slice of #pragma cilnoremove(sym) symbols
+ %\item \t{-{}-tr }: subsystem to show debug printfs for
+ %\item \t{-{}-pdepth=n}: set max print depth (default: 5)
+ \item \t{-{}-extrafiles=filename}: the name of a file that contains
+ a list of additional files to process, separated by whitespace.
+ \item \t{-{}-stats} Print statistics about the running time of the
+ parser, conversion to CIL, etc. Also prints memory-usage
+ statistics. You can time parts of your own code as well. Calling
+ (\t{Stats.time ``label'' func arg}) will evaluate \t{(func arg)}
+ and remember how long this takes. If you call \t{Stats.time}
+ repeatedly with the same label, CIL will report the aggregate
+ time.
+
+ If available, CIL uses the x86 performance counters for these
+ stats. This is very precise, but results in ``wall-clock time.''
+ To report only user-mode time, find the call to \t{Stats.reset} in
+ \t{main.ml}, and change it to \t{Stats.reset Stats.SoftwareTimer}.
+
+ {\bf Lowering Options}
+ \item \t{-{}-noLowerConstants} do not lower constant expressions.
+ \item \t{-{}-noInsertImplicitCasts} do not insert implicit casts.
+ \item \t{-{}-forceRLArgEval} Forces right to left evaluation of function arguments.
+ %\item \t{-{}-nocil=n} Do not compile to CIL the global with the given index.
+ \item \t{-{}-disallowDuplication} Prevent small chunks of code from being duplicated.
+ \item \t{-{}-keepunused} Do not remove the unused variables and types.
+ \item \t{-{}-rmUnusedInlines} Delete any unused inline functions. This is the default in MSVC mode.
+
+ {\bf Output Options:}
+ \item \t{-{}-printCilAsIs} Do not try to simplify the CIL when
+ printing. Without this flag, CIL will attempt to produce prettier
+ output by e.g. changing \t{while(1)} into more meaningful loops.
+ \item \t{-{}-noWrap} do not wrap long lines when printing
+ \item \t{-{}-out=xxx} the name of the output CIL file. \t{cilly}
+ sets this for you.
+ \item \t{-{}-mergedout=xxx} specify the name of the merged file
+ \item \t{-{}-cabsonly=xxx} CABS output file name
+%% \item \t{-{}-printComments : print cabs tree structure in comments in cabs output
+%% \item \t{-{}-patchFile : name the file containing patching transformations
+%% \item \t{-{}-printPatched : print patched CABS files after patching, to *.patched
+%% \item \t{-{}-printProtos : print prototypes to safec.proto.h after parsing
+
+ {\bf Selected features.} See \secref{Extension} for more information.
+\item \t{-{}-dologcalls}. Insert code in the processed source to print the name of
+functions as are called. Implemented in \t{src/ext/logcalls.ml}.
+\item \t{-{}-dologwrites}. Insert code in the processed source to print the
+address of all memory writes. Implemented in \t{src/ext/logwrites.ml}.
+\item \t{-{}-dooneRet}. Make each function have at most one 'return'.
+Implemented in \t{src/ext/oneret.ml}.
+\item \t{-{}-dostackGuard}. Instrument function calls and returns to
+maintain a separate stack for return addresses. Implemeted in
+\t{src/ext/heapify.ml}.
+\item \t{-{}-domakeCFG}. Make the program look more like a CFG. Implemented
+in \t{src/cil.ml}.
+\item \t{-{}-dopartial}. Do interprocedural partial evaluation and
+constant folding. Implemented in \t{src/ext/partial.ml}.
+\item \t{-{}-dosimpleMem}. Simplify all memory expressions. Implemented in
+\t{src/ext/simplemem.ml}.
+
+For an up-to-date list of available options, run \t{cilly.asm -{}-help}.
+
+\end{itemize}
+
+\subsection{Internal Options}
+\label{sec-cilly-internal-options}
+
+All of the \t{cilly.asm} options described above can be set
+programmatically -- see \t{src/ciloptions.ml} or the individual
+extensions to see how. Some options should be set before parsing to
+be effective.
+
+Additionally, a few CIL options have no command-line flag and can only
+be set programmatically. These options may be useful for certain
+analyses:
+
+\begin{itemize}
+\item \t{Cabs2cil.doCollapseCallCast}:This is false by default. Set
+to true to replicate the behavior of CIL 1.3.5 and earlier.
+
+When false, all casts in the program are made explicit using the
+\t{CastE} expression. Accordingly, the destination of a Call
+instruction will always have the same type as the function's return
+type.
+
+If true, the destination type of a Call may differ from the return type, so
+there is an implicit cast. This is useful for analyses involving
+\t{malloc}. Without this option, CIL converts ``\t{T* x = malloc(n);}''
+into ``\t{void* tmp = malloc(n); T* x = (T*)tmp;}''. If you don't
+need all casts to be made explicit, you can set
+\t{Cabs2cil.doCollapseCallCast} to true so that CIL won't insert a
+temporary and you can more easily determine the allocation type from
+calls to \t{malloc}.
+
+
+\end{itemize}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Library of CIL Modules} \label{sec-Extension}\cutname{ext.html}
+
+ We are developing a suite of modules that use CIL for program analyses and
+transformations that we have found useful. You can use these modules directly
+on your code, or generally as inspiration for writing similar modules. A
+particularly big and complex application written on top of CIL is CCured
+(\ahrefurl{../ccured/index.html}).
+
+\subsection{Control-Flow Graphs} \label{sec-cfg}
+
+The \ciltyperef{stmt} datatype includes fields for intraprocedural
+control-flow information: the predecessor and successor statements of
+the current statement. This information is not computed by default.
+If you want to use the control-flow graph, or any of the extensions in
+this section that require it, you have to explicitly ask CIL to
+compute the CFG using one of these two methods:
+
+\subsubsection{The CFG module (new in CIL 1.3.5)}
+
+The best way to compute the CFG is with the CFG module. Just invoke
+\cfgref{computeFileCFG} on your file. The \moduleref{Cfg} API
+describes the rest of actions you can take with this module, including
+computing the CFG for one function at a time, or printing the CFG in
+\t{dot} form.
+
+
+\subsubsection{Simplified control flow}
+
+CIL can reduce high-level C control-flow constructs like \t{switch} and
+\t{continue} to lower-level \t{goto}s. This completely eliminates some
+possible classes of statements from the program and may make the result
+easier to analyze (e.g., it simplifies data-flow analysis).
+
+You can invoke this transformation on the command line with
+\t{-{}-domakeCFG} or programatically with \cilvalref{prepareCFG}.
+After calling Cil.prepareCFG, you can use \cilvalref{computeCFGInfo}
+to compute the CFG information and find the successor and predecessor
+of each statement.
+
+For a concrete example, you can see how \t{cilly -{}-domakeCFG}
+transforms the following code (note the fall-through in case 1):
+
+\begin{cilcode}[global] --domakeCFG
+ int foo (int predicate) {
+ int x = 0;
+ switch (predicate) {
+ case 0: return 111;
+ case 1: x = x + 1;
+ case 2: return (x+3);
+ case 3: break;
+ default: return 222;
+ }
+ return 333;
+ }
+\end{cilcode}
+
+\subsection{Data flow analysis framework}
+
+ The \moduleref{Dataflow} module (click for the ocamldoc) contains a
+parameterized framework for forward and backward data flow
+analyses. You provide the transfer functions and this module does the
+analysis. You must compute control-flow information (\secref{cfg})
+before invoking the Dataflow module.
+
+
+\subsection{Inliner}
+
+ The file ext/inliner.ml contains a function inliner.
+
+\subsection{Dominators}
+
+ The module \moduleref{Dominators} contains the computation of immediate
+ dominators. It uses the \moduleref{Dataflow} module.
+
+\subsection{Points-to Analysis}
+
+The module \t{ptranal.ml} contains two interprocedural points-to
+analyses for CIL: \t{Olf} and \t{Golf}. \t{Olf} is the default.
+(Switching from \t{olf.ml} to \t{golf.ml} requires a change in
+\t{Ptranal} and a recompiling \t{cilly}.)
+
+The analyses have the following characteristics:
+\begin{itemize}
+\item Not based on C types (inferred pointer relationships are sound
+ despite most kinds of C casts)
+\item One level of subtyping
+\item One level of context sensitivity (Golf only)
+\item Monomorphic type structures
+\item Field insensitive (fields of structs are conflated)
+\item Demand-driven (points-to queries are solved on demand)
+\item Handle function pointers
+\end{itemize}
+
+The analysis itself is factored into two components: \t{Ptranal},
+which walks over the CIL file and generates constraints, and \t{Olf}
+or \t{Golf}, which solve the constraints. The analysis is invoked
+with the function \t{Ptranal.analyze\_file: Cil.file ->
+ unit}. This function builds the points-to graph for the CIL file
+and stores it internally. There is currently no facility for clearing
+internal state, so \t{Ptranal.analyze\_file} should only be called
+once.
+
+%%% Interface for querying the points-to graph...
+The constructed points-to graph supports several kinds of queries,
+including alias queries (may two expressions be aliased?) and
+points-to queries (to what set of locations may an expression point?).
+
+%%% Main Interface
+The main interface with the alias analysis is as follows:
+\begin{itemize}
+\item \t{Ptranal.may\_alias: Cil.exp -> Cil.exp -> bool}. If
+ \t{true}, the two expressions may have the same value.
+\item \t{Ptranal.resolve\_lval: Cil.lval -> (Cil.varinfo
+ list)}. Returns the list of variables to which the given
+ left-hand value may point.
+\item \t{Ptranal.resolve\_exp: Cil.exp -> (Cil.varinfo list)}.
+ Returns the list of variables to which the given expression may
+ point.
+\item \t{Ptranal.resolve\_funptr: Cil.exp -> (Cil.fundec
+ list)}. Returns the list of functions to which the given
+ expression may point.
+\end{itemize}
+
+%%% Controlling the analysis
+The precision of the analysis can be customized by changing the values
+of several flags:
+
+\begin{itemize}
+\item \t{Ptranal.no\_sub: bool ref}.
+ If \t{true}, subtyping is disabled. Associated commandline option:
+ {\bf -{}-ptr\_unify}.
+\item \t{Ptranal.analyze\_mono: bool ref}.
+ (Golf only) If \t{true}, context sensitivity is disabled and the
+ analysis is effectively monomorphic. Commandline option:
+ {\bf -{}-ptr\_mono}.
+\item \t{Ptranal.smart\_aliases: bool ref}.
+ (Golf only) If \t{true}, ``smart'' disambiguation of aliases is
+ enabled. Otherwise, aliases are computed by intersecting points-to
+ sets. This is an experimental feature.
+\item \t{Ptranal.model\_strings: bool ref}.
+ Make the alias analysis model string constants by treating them as
+ pointers to chars. Commandline option: {\bf -{}-ptr\_model\_strings}
+\item \t{Ptranal.conservative\_undefineds: bool ref}.
+ Make the most pessimistic assumptions about globals if an undefined
+ function is present. Such a function can write to every global
+ variable. Commandline option: {\bf -{}-ptr\_conservative}
+\end{itemize}
+
+In practice, the best precision/efficiency tradeoff is achieved by
+setting \t{Ptranal.no\_sub} to \t{false}, \t{Ptranal.analyze\_mono} to
+\t{true}, and \t{Ptranal.smart\_aliases} to \t{false}. These are the
+default values of the flags.
+
+%%% Debug output
+There are also a few flags that can be used to inspect or serialize
+the results of the analysis.
+\begin{itemize}
+%%\item \t{Ptranal.ptrResults}.
+%% Commandline option: {\bf -{}-ptr\_results}. A no-op!
+%%
+%%\item \t{Ptranal.ptrTypes}.
+%% Commandline option: {\bf -{}-ptr\_types}. A no-op!
+%%
+\item \t{Ptranal.debug\_may\_aliases}.
+ Print the may-alias relationship of each pair of expressions in the
+ program. Commandline option: {\bf -{}-ptr\_may\_aliases}.
+\item \t{Ptranal.print\_constraints: bool ref}.
+ If \t{true}, the analysis will print each constraint as it is
+ generated.
+\item \t{Ptranal.print\_types: bool ref}.
+ If \t{true}, the analysis will print the inferred type of each
+ variable in the program.
+
+ If \t{Ptranal.analyze\_mono} and \t{Ptranal.no\_sub} are both
+ \t{true}, this output is sufficient to reconstruct the points-to
+ graph. One nice feature is that there is a pretty printer for
+ recursive types, so the print routine does not loop.
+\item \t{Ptranal.compute\_results: bool ref}.
+ If \t{true}, the analysis will print out the points-to set of each
+ variable in the program. This will essentially serialize the
+ points-to graph.
+\end{itemize}
+
+\subsection{StackGuard}
+
+The module \t{heapify.ml} contains a transformation similar to the one
+described in ``StackGuard: Automatic Adaptive Detection and Prevention of
+Buffer-Overflow Attacks'', {\em Proceedings of the 7th USENIX Security
+Conference}. In essence it modifies the program to maintain a separate
+stack for return addresses. Even if a buffer overrun attack occurs the
+actual correct return address will be taken from the special stack.
+
+Although it does work, this CIL module is provided mainly as an example of
+how to perform a simple source-to-source program analysis and
+transformation. As an optimization only functions that contain a dangerous
+local array make use of the special return address stack.
+
+For a concrete example, you can see how \t{cilly -{}-dostackGuard}
+transforms the following dangerous code:
+
+\begin{cilcode}[global] --dostackGuard
+ int dangerous() {
+ char array[10];
+ scanf("%s",array); // possible buffer overrun!
+ }
+
+ int main () {
+ return dangerous();
+ }
+\end{cilcode}
+
+
+\subsection{Heapify}
+
+The module \t{heapify.ml} also contains a transformation that moves all
+dangerous local arrays to the heap. This also prevents a number of buffer
+overruns.
+
+For a concrete example, you can see how \t{cilly -{}-doheapify}
+transforms the following dangerous code:
+
+\begin{cilcode}[global] --doheapify
+ int dangerous() {
+ char array[10];
+ scanf("%s",array); // possible buffer overrun!
+ }
+
+ int main () {
+ return dangerous();
+ }
+\end{cilcode}
+
+\subsection{One Return}
+
+The module \t{oneret.ml} contains a transformation the ensures that all
+function bodies have at most one return statement. This simplifies a number
+of analyses by providing a canonical exit-point.
+
+For a concrete example, you can see how \t{cilly -{}-dooneRet}
+transforms the following code:
+
+\begin{cilcode}[global] --dooneRet
+ int foo (int predicate) {
+ if (predicate <= 0) {
+ return 1;
+ } else {
+ if (predicate > 5)
+ return 2;
+ return 3;
+ }
+ }
+\end{cilcode}
+
+\subsection{Partial Evaluation and Constant Folding}
+
+The \t{partial.ml} module provides a simple interprocedural partial
+evaluation and constant folding data-flow analysis and transformation.
+This transformation always requires the \t{-{}-domakeCFG} option. It
+performs:
+\begin{itemize}
+\item Constant folding even of compiler-dependent constants as, for
+ example \t{sizeof(T)}.
+\item \t{if}-statement simplification for conditional expressions that
+ evaluate to a constant. The \t{if}-statement gets replaced with the
+ taken branch.
+\item Call elimination for
+ \begin{enumerate}
+ \item\label{enum:partial-empty-proc} empty functions and
+ \item\label{enum:partial-const-func} functions that return a
+ constant.
+ \end{enumerate}
+ In case~\ref{enum:partial-empty-proc} the call disappears completely
+ and in case~\ref{enum:partial-const-func} it is replaced by the
+ constant the function returns.
+\end{itemize}
+
+Several commandline options control the behavior of the feature.
+\begin{itemize}
+\item \t{-{}-partial\_no\_global\_const}:
+ Treat global constants as unknown values. This is the default.
+\item \t{-{}-partial\_global\_const}:
+ Treat global constants as initialized. Let global constants
+ participate in the partial evaluation.
+\item \t{-{}-partial\_root\_function} \i{function-name}:
+ Name of the function where the simplification starts. Default:
+ \t{main}.
+\item \t{-{}-partial\_use\_easy\_alias}
+ Use Partial's built-in easy alias to analyze pointers. This is the
+ default.
+\item \t{-{}-partial\_use\_ptranal\_alias}
+ Use feature Ptranal to analyze pointers. Setting this option
+ requires \t{-{}-doptranal}.
+\end{itemize}
+
+For a concrete example, you can see how \t{cilly -{}-domakeCFG -{}-dopartial}
+transforms the following code (note the eliminated \t{if}-branch and the
+partial optimization of \t{foo}):
+
+\begin{cilcode}[global] --domakeCFG --dopartial
+ int foo(int x, int y) {
+ int unknown;
+ if (unknown)
+ return y + 2;
+ return x + 3;
+ }
+
+ int bar(void) {
+ return -1;
+ }
+
+ int main(void) {
+ int a, b, c;
+ a = foo(5, 7) + foo(6, 7) + bar();
+ b = 4;
+ c = b * b;
+ if (b > c)
+ return b - c;
+ else
+ return b + c;
+ }
+\end{cilcode}
+
+\subsection{Reaching Definitions}
+
+The \t{reachingdefs.ml} module uses the dataflow framework and CFG
+information to calculate the definitions that reach each
+statement. After computing the CFG (\secref{cfg}) and calling
+\t{computeRDs} on a
+function declaration, \t{ReachingDef.stmtStartData} will contain a
+mapping from statement IDs to data about which definitions reach each
+statement. In particular, it is a mapping from statement IDs to a
+triple the first two members of which are used internally. The third
+member is a mapping from variable IDs to Sets of integer options. If
+the set contains \t{Some(i)}, then the definition of that variable
+with ID \t{i} reaches that statement. If the set contains \t{None},
+then there is a path to that statement on which there is no definition
+of that variable. Also, if the variable ID is unmapped at a
+statement, then no definition of that variable reaches that statement.
+
+To summarize, reachingdefs.ml has the following interface:
+\begin{itemize}
+\item \t{computeRDs} -- Computes reaching definitions. Requires that
+CFG information has already been computed for each statement.
+\item \t{ReachingDef.stmtStartData} -- contains reaching
+definition data after \t{computeRDs} is called.
+\item \t{ReachingDef.defIdStmtHash} -- Contains a mapping
+from definition IDs to the ID of the statement in which
+the definition occurs.
+\item \t{getRDs} -- Takes a statement ID and returns
+reaching definition data for that statement.
+\item \t{instrRDs} -- Takes a list of instructions and the
+definitions that reach the first instruction, and for
+each instruction calculates the definitions that reach
+either into or out of that instruction.
+\item \t{rdVisitorClass} -- A subclass of nopCilVisitor that
+can be extended such that the current reaching definition
+data is available when expressions are visited through
+the \t{get\_cur\_iosh} method of the class.
+\end{itemize}
+
+\subsection{Available Expressions}
+
+The \t{availexps.ml} module uses the dataflow framework and CFG
+information to calculate something similar to a traditional available
+expressions analysis. After \t{computeAEs} is called following a CFG
+calculation (\secref{cfg}), \t{AvailableExps.stmtStartData} will
+contain a mapping
+from statement IDs to data about what expressions are available at
+that statement. The data for each statement is a mapping for each
+variable ID to the whole expression available at that point(in the
+traditional sense) which the variable was last defined to be. So,
+this differs from a traditional available expressions analysis in that
+only whole expressions from a variable definition are considered rather
+than all expressions.
+
+The interface is as follows:
+\begin{itemize}
+\item \t{computeAEs} -- Computes available expressions. Requires
+that CFG information has already been comptued for each statement.
+\item \t{AvailableExps.stmtStartData} -- Contains available
+expressions data for each statement after \t{computeAEs} has been
+called.
+\item \t{getAEs} -- Takes a statement ID and returns
+available expression data for that statement.
+\item \t{instrAEs} -- Takes a list of instructions and
+the availalbe expressions at the first instruction, and
+for each instruction calculates the expressions available
+on entering or exiting each instruction.
+\item \t{aeVisitorClass} -- A subclass of nopCilVisitor that
+can be extended such that the current available expressions
+data is available when expressions are visited through the
+\t{get\_cur\_eh} method of the class.
+\end{itemize}
+
+\subsection{Liveness Analysis}
+
+The \t{liveness.ml} module uses the dataflow framework and
+CFG information to calculate which variables are live at
+each program point. After \t{computeLiveness} is called
+following a CFG calculation (\secref{cfg}), \t{LiveFlow.stmtStartData} will
+contain a mapping for each statement ID to a set of \t{varinfo}s
+for varialbes live at that program point.
+
+The interface is as follows:
+\begin{itemize}
+\item \t{computeLiveness} -- Computes live variables. Requires
+that CFG information has already been computed for each statement.
+\item \t{LiveFlow.stmtStartData} -- Contains live variable data
+for each statement after \t{computeLiveness} has been called.
+\end{itemize}
+
+Also included in this module is a command line interface that
+will cause liveness data to be printed to standard out for
+a particular function or label.
+
+\begin{itemize}
+\item \t{-{}-doliveness} -- Instructs cilly to comptue liveness
+information and to print on standard out the variables live
+at the points specified by \t{-{}-live\_func} and \t{live\_label}.
+If both are ommitted, then nothing is printed.
+\item \t{-{}-live\_func} -- The name of the function whose
+liveness data is of interest. If \t{-{}-live\_label} is ommitted,
+then data for each statement is printed.
+\item \t{-{}-live\_label} -- The name of the label at which
+the liveness data will be printed.
+\end{itemize}
+
+\subsection{Dead Code Elimination}
+
+The module \t{deadcodeelim.ml} uses the reaching definitions
+analysis to eliminate assignment instructions whose results
+are not used. The interface is as follows:
+
+\begin{itemize}
+\item \t{elim\_dead\_code} -- Performs dead code elimination
+on a function. Requires that CFG information has already
+been computed (\secref{cfg}).
+\item \t{dce} -- Performs dead code elimination on an
+entire file. Requires that CFG information has already
+been computed.
+\end{itemize}
+
+\subsection{Simple Memory Operations}
+
+The \t{simplemem.ml} module allows CIL lvalues that contain memory
+accesses to be even futher simplified via the introduction of
+well-typed temporaries. After this transformation all lvalues involve
+at most one memory reference.
+
+For a concrete example, you can see how \t{cilly -{}-dosimpleMem}
+transforms the following code:
+
+\begin{cilcode}[global] --dosimpleMem
+ int main () {
+ int ***three;
+ int **two;
+ ***three = **two;
+ }
+\end{cilcode}
+
+\subsection{Simple Three-Address Code}
+
+The \t{simplify.ml} module further reduces the complexity of program
+expressions and gives you a form of three-address code. After this
+transformation all expressions will adhere to the following grammar:
+\begin{verbatim}
+ basic::=
+ Const _
+ Addrof(Var v, NoOffset)
+ StartOf(Var v, NoOffset)
+ Lval(Var v, off), where v is a variable whose address is not taken
+ and off contains only "basic"
+
+ exp::=
+ basic
+ Lval(Mem basic, NoOffset)
+ BinOp(bop, basic, basic)
+ UnOp(uop, basic)
+ CastE(t, basic)
+
+ lval ::=
+ Mem basic, NoOffset
+ Var v, off, where v is a variable whose address is not taken and off
+ contains only "basic"
+\end{verbatim}
+In addition, all \t{sizeof} and \t{alignof} forms are turned into
+constants. Accesses to arrays and variables whose address is taken are
+turned into "Mem" accesses. All field and index computations are turned
+into address arithmetic.
+
+For a concrete example, you can see how \t{cilly -{}-dosimplify}
+transforms the following code:
+
+\begin{cilcode}[global] --dosimplify
+ int main() {
+ struct mystruct {
+ int a;
+ int b;
+ } m;
+ int local;
+ int arr[3];
+ int *ptr;
+
+ ptr = &local;
+ m.a = local + sizeof(m) + arr[2];
+ return m.a;
+ }
+\end{cilcode}
+
+\subsection{Converting C to C++}
+
+The module canonicalize.ml performs several transformations to correct
+differences between C and C++, so that the output is (hopefully) valid
+C++ code. This may be incomplete --- certain fixes which are necessary
+for some programs are not yet implemented.
+
+Using the \t{-{}-doCanonicalize} option with CIL will perform the
+following changes to your program:
+
+\begin{enumerate}
+\item Any variables that use C++ keywords as identifiers are renamed.
+\item C allows global variables to have multiple declarations and
+ multiple (equivalent) definitions. This transformation removes
+ all but one declaration and all but one definition.
+\item \t{\_\_inline} is \#defined to \t{inline}, and \t{\_\_restrict}
+ is \#defined to nothing.
+\item C allows function pointers with no specified arguments to be used on
+ any argument list. To make C++ accept this code, we insert a cast
+ from the function pointer to a type that matches the arguments. Of
+ course, this does nothing to guarantee that the pointer actually has
+ that type.
+\item Makes casts from int to enum types explicit. (CIL changes enum
+ constants to int constants, but doesn't use a cast.)
+\end{enumerate}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Controlling CIL}
+
+ In the process of converting a C file to CIL we drop the unused prototypes
+and even inline function definitions. This results in much smaller files. If
+you do not want this behavior then you must pass the \t{-{}-keepunused} argument
+to the CIL application.
+
+ Alternatively you can put the following pragma in the code (instructing CIL
+to specifically keep the declarations and definitions of the function
+\t{func1} and variable \t{var2}, the definition of type \t{foo} and of
+structure \t{bar}):
+\begin{code}
+#pragma cilnoremove("func1", "var2", "type foo", "struct bar")
+\end{verbatim}\end{code}
+
+
+
+\section{GCC Extensions}
+
+ The CIL parser handles most of the \t{gcc}
+\ahreftop{http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc\_5.html#SEC67}{extensions}
+and compiles them to CIL. The following extensions are not handled (note that
+we are able to compile a large number of programs, including the Linux kernel,
+without encountering these):
+
+\begin{enumerate}
+\item Nested function definitions.
+\item Constructing function calls.
+\item Naming an expression's type.
+\item Complex numbers
+\item Hex floats
+\item Subscripts on non-lvalue arrays.
+\item Forward function parameter declarations
+\end{enumerate}
+
+ The following extensions are handled, typically by compiling them away:
+\begin{enumerate}
+\item Attributes for functions, variables and types. In fact, we have a clear
+specification (see \secref{attrib}) of how attributes are interpreted. The
+specification extends that of \t{gcc}.
+\item Old-style function definitions and prototypes. These are translated to
+new-style.
+\item Locally-declared labels. As part of the translation to CIL, we generate
+new labels as needed.
+\item Labels as values and computed goto. This allows a program to take the
+address of a label and to manipulate it as any value and also to perform a
+computed goto. We compile this by assigning each label whose address is taken
+a small integer that acts as its address. Every computed \t{goto} in the body
+of the function is replaced with a \t{switch} statement. If you want to invoke
+the label from another function, you are on your own (the \t{gcc}
+documentation says the same.)
+\item Generalized lvalues. You can write code like \t{(a, b) += 5} and it gets
+translated to CIL.
+\item Conditionals with omitted operands. Things like \t{x ? : y} are
+translated to CIL.
+\item Double word integers. The type \t{long long} and the \t{LL} suffix on
+constants is understood. This is currently interpreted as 64-bit integers.
+\item Local arrays of variable length. These are converted to uses of
+\t{alloca}, the array variable is replaced with a pointer to the allocated
+array and the instances of \t{sizeof(a)} are adjusted to return the size of
+the array and not the size of the pointer.
+\item Non-constant local initializers. Like all local initializers these are
+compiled into assignments.
+\item Compound literals. These are also turned into assignments.
+\item Designated initializers. The CIL parser actually supports the full ISO
+syntax for initializers, which is more than both \t{gcc} and \t{MSVC}. I
+(George) think that this is the most complicated part of the C language and
+whoever designed it should be banned from ever designing languages again.
+\item Case ranges. These are compiled into separate cases. There is no code
+duplication, just a larger number of \t{case} statements.
+\item Transparent unions. This is a strange feature that allows you to define
+a function whose formal argument has a (tranparent) union type, but the
+argument is called as if it were the first element of the union. This is
+compiled away by saying that the type of the formal argument is that of the
+first field, and the first thing in the function body we copy the formal into
+a union.
+
+\item Inline assembly-language. The full syntax is supported and it is carried
+as such in CIL.
+
+\item Function names as strings. The identifiers \t{\_\_FUNCTION\_\_} and
+\t{\_\_PRETTY\_FUNCTION\_\_} are replaced with string literals.
+
+\item Keywords \t{typeof}, \t{alignof}, \t{inline} are supported.
+\end{enumerate}
+
+\section{CIL Limitations}
+
+ There are several implementation details of CIL that might make it unusable
+ or less than ideal for certain tasks:
+
+\begin{itemize}
+\item CIL operates after preprocessing. If you need to see comments, for
+example, you cannot use CIL. But you can use attributes and pragmas instead.
+And there is some support to help you patch the include files before they are
+seen by the preprocessor. For example, this is how we turn some
+\t{\#define}s that we don't like into function calls.
+
+\item CIL does transform the code in a non-trivial way. This is done in order
+to make most analyses easier. But if you want to see the code \t{e1, e2++}
+exactly as it appears in the code, then you should not use CIL.
+
+\item CIL removes all local scopes and moves all variables to function
+scope. It also separates a declaration with an initializer into a declaration
+plus an assignment. The unfortunate effect of this transformation is that
+local variables cannot have the \t{const} qualifier.
+
+\end{itemize}
+
+\section{Known Bugs and Limitations}
+
+\subsection{Code that CIL won't compile}
+\begin{itemize}
+\item We do not support tri-graph sequences (ISO 5.2.1.1).
+
+\item CIL cannot parse arbitrary \t{\#pragma} directives. Their
+ syntax must follow gcc's attribute syntax to be understood. If you
+ need a pragma that does not follow gcc syntax, add that pragma's name
+ to \t{no\_parse\_pragma} in \t{src/frontc/clexer.mll} to indicate that
+ CIL should treat that pragma as a monolithic string rather than try
+ to parse its arguments.
+
+ CIL cannot parse a line containing an empty \t{\#pragma}.
+
+\item CIL only parses \t{\#pragma} directives at the "top level", this is,
+ outside of any enum, structure, union, or function definitions.
+
+ If your compiler uses pragmas in places other than the top-level,
+ you may have to preprocess the sources in a special way (sed, perl,
+ etc.) to remove pragmas from these locations.
+
+\item CIL cannot parse the following code (fixing this problem would require
+ extensive hacking of the LALR grammar):
+\begin{code}
+int bar(int ()); // This prototype cannot be parsed
+int bar(int x()); // If you add a name to the function, it works
+int bar(int (*)()); // This also works (and it is more appropriate)
+\end{verbatim}\end{code}
+
+\item CIL also cannot parse certain K\&R old-style prototypes with missing
+ return type:
+\begin{code}
+g(); // This cannot be parsed
+int g(); // This is Ok
+\end{verbatim}\end{code}
+
+\item CIL does not understand some obscure combinations of type
+ specifiers (``signed'' and ``unsigned'' applied to typedefs that
+ themselves contain a sign specification; you could argue that this
+ should not be allowed anyway):
+\begin{code}
+typedef signed char __s8;
+__s8 unsigned uchartest; // This is unsigned char for gcc
+\end{verbatim}\end{code}
+
+\item CIL does not support constant-folding of floating-point values,
+ because it is difficult to simulate the behavior of various
+ C floating-point implementations in Ocaml. Therefore, code such as
+ this will not compile:
+\begin{code}
+int globalArray[(1.0 < 2.0) ? 5 : 50]
+\end{verbatim}\end{code}
+
+\item CIL uses Ocaml ints to represent the size of an object.
+ Therefore, it can't compute the size of any object that is larger
+ than $2^{30}$ bits (134 MB) on 32-bit computers, or $2^{62}$ bits on
+ 64-bit computers.
+
+\end{itemize}
+
+\subsection{Code that behaves differently under CIL}
+
+\begin{itemize}
+\item GCC has a strange feature called ``extern inline''. Such a function can
+be defined twice: first with the ``extern inline'' specifier and the second
+time without it. If optimizations are turned off then the ``extern inline''
+definition is considered a prototype (its body is ignored). If optimizations
+are turned on then the extern inline function is inlined at all of its
+occurrences from the point of its definition all the way to the point where the
+(optional) second definition appears. No body is generated for an extern
+inline function. A body is generated for the real definition and that one is
+used in the rest of the file.
+
+CIL will assume optimizations are on, and rename your extern inline
+function (and its uses) with the suffix
+\t{\_\_extinline}. This means that if you have two such definition, that do
+different things and the optimizations are not on, then the CIL version might
+compute a different answer !
+
+Also, if you have multiple extern inline declarations then CIL will ignore
+but the first one. This is not so bad because GCC itself would not like it.
+
+\item The implementation of \t{bitsSizeOf} does not take into account the
+ packing pragmas. However it was tested to be accurate on cygwin/gcc-2.95.3,
+ Linux/gcc-2.95.3 and on Windows/MSVC.
+
+\item \t{-malign-double} is ignored.
+
+\item The statement \t{x = 3 + x ++} will perform the increment of \t{x}
+ before the assignment, while \t{gcc} delays the increment after the
+ assignment. It turned out that this behavior is much easier to implement
+ than gcc's one, and either way is correct (since the behavior is unspecified
+ in this case). Similarly, if you write \t{x = x ++;} then CIL will perform
+ the increment before the assignment, whereas GCC and MSVC will perform it
+ after the assignment.
+
+\item Because CIL uses 64-bit floating point numbers in its internal
+ representation of floating point numbers, \t{long double} constants
+ are parsed as if they were \t{double} constants.
+
+\end{itemize}
+
+\subsection{Effects of the CIL translation}
+\begin{itemize}
+\item CIL cleans up C code in various ways that may suppress compiler
+ warnings. For example, CIL will add casts where they are needed
+ while \t{gcc} might print a warning for the missing cast. It is
+ not a goal of CIL to emit such warnings --- we support several
+ versions of several different compilers, and mimicking the warnings
+ of each is simply not possible. If you want to see compiler
+ warnings, compile your program with your favorite compiler before
+ using CIL.
+
+\item When you use variable-length arrays, CIL turns them into calls
+ to \t{alloca}. This means that they are deallocated when the
+ function returns and not when the local scope ends.
+
+ Variable-length arrays are not supported as fields of a struct or union.
+
+\item In the new versions of \t{glibc} there is a function
+ \t{\_\_builtin\_va\_arg} that takes a type as its second argument. CIL
+ handles that through a slight trick. As it parses the function it changes a
+ call like:
+\begin{verbatim}
+ mytype x = __builtin_va_arg(marker, mytype)
+\end{verbatim}
+ into
+\begin{verbatim}
+ mytype x;
+ __builtin_va_arg(marker, sizeof(mytype), &x);
+\end{verbatim}
+
+ The latter form is used internally in CIL. However, the CIL pretty printer
+ will try to emit the original code.
+
+ Similarly, \t{\_\_builtin\_types\_compatible\_p(t1, t2)}, which takes
+ types as arguments, is represented internally as
+ \t{\_\_builtin\_types\_compatible\_p(sizeof t1, sizeof t2)}, but the
+ sizeofs are removed when printing.
+
+\end{itemize}
+
+
+
+
+
+ \section{Using the merger}\label{sec-merger}\cutname{merger.html}
+
+ There are many program analyses that are more effective when
+done on the whole program.
+
+ The merger is a tool that combines all of the C source files in a project
+into a single C file. There are two tasks that a merger must perform:
+\begin{enumerate}
+\item Detect what are all the sources that make a project and with what
+compiler arguments they are compiled.
+
+\item Merge all of the source files into a single file.
+\end{enumerate}
+
+ For the first task the merger impersonates a compiler and a linker (both a
+GCC and a Microsoft Visual C mode are supported) and it expects to be invoked
+(from a build script or a Makefile) on all sources of the project. When
+invoked to compile a source the merger just preprocesses the source and saves
+the result using the name of the requested object file. By preprocessing at
+this time the merger is able to take into account variations in the command
+line arguments that affect preprocessing of different source files.
+
+ When the merger is invoked to link a number of object files it collects the
+preprocessed sources that were stored with the names of the object files, and
+invokes the merger proper. Note that arguments that affect the compilation or
+linking must be the same for all source files.
+
+ For the second task, the merger essentially concatenates the preprocessed
+sources with care to rename conflicting file-local declarations (we call this
+process alpha-conversion of a file). The merger also attempts to remove
+duplicate global declarations and definitions. Specifically the following
+actions are taken:
+
+\begin{itemize}
+\item File-scope names (\t{static} globals, names of types defined with
+\t{typedef}, and structure/union/enumeration tags) are given new names if they
+conflict with declarations from previously processed sources. The new name is
+formed by appending the suffix \t{\_\_\_n}, where \t{n} is a unique integer
+identifier. Then the new names are applied to their occurrences in the file.
+
+\item Non-static declarations and definitions of globals are never renamed.
+But we try to remove duplicate ones. Equality of globals is detected by
+comparing the printed form of the global (ignoring the line number directives)
+after the body has been alpha-converted. This process is intended to remove
+those declarations (e.g. function prototypes) that originate from the same
+include file. Similarly, we try to eliminate duplicate definitions of
+\t{inline} functions, since these occasionally appear in include files.
+
+\item The types of all global declarations with the same name from all files
+are compared for type isomorphism. During this process, the merger detects all
+those isomorphisms between structures and type definitions that are {\bf
+required} for the merged program to be legal. Such structure tags and
+typenames are coalesced and given the same name.
+
+\item Besides the structure tags and type names that are required to be
+isomorphic, the merger also tries to coalesce definitions of structures and
+types with the same name from different file. However, in this case the merger
+will not give an error if such definitions are not isomorphic; it will just
+use different names for them.
+
+\item In rare situations, it can happen that a file-local global in
+encountered first and it is not renamed, only to discover later when
+processing another file that there is an external symbol with the same name.
+In this case, a second pass is made over the merged file to rename the
+file-local symbol.
+\end{itemize}
+
+ Here is an example of using the merger:
+
+ The contents of \t{file1.c} is:
+\begin{code}
+struct foo; // Forward declaration
+extern struct foo *global;
+\end{verbatim}\end{code}
+
+ The contents of \t{file2.c} is:
+
+\begin{code}
+struct bar {
+ int x;
+ struct bar *next;
+};
+extern struct bar *global;
+struct foo {
+ int y;
+};
+extern struct foo another;
+void main() {
+}
+\end{verbatim}\end{code}
+
+ There are several ways in which one might create an executable from these
+files:
+\begin{itemize}
+\item
+\begin{verbatim}
+gcc file1.c file2.c -o a.out
+\end{verbatim}
+
+\item
+\begin{verbatim}
+gcc -c file1.c -o file1.o
+gcc -c file2.c -o file2.o
+ld file1.o file2.o -o a.out
+\end{verbatim}
+
+\item
+\begin{verbatim}
+gcc -c file1.c -o file1.o
+gcc -c file2.c -o file2.o
+ar r libfile2.a file2.o
+gcc file1.o libfile2.a -o a.out
+\end{verbatim}
+
+\item
+\begin{verbatim}
+gcc -c file1.c -o file1.o
+gcc -c file2.c -o file2.o
+ar r libfile2.a file2.o
+gcc file1.o -lfile2 -o a.out
+\end{verbatim}
+\end{itemize}
+
+ In each of the cases above you must replace all occurrences of \t{gcc} and
+\t{ld} with \t{cilly -{}-merge}, and all occurrences of \t{ar} with \t{cilly
+-{}-merge -{}-mode=AR}. It is very important that the \t{-{}-merge} flag be used
+throughout the build process. If you want to see the merged source file you
+must also pass the \t{-{}-keepmerged} flag to the linking phase.
+
+ The result of merging file1.c and file2.c is:
+\begin{code}
+// from file1.c
+struct foo; // Forward declaration
+extern struct foo *global;
+
+// from file2.c
+struct foo {
+ int x;
+ struct foo *next;
+};
+struct foo___1 {
+ int y;
+};
+extern struct foo___1 another;
+\end{verbatim}\end{code}
+
+ \section{Using the patcher}\label{sec-patcher}\cutname{patcher.html}
+
+ Occasionally we have needed to modify slightly the standard include files.
+So, we developed a simple mechanism that allows us to create modified copies
+of the include files and use them instead of the standard ones. For this
+purpose we specify a patch file and we run a program caller Patcher which
+makes modified copies of include files and applies the patch.
+
+ The patcher is invoked as follows:
+\begin{verbatim}
+bin/patcher [options]
+
+Options:
+ --help Prints this help message
+ --verbose Prints a lot of information about what is being done
+ --mode=xxx What tool to emulate:
+ GNUCC - GNU CC
+ MSVC - MS VC cl compiler
+
+ --dest=xxx The destination directory. Will make one if it does not exist
+ --patch=xxx Patch file (can be specified multiple times)
+ --ppargs=xxx An argument to be passed to the preprocessor (can be specified
+ multiple times)
+
+ --ufile=xxx A user-include file to be patched (treated as \#include "xxx")
+ --sfile=xxx A system-include file to be patched (treated as \#include )
+
+ --clean Remove all files in the destination directory
+ --dumpversion Print the version name used for the current compiler
+
+ All of the other arguments are passed to the preprocessor. You should pass
+ enough arguments (e.g., include directories) so that the patcher can find the
+ right include files to be patched.
+\end{verbatim}
+
+ Based on the given \t{mode} and the current version of the compiler (which
+the patcher can print when given the \t{dumpversion} argument) the patcher
+will create a subdirectory of the \t{dest} directory (say \t{/usr/home/necula/cil/include}), such as:
+\begin{verbatim}
+/usr/home/necula/cil/include/gcc_2.95.3-5
+\end{verbatim}
+
+ In that file the patcher will copy the modified versions of the include files
+specified with the \t{ufile} and \t{sfile} options. Each of these options can
+be specified multiple times.
+
+ The patch file (specified with the \t{patch} option) has a format inspired by
+the Unix \t{patch} tool. The file has the following grammar:
+
+\begin{verbatim}
+<<< flags
+patterns
+===
+replacement
+>>>
+\end{verbatim}
+
+ The flags are a comma separated, case-sensitive, sequence of keywords or
+keyword = value. The following flags are supported:
+\begin{itemize}
+\item \t{file=foo.h} - will only apply the patch on files whose name is
+ \t{foo.h}.
+\item \t{optional} - this means that it is Ok if the current patch does not
+match any of the processed files.
+\item \t{group=foo} - will add this patch to the named group. If this is not
+specified then a unique group is created to contain just the current patch.
+When all files specified in the command line have been patched, an error
+message is generated for all groups for whom no member patch was used. We use
+this mechanism to receive notice when the patch triggers are out-dated with
+respect to the new include files.
+\item \t{system=sysname} - will only consider this pattern on a given
+operating system. The ``sysname'' is reported by the ``\$\^O'' variable in
+Perl, except that Windows is always considered to have sysname
+``cygwin.'' For Linux use ``linux'' (capitalization matters).
+\item \t{ateof} - In this case the patterns are ignored and the replacement
+text is placed at the end of the patched file. Use the \t{file} flag if you
+want to restrict the files in which this replacement is performed.
+\item \t{atsof} - The patterns are ignored and the replacement text is placed
+at the start of the patched file. Uf the \t{file} flag to restrict the
+application of this patch to a certain file.
+\item \t{disabled} - Use this flag if you want to disable the pattern.
+\end{itemize}
+
+
+ The patterns can consist of several groups of lines separated by the \t{|||}
+marker. Each of these group of lines is a multi-line pattern that if found in
+the file will be replaced with the text given at the end of the block.
+
+ The matching is space-insensitive.
+
+ All of the markers \t{<<<}, \t{|||}, \t{===} and \t{>>>} must appear at the
+beginning of a line but they can be followed by arbitrary text (which is
+ignored).
+
+ The replacement text can contain the special keyword \t{@\_\_pattern\_\_@},
+which is substituted with the pattern that matched.
+
+
+\section{Debugging support}\label{sec-debugger}
+
+ Most of the time we debug our code using the Errormsg module along with the
+pretty printer. But if you want to use the Ocaml debugger here is an easy way
+to do it. Say that you want to debug the invocation of cilly that arises out
+of the following command:
+\begin{verbatim}
+cilly -c hello.c
+\end{verbatim}
+
+ You must follow the installation \ahref{../ccured/setup.html}{instructions}
+to install the Elist support files for ocaml and to extend your .emacs
+appropriately. Then from within Emacs you do
+\begin{verbatim}
+ALT-X my-camldebug
+\end{verbatim}
+
+ This will ask you for the command to use for running the Ocaml debugger
+(initially the default will be ``ocamldebug'' or the last command you
+introduced). You use the following command:
+\begin{verbatim}
+cilly --ocamldebug -c hello.c
+\end{verbatim}
+
+ This will run \t{cilly} as usual and invoke the Ocaml debugger when the cilly
+engine starts. The advantage of this way of invoking the debugger is that the
+directory search paths are set automatically and the right set or arguments is
+passed to the debugger.
+
+
+\section{Who Says C is Simple?}\label{sec-simplec}
+
+ When I (George) started to write CIL I thought it was going to take two weeks.
+Exactly a year has passed since then and I am still fixing bugs in it. This
+gross underestimate was due to the fact that I thought parsing and making
+sense of C is simple. You probably think the same. What I did not expect was
+how many dark corners this language has, especially if you want to parse
+real-world programs such as those written for GCC or if you are more ambitious
+and you want to parse the Linux or Windows NT sources (both of these were
+written without any respect for the standard and with the expectation that
+compilers will be changed to accommodate the program).
+
+ The following examples were actually encountered either in real programs or
+are taken from the ISO C99 standard or from the GCC's testcases. My first
+reaction when I saw these was: {\em Is this C?}. The second one was : {\em
+What the hell does it mean?}.
+
+ If you are contemplating doing program analysis for C on abstract-syntax
+trees then your analysis ought to be able to handle these things. Or, you can
+use CIL and let CIL translate them into clean C code.
+
+%
+% Note: the cilcode environment is bogus. You should preprocess this source
+% with cilcode.pl !!!
+%
+%
+ \subsection{Standard C}
+
+\begin{enumerate}
+
+\item Why does the following code return 0 for most values of \t{x}? (This
+should be easy.)
+
+\begin{cilcode}[local]
+ int x;
+ return x == (1 && x);
+\end{cilcode}
+
+\item Why does the following code return 0 and not -1? (Answer: because
+\t{sizeof} is unsigned, thus the result of the subtraction is unsigned, thus
+the shift is logical.)
+
+\begin{cilcode}[local]
+ return ((1 - sizeof(int)) >> 32);
+\end{cilcode}
+
+\item Scoping rules can be tricky. This function returns 5.
+
+\begin{cilcode}[global]
+int x = 5;
+int f() {
+ int x = 3;
+ {
+ extern int x;
+ return x;
+ }
+}
+\end{cilcode}
+
+\item Functions and function pointers are implicitly converted to each other.
+
+\begin{cilcode}[global]
+int (*pf)(void);
+int f(void) {
+
+ pf = &f; // This looks ok
+ pf = ***f; // Dereference a function?
+ pf(); // Invoke a function pointer?
+ (****pf)(); // Looks strange but Ok
+ (***************f)(); // Also Ok
+}
+\end{cilcode}
+
+\item Initializer with designators are one of the hardest parts about ISO C.
+Neither MSVC or GCC implement them fully. GCC comes close though. What is the
+final value of \t{i.nested.y} and \t{i.nested.z}? (Answer: 2 and respectively
+6).
+
+\begin{cilcode}[global]
+struct {
+ int x;
+ struct {
+ int y, z;
+ } nested;
+} i = { .nested.y = 5, 6, .x = 1, 2 };
+\end{cilcode}
+
+\item This is from c-torture. This function returns 1.
+
+\begin{cilcode}[global]
+typedef struct
+{
+ char *key;
+ char *value;
+} T1;
+
+typedef struct
+{
+ long type;
+ char *value;
+} T3;
+
+T1 a[] =
+{
+ {
+ "",
+ ((char *)&((T3) {1, (char *) 1}))
+ }
+};
+int main() {
+ T3 *pt3 = (T3*)a[0].value;
+ return pt3->value;
+}
+\end{cilcode}
+
+\item Another one with constructed literals. This one is legal according to
+the GCC documentation but somehow GCC chokes on (it works in CIL though). This
+code returns 2.
+
+\begin{cilcode}[local]
+ return ((int []){1,2,3,4})[1];
+\end{cilcode}
+
+\item In the example below there is one copy of ``bar'' and two copies of
+ ``pbar'' (static prototypes at block scope have file scope, while for all
+ other types they have block scope).
+
+\begin{cilcode}[global]
+ int foo() {
+ static bar();
+ static (*pbar)() = bar;
+
+ }
+
+ static bar() {
+ return 1;
+ }
+
+ static (*pbar)() = 0;
+\end{cilcode}
+
+
+\item Two years after heavy use of CIL, by us and others, I discovered a bug
+ in the parser. The return value of the following function depends on what
+ precedence you give to casts and unary minus:
+\begin{cilcode}[global]
+ unsigned long foo() {
+ return (unsigned long) - 1 / 8;
+ }
+\end{cilcode}
+
+ The correct interpretation is \t{((unsigned long) - 1) / 8}, which is a
+ relatively large number, as opposed to \t{(unsigned long) (- 1 / 8)}, which
+ is 0.
+
+\end{enumerate}
+
+ \subsection{GCC ugliness}\label{sec-ugly-gcc}
+
+\begin{enumerate}
+
+\item GCC has generalized lvalues. You can take the address of a lot of
+strange things:
+
+\begin{cilcode}[local]
+ int x, y, z;
+ return &(x ? y : z) - & (x++, x);
+\end{cilcode}
+
+\item GCC lets you omit the second component of a conditional expression.
+
+\begin{cilcode}[local]
+ extern int f();
+ return f() ? : -1; // Returns the result of f unless it is 0
+\end{cilcode}
+
+\item Computed jumps can be tricky. CIL compiles them away in a fairly clean
+way but you are on your own if you try to jump into another function this way.
+
+\begin{cilcode}[global]
+static void *jtab[2]; // A jump table
+static int doit(int x){
+
+ static int jtab_init = 0;
+ if(!jtab_init) { // Initialize the jump table
+ jtab[0] = &&lbl1;
+ jtab[1] = &&lbl2;
+ jtab_init = 1;
+ }
+ goto *jtab[x]; // Jump through the table
+lbl1:
+ return 0;
+lbl2:
+ return 1;
+}
+
+int main(void){
+ if (doit(0) != 0) exit(1);
+ if (doit(1) != 1) exit(1);
+ exit(0);
+}
+\end{cilcode}
+
+
+\item A cute little example that we made up. What is the returned value?
+(Answer: 1);
+\begin{cilcode}[local]
+ return ({goto L; 0;}) && ({L: 5;});
+\end{cilcode}
+
+\item \t{extern inline} is a strange feature of GNU C. Can you guess what the
+following code computes?
+
+\begin{cilcode}[global]
+extern inline foo(void) { return 1; }
+int firstuse(void) { return foo(); }
+
+// A second, incompatible definition of foo
+int foo(void) { return 2; }
+
+int main() {
+ return foo() + firstuse();
+}
+\end{cilcode}
+
+ The answer depends on whether the optimizations are turned on. If they are
+then the answer is 3 (the first definition is inlined at all occurrences until
+the second definition). If the optimizations are off, then the first
+definition is ignore (treated like a prototype) and the answer is 4.
+
+ CIL will misbehave on this example, if the optimizations are turned off (it
+ always returns 3).
+
+\item GCC allows you to cast an object of a type T into a union as long as the
+union has a field of that type:
+\begin{cilcode}[global]
+union u {
+ int i;
+ struct s {
+ int i1, i2;
+ } s;
+};
+
+union u x = (union u)6;
+
+int main() {
+ struct s y = {1, 2};
+ union u z = (union u)y;
+}
+\end{cilcode}
+
+\item GCC allows you to use the \t{\_\_mode\_\_} attribute to specify the size
+of the integer instead of the standard \t{char}, \t{short} and so on:
+\begin{cilcode}[global]
+int __attribute__ ((__mode__ ( __QI__ ))) i8;
+int __attribute__ ((__mode__ ( __HI__ ))) i16;
+int __attribute__ ((__mode__ ( __SI__ ))) i32;
+int __attribute__ ((__mode__ ( __DI__ ))) i64;
+\end{cilcode}
+
+\item The ``alias'' attribute on a function declaration tells the
+ linker to treat this declaration as another name for the specified
+ function. CIL will replace the declaration with a trampoline
+ function pointing to the specified target.
+\begin{cilcode}[global]
+ static int bar(int x, char y) {
+ return x + y;
+ }
+
+ //foo is considered another name for bar.
+ int foo(int x, char y) __attribute__((alias("bar")));
+\end{cilcode}
+
+\end{enumerate}
+
+ \subsection{Microsoft VC ugliness}
+
+ This compiler has few extensions, so there is not much to say here.
+
+\begin{enumerate}
+\item Why does the following code return 0 and not -1? (Answer: because of a
+bug in Microsoft Visual C. It thinks that the shift is unsigned just because
+the second operator is unsigned. CIL reproduces this bug when in MSVC mode.)
+
+\begin{code}
+ return -3 >> (8 * sizeof(int));
+\end{verbatim}\end{code}
+
+\item Unnamed fields in a structure seem really strange at first. It seems
+that Microsoft Visual C introduced this extension, then GCC picked it up (but
+in the process implemented it wrongly: in GCC the field \t{y} overlaps with
+\t{x}!).
+
+\begin{cilcode}[local]
+struct {
+ int x;
+ struct {
+ int y, z;
+ struct {
+ int u, v;
+ };
+ };
+} a;
+return a.x + a.y + a.z + a.u + a.v;
+\end{cilcode}
+
+
+\end{enumerate}
+
+\section{Authors}
+
+ The CIL parser was developed starting from Hugues Casse's \t{frontc}
+front-end for C although all the files from the \t{frontc} distribution have
+been changed very extensively. The intermediate language and the elaboration
+stage are all written from scratch. The main author is
+\ahref{mailto:necula@cs.berkeley.edu}{George Necula}, with significant
+contributions from \ahref{mailto:smcpeak@cs.berkeley.edu}{Scott McPeak},
+\ahref{mailto:weimer@cs.berkeley.edu}{Westley Weimer},
+\ahref{mailto:liblit@cs.wisc.edu}{Ben Liblit},
+\ahreftop{http://www.cs.berkeley.edu/\~{}matth/}{Matt Harren},
+Raymond To and Aman Bhargava.
+
+ This work is based upon work supported in part by the National Science
+Foundation under Grants No. 9875171, 0085949 and 0081588, and gifts from
+Microsoft Research. Any opinions, findings, and conclusions or recommendations
+expressed in this material are those of the author(s) and do not necessarily
+reflect the views of the National Science Foundation or the other sponsors.
+
+\section{License}
+
+Copyright (c) 2001-2007,
+\begin{itemize}
+\item George C. Necula
+\item Scott McPeak
+\item Wes Weimer
+\item Ben Liblit
+\item Matt Harren
+\end{itemize}
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. The names of the contributors may not be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+\section{Bug reports}
+
+ We are certain that there are still some remaining bugs in CIL. If you find
+one please file a bug report in our Source Forge space
+\ahreftop{http://sourceforge.net/projects/cil}
+ {http://sourceforge.net/projects/cil}.
+
+ You can find there the latest announcements, a source distribution,
+bug report submission instructions and a mailing list: cil-users[at
+sign]lists.sourceforge.net. Please use this list to ask questions about CIL,
+as it will ensure your message is viewed by a broad audience.
+
+\section{Changes}\label{sec-changes}\cutname{changes.html}
+\begin{itemize}
+\item {\bf February 14, 2008}: Fixed a bug in temporary file
+creation. Thanks to J. Aaron Pendergrass for the patch.
+\item {\bf November 30, 2007}: Fixed a bbug in assignment to lvalues that
+ depend on themselves.
+\item {\bf April 4, 2007}: Benjamin Monate fixed a bug in
+ \moduleref{Cfg} for empty loop bodies.
+\item {\bf March 29, 2007}: Polyvios Pratikakis fixed a bug in
+ \t{src/ext/pta/uref.ml}.
+\item {\bf March 15, 2007}: Added support for
+ \t{\_\_attribute\_\_((aligned))} and
+ \t{\_\_attribute\_\_((packed))}.
+\item {\bf March 7, 2007}: \t{typeOf(StartOf \_)} now preserves the
+ attributes of the array.
+\item {\bf February 22, 2007}: Added an inliner (ext/inliner.ml)
+\item {\bf February 21, 2007}: We now constant-fold bitfield
+ expressions. Thanks to Virgile Prevosto for the patch.
+\item {\bf February 13, 2007}: gcc preprocessor arguments passed
+ using \t{-Wp} are now used only during initial preproccessing, not
+ for the preprocessing after CIL. This fixes problems in the Linux
+ makefiles with dependency generation.
+\item {\bf February 6, 2007}: Fixed \cilvalref{parseInt} for non-32
+ bit architectures.
+\item {\bf February 5, 2007}: {\bf Released version 1.3.6} (Subversion
+ revision 9211)
+\item {\bf February 2, 2007}: Improved the way CIL gets configured for the
+ actual definitions of \t{size\_t} and \t{wchar\_t}.
+\item {\bf February 1, 2007}: Fixed the parser to support the unused
+ attribute on labels. For now, we just drop this attribute since
+ Rmtmps will remove unused labels anyways. Thanks to Peter Hawkins
+ for the patch.
+\item {\bf January 18, 2007}: Require the destination of a \t{Call} to
+ have the same type as the function's return type, even if it means
+ inserting a temporary. To get the old behavior, set
+ \t{Cabs2cil.doCollapseCallCast} to true as described in
+ \secref{cilly-internal-options}.
+\item {\bf January 17, 2007}: Fix for \t{\_\_builtin\_offsetof} when
+ the field name is also a typedef name.
+\item {\bf January 17, 2007}: Fixed \cilvalref{loadBinaryFile}
+ (Sourceforge bug \#1548894).
+ You should only use loadBinaryFile if no other code has been loaded
+ or generated in the current CIL process, since loadBinaryFile needs
+ to load some global state.
+\item {\bf December 18, 2006}: The \t{-{}-stats} flag now gets the CPU
+ speed at runtime rather than configure-time, so binary executables
+ can be moved to different computers.
+\item {\bf December 14, 2006}: Fixed various warnings and errors on
+ 64-bit architectures.
+\item {\bf November 26, 2006}: Christoph Spiel added ``\t{-{}-no}''
+ options to many of CIL's command-line flags.
+\item {\bf November 21, 2006}: Merged \t{gccBuiltins} and
+ \t{msvcBuiltins} into a single table \cilvalref{builtinFunctions}
+ that is initialized by \cilvalref{initCIL}.
+\item {\bf October 28, 2006}: Added the field \t{vdescr} to the
+ \ciltyperef{varinfo} struct to remember what value is stored in
+ certain CIL-introduced temporary variables. For example, if CIL
+ adds a temporary to store the result of \t{foo(a,b)}, then the
+ description will be ``foo(a,b)''. The new printer
+ \cilvalref{descriptiveCilPrinter} will substitute descriptions for
+ the names of temporaries. The result is not necessarily valid C,
+ but it may let you produce more helpful error messages in your
+ analysis tools: ``The value foo(a,b) may be tainted'' vs. ``The
+ value \_\_cil\_tmp29 may be tainted.''
+\item {\bf October 27, 2006}: Fixed a bug with duplicate entries in
+ the statement list of Switch nodes, and forbade duplicate
+ \t{default} cases.
+%% October 26, 2006: Moved the CIL source repository from CVS
+%% to Subversion. Subversion revision 8603 is the switchover point.
+\item {\bf October 12, 2006}: Added a new function \cilvalref{expToAttrParam}
+that attempts to convert an expression into a attribute parameter.
+\item {\bf October 12, 2006}: Added an attribute with the length of the array,
+ when array types of formal arguments are converted to pointer types.
+\item {\bf September 29, 2006}: Benjamin Monate fixed a bug in compound
+ local initializers that was causing duplicate code to be added.
+\item {\bf August 9, 2006}: Changed the patcher to print ``\t{\#line
+ nnn}'' directives instead of ``\t{\# nnn}''.
+\item {\bf August 6, 2006}: Joseph Koshy patched \t{./configure} for
+ FreeBSD on amd64.
+\item {\bf July 27, 2006}: CIL files now include the prototypes of
+ builtin functions (such as \t{\_\_builtin\_va\_arg}). This
+ preserves the invariant that every function call has a corresponding
+ function or function prototype in the file. However, the prototypes
+ of builtins are not printed in the output files.
+\item {\bf July 23, 2006}: Incorporated some fixes for the constant folding
+ for lvalues, and fixed grammatical errors. Thanks to Christian Stork.
+\item {\bf July 23, 2006}: Changed the way ./configure works. We now generate
+ the file Makefile.features to record the configuration features. This is
+ because autoconf does not work properly with multiline substitutions.
+\item {\bf July 21, 2006}: Cleaned up the printing of some Lvals. Things that
+ were printed as ``(*i)'' before are now printed simply as ``*i'' (no
+ parentheses). However, this means that when you use pLval to print lvalues
+ inside expressions, you must take care about parentheses yourself. Thanks to
+ Benjamin Monate for pointing this out.
+\item {\bf July 21, 2006}: Added new hooks to the Usedef and
+ Dataflow.BackwardsTransfer APIs. Code that uses these will need to
+ be changed slightly. Also, updated the \moduleref{Cfg} code to
+ handle noreturn functions.
+\item {\bf July 17, 2006}: Fix parsing of attributes on bitfields and
+ empty attribute lists. Thanks to Peter Hawkins.
+\item {\bf July 10, 2006}: Fix Makefile problem for FreeBSD. Thanks
+ to Joseph Koshy for the patch.
+\item {\bf June 25, 2006}: Extended the inline assembly to support named
+ arguments, as added in gcc 3.0. This changes the types of the input
+ and output lists from ``\t{(string * lval) list}'' to
+ ``\t{(string option * string * lval) list}''. Some existing code
+ will need to be modified accordingly.
+\item {\bf June 11, 2006}: Removed the function \t{Cil.foldLeftCompoundAll}.
+Use instead \cilvalref{foldLeftCompound} with \t{~implicit:true}.
+\item {\bf June 9, 2006}: Extended the definition of the cilVisitor for
+initializers to pass more information around. This might result in backward
+incompatibilities with code that uses the visitor for initializers.
+\item {\bf June 2, 2006}: Added \t{-{}-commPrintLnSparse} flag.
+\item {\bf June 1, 2006}: Christian Stork provided some fixes for the handling
+ of variable argument functions.
+\item {\bf June 1, 2006}: Added support for x86 performance counters
+ on 64-bit processors. Thanks to tbergen for the patch.
+\item {\bf May 23, 2006}: Benjamin Monate fixed a lexer bug when a
+ preprocessed file is missing a final newline.
+\item {\bf May 23, 2006}: Fix for \t{typeof($e$)} when $e$ has type
+ \t{void}.
+\item {\bf May 20, 2006}: {\bf Released version 1.3.5} (Subversion
+ revision 8093)
+\item {\bf May 19, 2006}: \t{Makefile.cil.in}/\t{Makefile.cil} have
+ been renamed \t{Makefile.in}/\t{Makefile}. And \t{maincil.ml} has
+ been renamed \t{main.ml}.
+\item {\bf May 18, 2006}: Added a new module \moduleref{Cfg} to compute the
+ control-flow graph. Unlike the older \cilvalref{computeCFGInfo},
+ the new version does not modify the code.
+\item {\bf May 18, 2006}: Added several new analyses: reaching
+ definitions, available expressions, liveness analysis, and dead code
+ elimination. See \secref{Extension}.
+\item {\bf May 2, 2006}: Added a flag \t{-{}-noInsertImplicitCasts}.
+ When this flag is used, CIL code will only include casts inserted by
+ the programmer. Implicit coercions are not changed to explicit casts.
+\item {\bf April 16, 2006}: Minor improvements to the \t{-{}-stats}
+ flag (\secref{cilly-asm-options}). We now use Pentium performance
+ counters by default, if your processor supports them.
+\item {\bf April 10, 2006}: Extended \t{machdep.c} to support
+ microcontroller compilers where the struct alignment of integer
+ types does not match the size of the type. Thanks to Nathan
+ Cooprider for the patch.
+\item {\bf April 6, 2006}: Fix for global initializers of unions when
+ the union field being initialized is not the first one, and for
+ missing initializers of unions when the first field is not the
+ largest field.
+\item {\bf April 6, 2006}: Fix for bitfields in the SFI module.
+\item {\bf April 6, 2006}: Various fixes for gcc attributes.
+ \t{packed}, \t{section}, and \t{always\_inline} attributes are now
+ parsed correctly. Also fixed printing of attributes on enum types.
+\item {\bf March 30, 2006}: Fix for \t{rmtemps.ml}, which deletes
+ unused inline functions. When in \t{gcc} mode CIL now leaves all
+ inline functions in place, since \t{gcc} treats these as externally
+ visible.
+\item {\bf March 3, 2006}: Assume inline assembly instructions can
+ fall through for the purposes of adding return statements. Thanks to
+ Nathan Cooprider for the patch.
+\item {\bf February 27, 2006}: Fix for extern inline functions when
+ the output of CIL is fed back into CIL.
+\item {\bf January 30, 2006}: Fix parsing of \t{switch} without braces.
+\item {\bf January 30, 2006}: Allow `\$' to appear in identifiers.
+\item {\bf January 13, 2006}: Added support for gcc's alias attribute
+ on functions. See \secref{ugly-gcc}, item 8.
+\item {\bf December 9, 2005}: Christoph Spiel fixed the Golf and
+ Olf modules so that Golf can be used with the points-to analysis.
+ He also added performance fixes and cleaned up the documentation.
+\item {\bf December 1, 2005}: Major rewrite of the ext/callgraph module.
+\item {\bf December 1, 2005}: Preserve enumeration constants in CIL. Default
+is the old behavior to replace them with integers.
+\item {\bf November 30, 2005}: Added support for many GCC \t{\_\_builtin}
+ functions.
+\item {\bf November 30, 2005}: Added the EXTRAFEATURES configure
+ option, making it easier to add Features to the build process.
+\item {\bf November 23, 2005}: In MSVC mode do not remove any locals whose name
+ appears as a substring in an inline assembly.
+\item {\bf November 23, 2005}: Do not add a return to functions that have the
+ noreturn attribute.
+\item {\bf November 22, 2005}: {\bf Released version 1.3.4}
+\item {\bf November 21, 2005}: Performance and correctness fixes for
+ the Points-to Analysis module. Thanks to Christoph Spiel for the
+ patches.
+\item {\bf October 5, 2005}: CIL now builds on SPARC/Solaris. Thanks
+ to Nick Petroni and Remco van Engelen for the patches.
+\item {\bf September 26, 2005}: CIL no longer uses the `\t{-I-}' flag
+ by default when preprocessing with gcc.
+\item {\bf August 24, 2005}: Added a command-line option
+ ``-{}-forceRLArgEval'' that forces function arguments to be evaluated
+ right-to-left. This is the default behavior in unoptimized gcc and
+ MSVC, but the order of evaluation is undefined when using
+ optimizations, unless you apply this CIL transformation. This flag
+ does not affect the order of evaluation of e.g. binary operators,
+ which remains undefined. Thanks to Nathan Cooprider for the patch.
+\item {\bf August 9, 2005}: Fixed merging when there are more than 20
+ input files.
+\item {\bf August 3, 2005}: When merging, it is now an error to
+ declare the same global variable twice with different initializers.
+\item {\bf July 27, 2005}: Fixed bug in transparent unions.
+\item {\bf July 27, 2005}: Fixed bug in collectInitializer. Thanks to
+ Benjamin Monate for the patch.
+\item {\bf July 26, 2005}: Better support for extended inline assembly
+ in gcc.
+\item {\bf July 26, 2005}: Added many more gcc \_\_builtin* functions
+ to CIL. Most are treated as Call instructions, but a few are
+ translated into expressions so that they can be used in global
+ initializers. For example, ``\t{\_\_builtin\_offsetof(t, field)}'' is
+ rewritten as ``\t{\&((t*)0)->field}'', the traditional way of calculating
+ an offset.
+\item {\bf July 18, 2005}: Fixed bug in the constant folding of shifts
+ when the second argument was negative or too large.
+\item {\bf July 18, 2005}: Fixed bug where casts were not always
+ inserted in function calls.
+\item {\bf June 10, 2005}: Fixed bug in the code that makes implicit
+ returns explicit. We weren't handling switch blocks correctly.
+\item {\bf June 1, 2005}: {\bf Released version 1.3.3}
+\item {\bf May 31, 2005}: Fixed handling of noreturn attribute for function
+ pointers.
+\item {\bf May 30, 2005}: Fixed bugs in the handling of constructors in gcc.
+\item {\bf May 30, 2005}: Fixed bugs in the generation of global variable IDs.
+\item {\bf May 27, 2005}: Reimplemented the translation of function calls so
+ that we can intercept some builtins. This is important for the uses of
+ \_\_builtin\_constant\_p in constants.
+\item {\bf May 27, 2005}: Export the plainCilPrinter, for debugging.
+\item {\bf May 27, 2005}: Fixed bug with printing of const attribute for
+ arrays.
+\item {\bf May 27, 2005}: Fixed bug in generation of type signatures. Now they
+ should not contain expressions anymore, so you can use structural equality.
+ This used to lead to Out\_of\_Memory exceptions.
+\item {\bf May 27, 2005}: Fixed bug in type comparisons using
+ TBuiltin\_va\_list.
+\item {\bf May 27, 2005}: Improved the constant folding in array lengths and
+ case expressions.
+\item {\bf May 27, 2005}: Added the \t{\_\_builtin\_frame\_address} to the set
+ of gcc builtins.
+\item {\bf May 27, 2005}: Added the CIL project to SourceForge.
+\item {\bf April 23, 2005}: The cattr field was not visited.
+\item {\bf March 6, 2005}: Debian packaging support
+\item {\bf February 16, 2005}: Merger fixes.
+\item {\bf February 11, 2005}: Fixed a bug in \t{-{}-dopartial}. Thanks to
+Nathan Cooprider for this fix.
+\item {\bf January 31, 2005}: Make sure the input file is closed even if a
+ parsing error is encountered.
+\item {\bf January 11, 2005}: {\bf Released version 1.3.2}
+\item {\bf January 11, 2005}: Fixed printing of integer constants whose
+ integer kind is shorter than an int.
+\item {\bf January 11, 2005}: Added checks for negative size arrays and arrays
+ too big.
+\item {\bf January 10, 2005}: Added support for GCC attribute ``volatile'' for
+ tunctions (as a synonim for noreturn).
+\item {\bf January 10, 2005}: Improved the comparison of array sizes when
+ comparing array types.
+\item {\bf January 10, 2005}: Fixed handling of shell metacharacters in the
+ cilly command lione.
+\item {\bf January 10, 2005}: Fixed dropping of cast in initialization of
+ local variable with the result of a function call.
+\item {\bf January 10, 2005}: Fixed some structural comparisons that were
+ broken in the Ocaml 3.08.
+\item {\bf January 10, 2005}: Fixed the \t{unrollType} function to not forget
+ attributes.
+\item {\bf January 10, 2005}: Better keeping track of locations of function
+ prototypes and definitions.
+\item {\bf January 10, 2005}: Fixed bug with the expansion of enumeration
+ constants in attributes.
+\item {\bf October 18, 2004}: Fixed a bug in cabsvisit.ml. CIl would wrap a
+ BLOCK around a single atom unnecessarily.
+\item {\bf August 7, 2004}: {\bf Released version 1.3.1}
+\item {\bf August 4, 2004}: Fixed a bug in splitting of structs using
+ \t{-{}-dosimplify}
+\item {\bf July 29, 2004}: Minor changes to the type typeSig (type signatures)
+ to ensure that they do not contain types, so that you can do structural
+ comparison without danger of nontermination.
+\item {\bf July 28, 2004}: Ocaml version 3.08 is required. Numerous small
+ changes while porting to Ocaml 3.08.
+\item {\bf July 7, 2004}: {\bf Released version 1.2.6}
+\item {\bf July 2, 2004}: Character constants such as \t{'c'} should
+ have type \t{int}, not \t{char}. Added a utility function
+ \t{Cil.charConstToInt} that sign-extends chars greater than 128, if needed.
+\item {\bf July 2, 2004}: Fixed a bug that was casting values to int
+ before applying the logical negation operator !. This caused
+ problems for floats, and for integer types bigger than \t{int}.
+\item {\bf June 13, 2004}: Added the field \t{sallstmts} to a function
+ description, to hold all statements in the function.
+\item {\bf June 13, 2004}: Added new extensions for data flow analyses, and
+ for computing dominators.
+\item {\bf June 10, 2004}: Force initialization of CIL at the start of
+Cabs2cil.
+\item {\bf June 9, 2004}: Added support for GCC \t{\_\_attribute\_used\_\_}
+\item {\bf April 7, 2004}: {\bf Released version 1.2.5}
+\item {\bf April 7, 2004}: Allow now to run ./configure CC=cl and set the MSVC
+compiler to be the default. The MSVC driver will now select the default name
+of the .exe file like the CL compiler.
+\item {\bf April 7, 2004}: Fixed a bug in the driver. The temporary files are
+deleted by the Perl script before the CL compiler gets to them?
+\item {\bf April 7, 2004}: Added the - form of arguments to the MSVC driver.
+\item {\bf April 7, 2004}: Added a few more GCC-specific string escapes, (, [,
+\{, \%, E.
+\item {\bf April 7, 2004}: Fixed bug with continuation lines in MSVC.
+\item {\bf April 6, 2004}: Fixed embarassing bug in the parser: the precedence
+ of casts and unary operators was switched.
+\item {\bf April 5, 2004}: Fixed a bug involving statements mixed between
+declarations containing initializers. Now we make sure that the initializers
+are run in the proper order with respect to the statements.
+\item {\bf April 5, 2004}: Fixed a bug in the merger. The merger was keeping
+separate alpha renaming talbes (namespaces) for variables and types. This
+means that it might end up with a type and a variable named the same way, if
+they come from different files, which breaks an important CIL invariant.
+\item {\bf March 11, 2004} : Fixed a bug in the Cil.copyFunction function. The
+new local variables were not getting fresh IDs.
+\item {\bf March 5, 2004}: Fixed a bug in the handling of static function
+ prototypes in a block scope. They used to be renamed. Now we just consider
+ them global.
+\item {\bf February 20, 2004}: {\bf Released version 1.2.4}
+\item {\bf February 15, 2004}: Changed the parser to allow extra semicolons
+ after field declarations.
+\item {\bf February 14, 2004}: Changed the Errormsg functions: error, unimp,
+bug to not raise an exception. Instead they just set Errormsg.hadErrors.
+\item {\bf February 13, 2004}: Change the parsing of attributes to recognize
+ enumeration constants.
+\item {\bf February 10, 2004}: In some versions of \t{gcc} the identifier
+ {\_\{thread} is an identifier and in others it is a keyword. Added code
+ during configuration to detect which is the case.
+\item {\bf January 7, 2004}: {\bf Released version 1.2.3}
+\item {\bf January 7, 2004}: Changed the alpha renamer to be less
+conservative. It will remember all versions of a name that were seen and will
+only create a new name if we have not seen one.
+\item {\bf December 30, 2003} : Extended the \t{cilly} command to understand
+ better linker command options \t{-lfoo}.
+\item {\bf December 5, 2003}: Added markup commands to the pretty-printer
+module. Also, changed the ``@<'' left-flush command into ``@\^''.
+\item {\bf December 4, 2003}: Wide string literals are now handled
+directly by Cil (rather than being exploded into arrays). This is
+apparently handy for Microsoft Device Driver APIs that use intrinsic
+functions that require literal constant wide-string arguments.
+\item {\bf December 3, 2003}: Added support for structured exception handling
+ extensions for the Microsoft compilers.
+\item {\bf December 1, 2003}: Fixed a Makefile bug in the generation of the
+Cil library (e.g., \t{cil.cma}) that was causing it to be unusable. Thanks
+to KEvin Millikin for pointing out this bug.
+\item {\bf November 26, 2003}: Added support for linkage specifications
+ (extern ``C'').
+\item {\bf November 26, 2003}: Added the ocamlutil directory to contain some
+utilities shared with other projects.
+\item {\bf November 25, 2003}: {\bf Released version 1.2.2}
+\item {\bf November 24, 2003}: Fixed a bug that allowed a static local to
+ conflict with a global with the same name that is declared later in the
+ file.
+\item {\bf November 24, 2003}: Removed the \t{-{}-keep} option of the \t{cilly}
+ driver and replaced it with \t{-{}-save-temps}.
+\item {\bf November 24, 2003}: Added printing of what CIL features are being
+ run.
+\item {\bf November 24, 2003}: Fixed a bug that resulted in attributes being
+ dropped for integer types.
+\item {\bf November 11, 2003}: Fixed a bug in the visitor for enumeration
+ definitions.
+\item {\bf October 24, 2003}: Fixed a problem in the configuration script. It
+ was not recognizing the Ocaml version number for beta versions.
+\item {\bf October 15, 2003}: Fixed a problem in version 1.2.1 that was
+ preventing compilation on OCaml 3.04.
+\item {\bf September 17, 2003: Released version 1.2.1.}
+\item {\bf September 7, 2003}: Redesigned the interface for choosing
+ \texttt{\#line} directive printing styles. Cil.printLn and
+ Cil.printLnComment have been merged into Cil.lineDirectiveStyle.
+\item {\bf August 8, 2003}: Do not silently pad out functions calls with
+arguments to match the prototype.
+\item {\bf August 1, 2003}: A variety of fixes suggested by Steve Chamberlain:
+initializers for externs, prohibit float literals in enum, initializers for
+unsized arrays were not working always, an overflow problem in Ocaml, changed
+the processing of attributes before struct specifiers
+
+\item {\bf July 14, 2003}: Add basic support for GCC's "\_\_thread" storage
+qualifier. If given, it will appear as a "thread" attribute at the top of the
+type of the declared object. Treatment is very similar to "\_\_declspec(...)"
+in MSVC
+
+\item {\bf July 8, 2003}: Fixed some of the \_\_alignof computations. Fixed
+ bug in the designated initializers for arrays (Array.get error).
+\item {\bf July 8, 2003}: Fixed infinite loop bug (Stack Overflow) in the
+ visitor for \_\_alignof.
+\item {\bf July 8, 2003}: Fixed bug in the conversion to CIL. A function or
+ array argument of
+ the GCC \_\_typeof() was being converted to pointer type. Instead, it should
+ be left alone, just like for sizeof.
+\item {\bf July 7, 2003}: New Escape module provides utility functions
+ for escaping characters and strings in accordance with C lexical
+ rules.
+
+\item {\bf July 2, 2003}: Relax CIL's rules for when two enumeration types are
+considered compatible. Previously CIL considered two enums to be compatible if
+they were the same enum. Now we follow the C99 standard.
+
+
+\item {\bf June 28, 2003}: In the Formatparse module, Eric Haugh found and
+ fixed a bug in the handling of lvalues of the form ``lv->field.more''.
+
+\item {\bf June 28, 2003}: Extended the handling of gcc command lines
+arguments in the Perl scripts.
+
+\item {\bf June 23, 2003}: In Rmtmps module, simplified the API for
+ customizing the root set. Clients may supply a predicate that
+ returns true for each root global. Modifying various
+ ``\texttt{referenced}'' fields directly is no longer supported.
+
+\item {\bf June 17, 2003}: Reimplement internal utility routine
+ \t{Cil.escape\_char}. Faster and better.
+
+\item {\bf June 14, 2003}: Implemented support for \t{\_\_attribute\_\_s}
+appearing between "struct" and the struct tag name (also for unions and
+enums), since gcc supports this as documented in section 4.30 of the gcc
+(2.95.3) manual
+
+\item {\bf May 30, 2003}: Released the regression tests.
+\item {\bf May 28, 2003}: {\bf Released version 1.1.2}
+\item {\bf May 26, 2003}: Add the \t{simplify} module that compiles CIL
+expressions into simpler expressions, similar to those that appear in a
+3-address intermediate language.
+\item {\bf May 26, 2003}: Various fixes and improvements to the pointer
+analysis modules.
+\item {\bf May 26, 2003}: Added optional consistency checking for
+transformations.
+\item {\bf May 25, 2003}: Added configuration support for big endian machines.
+Now \cilvalref{little\_endian} can be used to test whether the machine is
+little endian or not.
+\item {\bf May 22, 2003}: Fixed a bug in the handling of inline functions. The
+CIL merger used to turn these functions into ``static'', which is incorrect.
+\item {\bf May 22, 2003}: Expanded the CIL consistency checker to verify
+undesired sharing relationships between data structures.
+\item {\bf May 22, 2003}: Fixed bug in the \t{oneret} CIL module: it was
+mishandling certain labeled return statements.
+\item {\bf May 5, 2003}: {\bf Released version 1.0.11}
+\item {\bf May 5, 2003}: OS X (powerpc/darwin) support for CIL. Special
+thanks to Jeff Foster, Andy Begel and Tim Leek.
+\item {\bf April 30, 2003}: Better description of how to use CIL for your
+analysis.
+\item {\bf April 28, 2003}: Fixed a bug with \texttt{-{}-dooneRet} and
+\texttt{-{}-doheapify}. Thanks, Manos Renieris.
+\item {\bf April 16, 2003}: Reworked management of
+ temporary/intermediate output files in Perl driver scripts. Default
+ behavior is now to remove all such files. To keep intermediate
+ files, use one of the following existing flags:
+ \begin{itemize}
+ \item \texttt{-{}-keepmerged} for the single-file merge of all sources
+ \item \texttt{-{}-keep=<\textit{dir}>} for various other CIL and
+ CCured output files
+ \item \texttt{-{}-save-temps} for various gcc intermediate files; MSVC
+ has no equivalent option
+ \end{itemize}
+ As part of this change, some intermediate files have changed their
+ names slightly so that new suffixes are always preceded by a
+ period. For example, CCured output that used to appear in
+ ``\texttt{foocured.c}'' now appears in ``\texttt{foo.cured.c}''.
+\item {\bf April 7, 2003}: Changed the representation of the \cilvalref{GVar}
+global constructor. Now it is possible to update the initializer without
+reconstructing the global (which in turn it would require reconstructing the
+list of globals that make up a program). We did this because it is often
+tempting to use \cilvalref{visitCilFileSameGlobals} and the \cilvalref{GVar}
+was the only global that could not be updated in place.
+\item {\bf April 6, 2003}: Reimplemented parts of the cilly.pl script to make
+it more robust in the presence of complex compiler arguments.
+\item {\bf March 10, 2003}: {\bf Released version 1.0.9}
+\item {\bf March 10, 2003}: Unified and documented a large number of CIL
+Library Modules: oneret, simplemem, makecfg, heapify, stackguard, partial.
+Also documented the main client interface for the pointer analysis.
+\item {\bf February 18, 2003}: Fixed a bug in logwrites that was causing it
+to produce invalid C code on writes to bitfields. Thanks, David Park.
+\item {\bf February 15, 2003}: {\bf Released version 1.0.8}
+\item {\bf February 15, 2003}: PDF versions of the manual and API are
+available for those who would like to print them out.
+\item {\bf February 14, 2003}: CIL now comes bundled with alias analyses.
+\item {\bf February 11, 2003}: Added support for adding/removing options from
+ \t{./configure}.
+\item {\bf February 3, 2003}: {\bf Released version 1.0.7}
+\item {\bf February 1, 2003}: Some bug fixes in the handling of variable
+argument functions in new versions of \t{gcc} And \t{glibc}.
+\item {\bf January 29, 2003}: Added the logical AND and OR operators.
+Exapanded the translation to CIL to handle more complicated initializers
+(including those that contain logical operators).
+\item {\bf January 28, 2003}: {\bf Released version 1.0.6}
+\item {\bf January 28, 2003}: Added support for the new handling of
+variable-argument functions in new versions of \t{glibc}.
+\item {\bf January 19, 2003}: Added support for declarations in interpreted
+ constructors. Relaxed the semantics of the patterns for variables.
+\item {\bf January 17, 2003}: Added built-in prototypes for the gcc built-in
+ functions. Changed the \t{pGlobal} method in the printers to print the
+ carriage return as well.
+\item {\bf January 9, 2003}: Reworked lexer and parser's strategy for
+ tracking source file names and line numbers to more closely match
+ typical native compiler behavior. The visible CIL interface is
+ unchanged.
+\item {\bf January 9, 2003}: Changed the interface to the alpha convertor. Now
+you can pass a list where it will record undo information that you can use to
+revert the changes that it makes to the scope tables.
+\item {\bf January 6, 2003}: {\bf Released version 1.0.5}
+\item {\bf January 4, 2003}: Changed the interface for the Formatcil module.
+ Now the placeholders in the pattern have names. Also expanded the
+ documentation of the Formatcil module.
+ Now the placeholders in the pattern have names.
+\item {\bf January 3, 2003}: Extended the \t{rmtmps} module to also remove
+ unused labels that are generated in the conversion to CIL. This reduces the
+ number of warnings that you get from \t{cgcc} afterwards.
+\item {\bf December 17, 2002}: Fixed a few bugs in CIL related to the
+ representation of string literals. The standard says that a string literal
+ is an array. In CIL, a string literal has type pointer to character. This is
+ Ok, except as an argument of sizeof. To support this exception, we have
+ added to CIL the expression constructor SizeOfStr. This allowed us to fix
+ bugs with computing \t{sizeof("foo bar")} and \t{sizeof((char*)"foo bar")}
+ (the former is 8 and the latter is 4).
+
+\item {\bf December 8, 2002}: Fixed a few bugs in the lexer and parser
+ relating to hex and octal escapes in string literals. Also fixed
+ the dependencies between the lexer and parser.
+\item {\bf December 5, 2002}: Fixed visitor bugs that were causing
+ some attributes not to be visited and some queued instructions to be
+ dropped.
+\item {\bf December 3, 2002}: Added a transformation to catch stack
+ overflows. Fixed the heapify transformation.
+\item {\bf October 14, 2002}: CIL is now available under the BSD license
+(see the License section or the file LICENSE). {\bf Released version 1.0.4}
+\item {\bf October 9, 2002}: More FreeBSD configuration changes, support
+for the GCC-ims {\tt \_\_signed} and {\tt \_\_volatile}. Thanks to Axel
+Simon for pointing out these problems. {\bf Released version 1.0.3}
+\item {\bf October 8, 2002}: FreeBSD configuration and porting fixes.
+Thanks to Axel Simon for pointing out these problems.
+\item {\bf September 10, 2002}: Fixed bug in conversion to CIL. Now we drop
+all ``const'' qualifiers from the types of locals, even from the fields of
+local structures or elements of arrays.
+\item {\bf September 7, 2002}: Extended visitor interface to distinguish visitng
+ offsets inside lvalues from offsets inside initializer lists.
+\item {\bf September 7, 2002}: {\bf Released version 1.0.1}
+\item {\bf September 6, 2002}: Extended the patcher with the \t{ateof} flag.
+\item {\bf September 4, 2002}: Fixed bug in the elaboration to CIL. In some
+cases constant folding of \t{||} and \t{\&\&} was computed wrong.
+\item {\bf September 3, 2002}: Fixed the merger documentation.
+\item {\bf August 29, 2002}: {\bf Released version 1.0.0.}
+\item {\bf August 29, 2002}: Started numbering versions with a major nubmer,
+minor and revisions. Released version 1.0.0.
+\item {\bf August 25, 2002}: Fixed the implementation of the unique
+identifiers for global variables and composites. Now those identifiers are
+globally unique.
+\item {\bf August 24, 2002}: Added to the machine-dependent configuration the
+\t{sizeof{void}}. It is 1 on gcc and 0 on MSVC. Extended the implementation of
+\t{Cil.bitsSizeOf} to handle this (it was previously returning an error when
+trying to compute the size of \t{void}).
+\item {\bf August 24, 2002}: Changed the representation of structure and
+unions to distinguish between undefined structures and those that are defined
+to be empty (allowed on gcc). The sizeof operator is undefined for the former
+and returns 0 for the latter.
+\item {\bf August 22, 2002}: Apply a patch from Richard H. Y. to support
+FreeBSD installations. Thanks, Richard!
+\item {\bf August 12, 2002}: Fixed a bug in the translation of wide-character
+strings. Now this translation matches that of the underlying compiler. Changed
+the implementation of the compiler dependencies.
+\item {\bf May 25, 2002}: Added interpreted constructors and destructors.
+\item {\bf May 17, 2002}: Changed the representation of functions to move the
+``inline'' information to the varinfo. This way we can print the ``inline''
+even in declarations which is what gcc does.
+\item {\bf May 15, 2002}: Changed the visitor for initializers to make two
+tail-recursive passes (the second is a \t{List.rev} and only done if one of
+the initializers change). This prevents \t{Stack\_Overflow} for large
+initializers. Also improved the processing of initializers when converting to
+CIL.
+\item {\bf May 15, 2002}: Changed the front-end to allow the use of \t{MSVC}
+mode even on machines that do not have MSVC. The machine-dependent parameters
+for GCC will be used in that case.
+\item {\bf May 11, 2002}: Changed the representation of formals in function
+types. Now the function type is purely functional.
+\item {\bf May 4, 2002}: Added the function
+\cilvalref{visitCilFileSameGlobals} and changed \cilvalref{visitCilFile} to be
+tail recursive. This prevents stack overflow on huge files.
+\item {\bf February 28, 2002}: Changed the significance of the
+\t{CompoundInit} in \ciltyperef{init} to allow for missing initializers at the
+end of an array initializer. Added the API function
+\cilvalref{foldLeftCompoundAll}.
+\end{itemize}
+
+\end{document}
+
+
+
+% LocalWords: CIL intraprocedural datatype CIL's html Dataflow ocamldoc cilly
+% LocalWords: Dominators tbergen bitfield
diff --git a/cil/doc/cilcode.pl b/cil/doc/cilcode.pl
new file mode 100644
index 0000000..51bec58
--- /dev/null
+++ b/cil/doc/cilcode.pl
@@ -0,0 +1,102 @@
+#
+# Preprocesses a text and it changes
+# \begin{cilcode}
+# ...
+# \end{cilcode}
+#
+# into the verbatim environment and add the option to see the CIL output for
+# it.
+
+use strict;
+use Data::Dumper;
+
+my $testnr = 1;
+my $tmpdir = "cilcode.tmp";
+my $htmloutdir = "examples";
+my $outdir = "html/cil/$htmloutdir";
+
+my $cilly = "perl ../bin/cilly --verbose";
+
+my $doexamples = ! defined($ENV{'NO_EXAMPLES'});
+
+my $preambleLocal = <) {
+ $lineno ++;
+ if(! $incode && $_ =~ m|^\\begin{cilcode}\[(.*)\](.*)$|) {
+ $opt = $1;
+ $cil_options = $2;
+ $incode = 1;
+ print STDERR "\n***Found CIL code at line $lineno\n";
+ open(TSTSRC, ">$tmpdir/ex$testnr.c")
+ || die "Cannot create source $testnr";
+ if($opt eq 'local') {
+ print TSTSRC $preambleLocal;
+ } else {
+ print TSTSRC $preambleGlobal;
+ }
+ print "\\begin{code}\n";
+ next;
+ }
+ if($incode && $_ =~ m|^\\end{cilcode}$|) {
+ $incode = 0;
+ if($opt eq 'local') {
+ print TSTSRC $postambleLocal;
+ } else {
+ print TSTSRC $postambleGlobal;
+ }
+ close(TSTSRC);
+ print "\\end{verbatim}\\end{code}\n";
+ if($doexamples) {
+ print "See the \\ahref{$htmloutdir/ex$testnr.txt}{CIL output} for this
+code fragment\n";
+ # Now run cilly
+ my $cmd = "$cilly $cil_options -c $tmpdir/ex$testnr.c -o $tmpdir/ex$testnr.o --save-temps=$tmpdir";
+ # print "$cmd\n";
+ if(system($cmd)) {
+ die "Error running CIL for $tmpdir/ex$testnr.c";
+ }
+ # Now repackage the CIL file
+ my $cilfile = "$tmpdir/ex$testnr.cil.c";
+ open(CIL, "<$cilfile") || die "Cannot find CIL file \"$cilfile\" for $testnr";
+ my $exfile = "$outdir/ex$testnr.txt";
+ open(OUT, ">$exfile") || die "Cannot write OUT file \"$exfile\" for $testnr";
+ while() {
+ print OUT $_;
+ }
+ close(OUT);
+ close(CIL);
+ } else {
+ print "(Code generation was turned off for this document)";
+ }
+ $testnr ++;
+ next;
+ }
+ if($incode) {
+ print TSTSRC $_;
+ }
+ print $_;
+}
+
diff --git a/cil/doc/comment.sty b/cil/doc/comment.sty
new file mode 100644
index 0000000..658686f
--- /dev/null
+++ b/cil/doc/comment.sty
@@ -0,0 +1,278 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Comment.sty version 3.6, October 1999
+%
+% Purpose:
+% selectively in/exclude pieces of text: the user can define new
+% comment versions, and each is controlled separately.
+% Special comments can be defined where the user specifies the
+% action that is to be taken with each comment line.
+%
+% Author
+% Victor Eijkhout
+% Department of Computer Science
+% University of Tennessee
+% 107 Ayres Hall
+% Knoxville TN 37996
+% USA
+%
+% victor@eijkhout.net
+%
+% This program is free software; you can redistribute it and/or
+% modify it under the terms of the GNU General Public License
+% as published by the Free Software Foundation; either version 2
+% of the License, or (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% For a copy of the GNU General Public License, write to the
+% Free Software Foundation, Inc.,
+% 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA,
+% or find it on the net, for instance at
+% http://www.gnu.org/copyleft/gpl.html
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This style can be used with plain TeX or LaTeX, and probably
+% most other packages too.
+%
+% Usage: all text included between
+% \comment ... \endcomment
+% or \begin{comment} ... \end{comment}
+% is discarded.
+%
+% The opening and closing commands should appear on a line
+% of their own. No starting spaces, nothing after it.
+% This environment should work with arbitrary amounts
+% of comment, and the comment can be arbitrary text.
+%
+% Other `comment' environments are defined by
+% and are selected/deselected with
+% \includecomment{versiona}
+% \excludecoment{versionb}
+%
+% These environments are used as
+% \versiona ... \endversiona
+% or \begin{versiona} ... \end{versiona}
+% with the opening and closing commands again on a line of
+% their own.
+%
+% LaTeX users note: for an included comment, the
+% \begin and \end lines act as if they don't exist.
+% In particular, they don't imply grouping, so assignments
+% &c are not local.
+%
+% Special comments are defined as
+% \specialcomment{name}{before commands}{after commands}
+% where the second and third arguments are executed before
+% and after each comment block. You can use this for global
+% formatting commands.
+% To keep definitions &c local, you can include \begingroup
+% in the `before commands' and \endgroup in the `after commands'.
+% ex:
+% \specialcomment{smalltt}
+% {\begingroup\ttfamily\footnotesize}{\endgroup}
+% You do *not* have to do an additional
+% \includecomment{smalltt}
+% To remove 'smalltt' blocks, give \excludecomment{smalltt}
+% after the definition.
+%
+% Processing comments can apply processing to each line.
+% \processcomment{name}{each-line commands}%
+% {before commands}{after commands}
+% By defining a control sequence
+% \def\Thiscomment##1{...} in the before commands the user can
+% specify what is to be done with each comment line.
+% BUG this does not work quite yet BUG
+%
+% Trick for short in/exclude macros (such as \maybe{this snippet}):
+%\includecomment{cond}
+%\newcommand{\maybe}[1]{}
+%\begin{cond}
+%\renewcommand{\maybe}[1]{#1}
+%\end{cond}
+%
+% Basic approach of the implementation:
+% to comment something out, scoop up every line in verbatim mode
+% as macro argument, then throw it away.
+% For inclusions, in LaTeX the block is written out to
+% a file \CommentCutFile (default "comment.cut"), which is
+% then included.
+% In plain TeX (and other formats) both the opening and
+% closing comands are defined as noop.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Changes in version 3.1
+% - updated author's address
+% - cleaned up some code
+% - trailing contents on \begin{env} line is always discarded
+% even if you've done \includecomment{env}
+% - comments no longer define grouping!! you can even
+% \includecomment{env}
+% \begin{env}
+% \begin{itemize}
+% \end{env}
+% Isn't that something ...
+% - included comments are written to file and input again.
+% Changes in 3.2
+% - \specialcomment brought up to date (thanks to Ivo Welch).
+% Changes in 3.3
+% - updated author's address again
+% - parametrised \CommentCutFile
+% Changes in 3.4
+% - added GNU public license
+% - added \processcomment, because Ivo's fix (above) brought an
+% inconsistency to light.
+% Changes in 3.5
+% - corrected typo in header.
+% - changed author email
+% - corrected \specialcomment yet again.
+% - fixed excludecomment of an earlier defined environment.
+% Changes in 3.6
+% - The 'cut' file is now written more verbatim, using \meaning;
+% some people reported having trouble with ISO latin 1, or umlaute.sty.
+% - removed some \newif statements.
+% Has this suddenly become \outer again?
+%
+% Known bugs:
+% - excludecomment leads to one superfluous space
+% - processcomment leads to a superfluous line break
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\makeinnocent#1{\catcode`#1=12 }
+\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
+\def\latexname{lplain}\def\latexename{LaTeX2e}
+\newwrite\CommentStream
+\def\CommentCutFile{comment.cut}
+
+\def\ProcessComment#1% start it all of
+ {\begingroup
+ \def\CurrentComment{#1}%
+ \let\do\makeinnocent \dospecials
+ \makeinnocent\^^L% and whatever other special cases
+ \endlinechar`\^^M \catcode`\^^M=12 \xComment}
+%\def\ProcessCommentWithArg#1#2% to be used in \leveledcomment
+% {\begingroup
+% \def\CurrentComment{#1}%
+% \let\do\makeinnocent \dospecials
+% \makeinnocent\^^L% and whatever other special cases
+% \endlinechar`\^^M \catcode`\^^M=12 \xComment}
+{\catcode`\^^M=12 \endlinechar=-1 %
+ \gdef\xComment#1^^M{%
+ \expandafter\ProcessCommentLine}
+ \gdef\ProcessCommentLine#1^^M{\def\test{#1}
+ \csarg\ifx{End\CurrentComment Test}\test
+ \edef\next{\noexpand\EndOfComment{\CurrentComment}}%
+ \else \ThisComment{#1}\let\next\ProcessCommentLine
+ \fi \next}
+}
+
+\def\CSstringmeaning#1{\expandafter\CSgobblearrow\meaning#1}
+\def\CSstringcsnoescape#1{\expandafter\CSgobbleescape\string#1}
+{\escapechar-1
+\expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\CSgobblearrow
+ \expandafter\string\csname macro:->\endcsname{}
+}
+\def\CSgobbleescape#1{\ifnum`\\=`#1 \else #1\fi}
+\def\WriteCommentLine#1{\def\CStmp{#1}%
+ \immediate\write\CommentStream{\CSstringmeaning\CStmp}}
+
+% 3.1 change: in LaTeX and LaTeX2e prevent grouping
+\if 0%
+\ifx\fmtname\latexename
+ 0%
+\else \ifx\fmtname\latexname
+ 0%
+ \else
+ 1%
+\fi \fi
+%%%%
+%%%% definitions for LaTeX
+%%%%
+\def\AfterIncludedComment
+ {\immediate\closeout\CommentStream
+ \input{\CommentCutFile}\relax
+ }%
+\def\TossComment{\immediate\closeout\CommentStream}
+\def\BeforeIncludedComment
+ {\immediate\openout\CommentStream=\CommentCutFile
+ \let\ThisComment\WriteCommentLine}
+\def\includecomment
+ #1{\message{Include comment '#1'}%
+ \csarg\let{After#1Comment}\AfterIncludedComment
+ \csarg\def{#1}{\BeforeIncludedComment
+ \ProcessComment{#1}}%
+ \CommentEndDef{#1}}
+\long\def\specialcomment
+ #1#2#3{\message{Special comment '#1'}%
+ % note: \AfterIncludedComment does \input, so #2 goes here!
+ \csarg\def{After#1Comment}{#2\AfterIncludedComment#3}%
+ \csarg\def{#1}{\BeforeIncludedComment\relax
+ \ProcessComment{#1}}%
+ \CommentEndDef{#1}}
+\long\def\processcomment
+ #1#2#3#4{\message{Lines-Processing comment '#1'}%
+ \csarg\def{After#1Comment}{#3\AfterIncludedComment#4}%
+ \csarg\def{#1}{\BeforeIncludedComment#2\relax
+ \ProcessComment{#1}}%
+ \CommentEndDef{#1}}
+\def\leveledcomment
+ #1#2{\message{Include comment '#1' up to level '#2'}%
+ %\csname #1IsLeveledCommenttrue\endcsname
+ \csarg\let{After#1Comment}\AfterIncludedComment
+ \csarg\def{#1}{\BeforeIncludedComment
+ \ProcessCommentWithArg{#1}}%
+ \CommentEndDef{#1}}
+\else
+%%%%
+%%%%plain TeX and other formats
+%%%%
+\def\includecomment
+ #1{\message{Including comment '#1'}%
+ \csarg\def{#1}{}%
+ \csarg\def{end#1}{}}
+\long\def\specialcomment
+ #1#2#3{\message{Special comment '#1'}%
+ \csarg\def{#1}{\def\ThisComment{}\def\AfterComment{#3}#2%
+ \ProcessComment{#1}}%
+ \CommentEndDef{#1}}
+\fi
+
+%%%%
+%%%% general definition of skipped comment
+%%%%
+\def\excludecomment
+ #1{\message{Excluding comment '#1'}%
+ \csarg\def{#1}{\let\AfterComment\relax
+ \def\ThisComment####1{}\ProcessComment{#1}}%
+ \csarg\let{After#1Comment}\TossComment
+ \CommentEndDef{#1}}
+
+\if 0%
+\ifx\fmtname\latexename
+ 0%
+\else \ifx\fmtname\latexname
+ 0%
+ \else
+ 1%
+\fi \fi
+% latex & latex2e:
+\def\EndOfComment#1{\endgroup\end{#1}%
+ \csname After#1Comment\endcsname}
+\def\CommentEndDef#1{{\escapechar=-1\relax
+ \csarg\xdef{End#1Test}{\string\\end\string\{#1\string\}}%
+ }}
+\else
+% plain & other
+\def\EndOfComment#1{\endgroup\AfterComment}
+\def\CommentEndDef#1{{\escapechar=-1\relax
+ \csarg\xdef{End#1Test}{\string\\end#1}%
+ }}
+\fi
+
+\excludecomment{comment}
+
+\endinput
diff --git a/cil/doc/cvssetup.tex b/cil/doc/cvssetup.tex
new file mode 100644
index 0000000..b758eb0
--- /dev/null
+++ b/cil/doc/cvssetup.tex
@@ -0,0 +1,216 @@
+\documentclass{article}
+\usepackage{hevea}
+
+\def\t#1{{\tt #1}}
+\def\DYNAMIC{\t{DYNAMIC}}
+\title{Setting Up CVS and SSH}
+\author{Scott McPeak \and George Necula}
+
+\def\cvshost{manju}
+
+\begin{document}
+\maketitle
+
+ This document is intended to get you started with the tools that are
+necessary for checking out stuff out of the \cvshost{} CVS repository. These
+instructions work on Linux and Windows (NT4.0, 2000, XP and also less reliably
+on 95/98/Me).
+
+\section{If you want to use Windows}
+
+ \subsection{Get \t{cygwin}}
+
+ You must have a bunch of Unix tools installed on your machine. (In the future
+we might be able to avoid these but for now you are better off with them.).
+Here is what I (George) do to install Cygwin. You need a good network
+connection for this.
+\begin{itemize}
+\item Create a directory \t{C:\backslash Download\backslash cygwin}
+\item Go to \ahrefurl{http://sources.redhat.com/cygwin} and click \t{Install
+cygwin} icon. Download \t{setup.exe} to the directory you just created.
+\item Run \t{setup.exe} and select ``Download to local directory''. Select all
+the packages. It is especially important to select all packages under
+``Devel'' category. If you want to use OCaml for other projects as well, I
+also suggest that you select the XFree86-bin, XFree86-lib and XFree86-prog as
+well. This will take a while (~ 30 minutes)
+\item Run \t{setup.exe} again and now select to ``Install from local
+directory''. It is best to {\bf deselect} the \t{tetex} package since I found
+it to interfere with other installations of Latex.
+\item I choose \t{C:\backslash Programs\backslash cygwin}
+as the home for \t{cygwin}, I use \t{DOS} as the default text file and I
+choose ``Install for All''.
+\item Add \t{C:\backslash Programs\backslash cygwin\backslash bin} to your
+PATH. You must put it in the ``System Variables'' PATH (In Control Panel/System/Advanced/Environment
+Variables'' and {\bf put it first} so that it comes before the default
+c:/WinNT/system32. You can verify that you got it right if you get
+\t{/usr/bin/find} when you run \t{which find}.
+\end{itemize}
+
+
+ If you get a compilation error in file ``cltkImg.c'' while you compile Ocaml
+v 3.06, then you should patch the Ocaml sources as explained at
+\ahrefurl{http://groups.google.com/groups?selm=fa.i2v96ov.1p7cmbc\%40ifi.uio.no}
+(It is easy).
+
+ \subsection{Customize \t{ssh}}\label{sec-win-ssh}
+
+ Set the environment variable \t{HOME} to point to your home directory. I use
+ \t{C:\backslash Necula}.
+
+ For some strange reason \t{ssh} does not see this \t{HOME} variable and
+insists on looking at \t{/home/necula} instead. So I create a link as follows:
+\begin{verbatim}
+bash
+cd /
+mkdir home
+ln -s /cygdrive/c/Necula /home/necula
+\end{verbatim}
+
+\section{Configure CVS}
+
+ \subsection{\t{.cvsrc}}
+
+ Create a \home{/.cvsrc} file with two lines in it:
+\begin{verbatim}
+cvs -q
+update -d
+\end{verbatim}
+
+ \subsection{\t{.ssh/config}}
+
+ Create a \home{/.ssh/config} file with this line in it:
+\begin{verbatim}
+ForwardX11 yes
+\end{verbatim}
+
+ If the \t{DISPLAY} environment variable is set when you invoke \t{ssh} (e.g.
+to \t{localhost:0.0} then \t{ssh} will do automatic X11 forwarding for you.
+This is not useful for the use of \t{ssh} with \t{cvs} but when you want to do
+remote login.
+
+ \subsection{Using CVS with \t{ssh}}
+
+ Note: these instructions appear to work even on Windows with the \t{ssh} and
+\t{cvs} that ships with \t{cygwin} (provided that you have installed
+\t{cygwin} and \t{ssh} as discussed in Section~\ref{sec-win-ssh}).
+
+ Set the environment variable \t{CVS\_RSH} to \t{ssh}.
+
+ Now you can use cvs with ssh but you will have to type the remote password
+ everytime you run cvs.
+
+ If you want to be able to use \t{ssh} without typing a password everytime
+here is what you can do. These instructions are for the case when you use one
+of the newer versions of SSH that support the protocol 2.
+
+\begin{enumerate}
+ \item If you have a DSA private key that is already authorized on
+ the server, copy it to \t{\home{}/.ssh/id\_dsa} and you
+ should be done.
+ \item Otherwise
+ \begin{enumerate}
+ \item Run \t{ssh-keygen -t dsa} to create a private key.
+ Choose a passphrase and remember it.
+ If you do not have a passphrase then anybody who gets
+ access to your machine will also be able to log in to the server. This
+ step should create the files \t{id\_dsa.pub} and \t{id\_dsa} in your
+ \t{\home{}/.ssh} directory.
+ \item Copy the public key to the server (say \cvshost.cs.berkeley.edu).
+ Make sure you append the key to {\bf authorized\_keys2}, not to {\bf
+ authorized\_keys}.
+ \begin{verbatim}
+ cd ~
+ scp .ssh/id_dsa.pub manju:~/.ssh/newpublicid
+ ssh manju
+ cd .ssh
+ cat newpublicid >> authorized_keys2
+ rm newpublicid
+ \end{verbatim}
+ \end{enumerate}
+\end{enumerate}
+
+
+ If you want you can even start an agent to do the authentication for
+you. The steps are different for Linux or Windows:
+ \begin{itemize}
+ \item On Linux or on Windows if you work from within \t{bash} you can run
+ \begin{verbatim}
+ eval `ssh-agent`
+ ssh-add
+ \end{verbatim}
+
+ The first step starts the agent and the second on loads your identity
+ in the agent. In this latter step you will be asked to enter your
+ passphrase.
+ \item At the Windows command prompt (\t{cmd.exe}) you cannot just run
+ those commands. Instead you have to download
+ \ahref{http://raw.cs.berkeley.edu/winssh-agent.cmd}{this batch file
+ ({\bf do not execute it})},
+ put it somewhere in your path and then run it instead of the above
+ sequence of commands.
+ \end{itemize}
+
+\section{Using CVS}
+
+ You should read the rest only if you have not used CVS before.
+
+ CVS is used to synchronize changes to the project across multiple
+developers. See the CVS website for detailed information
+
+ \ahrefurl{http://www.cvshome.org/}
+
+There are a few common commands you'll need. Each of these is to be run
+in the base 'cil' directory (the one with 'regrtest'):
+
+\begin{itemize}
+\item \t{cvs [-n] update -d [filename]}
+
+ This retrieves any changes recently committed by others. This is
+ usually necessary before you can commit your own changes. It is a
+ good idea to run the fast regression test ('regrtest') before and
+ after doing "cvs update" so you can know whether it was you or the
+ update which broke something.
+
+ The optional -n flag tells CVS to not actually change any of your
+ files. This is useful for querying the status of the repository.
+
+ The -d argument tells cvs to create on your machine any new directories
+ that somebody might have checked in. By default cvs does not create new
+ directories. This flag is so useful that many people find it useful to
+ create a \home{/.cvsrc} file with one line containing "update -d" in it.
+ This way you don't have to specify the flag all the time.
+
+ If you specify a filename (after cd'ing to the directory containing it),
+ only that file will be updated, otherwise everything in the current
+ directory and below is updated. Run this in the top-level project
+ directory to update the entire project. A useful idiom for undoing all of
+ your changes is "cd dir; rm file; cvs update file".
+
+
+\item \t{cvs commit [filename]}
+
+ This pushes your changes into the repository, so that the next time
+ someone does "cvs update" they will get your changes. Please try to
+ only commit when the regression test script passes.
+
+ If you specify a filename, only that file will be committed, otherwise
+ everything in the current directory and below is checked in. Run this in
+ the top-level project directory to check all of your changes in.
+
+\item \t{cvs add filename}
+
+ This adds a new file to the repository. It isn't visible in the
+ repository until you do a commit.
+\end{itemize}
+
+
+\section{Useful Links}
+\begin{itemize}
+ \item Tutorial on ML:
+ \item Documentation and sources for CVS:
+ \ahrefurl{http://www.cvshome.org/}
+
+ \end{itemize}
+
+\end{document}
+
diff --git a/cil/doc/fullpage.sty b/cil/doc/fullpage.sty
new file mode 100644
index 0000000..67824e3
--- /dev/null
+++ b/cil/doc/fullpage.sty
@@ -0,0 +1,29 @@
+% This is FULLPAGE.STY by H.Partl, Version 2 as of 15 Dec 1988.
+% Document Style Option to fill the paper just like Plain TeX.
+
+\typeout{Style Option FULLPAGE Version 2 as of 15 Dec 1988}
+
+\topmargin 0pt
+\advance \topmargin by -\headheight
+\advance \topmargin by -\headsep
+
+\textheight 8.9in
+
+\oddsidemargin 0pt
+\evensidemargin \oddsidemargin
+\marginparwidth 0.5in
+
+\textwidth 6.5in
+
+
+% For users of A4 paper: The above values are suited for american 8.5x11in
+% paper. If your output driver performs a conversion for A4 paper, keep
+% those values. If your output driver conforms to the TeX standard (1in/1in),
+% then you should add the following commands to center the text on A4 paper:
+
+% \advance\hoffset by -3mm % A4 is narrower.
+% \advance\voffset by 8mm % A4 is taller.
+
+\endinput
+
+
diff --git a/cil/doc/header.html.in b/cil/doc/header.html.in
new file mode 100644
index 0000000..ff7c753
--- /dev/null
+++ b/cil/doc/header.html.in
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+CIL Documentation (v. @CIL_VERSION@)
+
+
+
+
+
+
CIL - Infrastructure for C Program Analysis and Transformation (v. @CIL_VERSION@)
+
+
+
+
diff --git a/cil/doc/hevea.sty b/cil/doc/hevea.sty
new file mode 100644
index 0000000..bd80200
--- /dev/null
+++ b/cil/doc/hevea.sty
@@ -0,0 +1,66 @@
+% hevea : hevea.sty
+% This is a very basic style file for latex document to be processed
+% with hevea. It contains definitions of LaTeX environment which are
+% processed in a special way by the translator.
+% Mostly :
+% - latexonly, not processed by hevea, processed by latex.
+% - htmlonly , the reverse.
+% - rawhtml, to include raw HTML in hevea output.
+% - toimage, to send text to the image file.
+% The package also provides hevea logos, html related commands (ahref
+% etc.), void cutting and image commands.
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{hevea}[1999/08/11]
+\RequirePackage{comment}
+\newif\ifhevea\heveafalse
+\makeatletter%
+\newcommand{\heveasmup}[2]{%
+\raise #1\hbox{$\m@th$%
+ \csname S@\f@size\endcsname
+ \fontsize\sf@size 0%
+ \math@fontsfalse\selectfont
+#2%
+}}%
+\DeclareRobustCommand{\hevea}{H\kern-.15em\heveasmup{.2ex}{E}\kern-.15emV\kern-.15em\heveasmup{.2ex}{E}\kern-.15emA}%
+\DeclareRobustCommand{\hacha}{H\kern-.15em\heveasmup{.2ex}{A}\kern-.15emC\kern-.1em\heveasmup{.2ex}{H}\kern-.15emA}%
+\DeclareRobustCommand{\html}{\protect\heveasmup{0.ex}{HTML}}
+%%%%%%%%% Hyperlinks hevea style
+\newcommand{\ahref}[2]{{#2}}
+\newcommand{\ahrefloc}[2]{{#2}}
+\newcommand{\aname}[2]{{#2}}
+\newcommand{\ahrefurl}[1]{\texttt{#1}}
+\newcommand{\footahref}[2]{#2\footnote{\texttt{#1}}}
+\newcommand{\mailto}[1]{\texttt{#1}}
+\newcommand{\imgsrc}[2][]{}
+\newcommand{\home}[1]{\protect\raisebox{-.75ex}{\char126}#1}
+\AtBeginDocument
+{\@ifundefined{url}
+{%url package is not loaded
+\let\url\ahref\let\oneurl\ahrefurl\let\footurl\footahref}
+{}}
+%% Void cutting instructions
+\newcounter{cuttingdepth}
+\newcommand{\cuttingunit}{}
+\newcommand{\cutdef}[2][]{}
+\newcommand{\cuthere}[2]{}
+\newcommand{\cutend}{}
+\newcommand{\htmlhead}[1]{}
+\newcommand{\htmlfoot}[1]{}
+\newenvironment{cutflow}[1]{}{}
+\newcommand{\cutname}[1]{}
+%% TeX \let and \def inside HeVeA
+\let\texlet\let
+\let\texdef\def
+%%%% Html only
+\excludecomment{rawhtml}
+\excludecomment{htmlonly}
+%%%% Latex only
+\newenvironment{latexonly}{}{}
+\newenvironment{verblatex}{}{}
+%%%% Image file stuff
+\def\toimage{\endgroup}
+\def\endtoimage{\begingroup\def\@currenvir{toimage}}
+\def\verbimage{\endgroup}
+\def\endverbimage{\begingroup\def\@currenvir{verbimage}}
+\newcommand{\imageflush}[1][]{}
+\makeatother
diff --git a/cil/doc/html/.cvsignore b/cil/doc/html/.cvsignore
new file mode 100644
index 0000000..72e8ffc
--- /dev/null
+++ b/cil/doc/html/.cvsignore
@@ -0,0 +1 @@
+*
diff --git a/cil/doc/index.html.in b/cil/doc/index.html.in
new file mode 100644
index 0000000..31f4653
--- /dev/null
+++ b/cil/doc/index.html.in
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+CIL Documentation (v. @CIL_VERSION@)
+
+
+
+
+
\ No newline at end of file
diff --git a/cil/doc/main.html b/cil/doc/main.html
new file mode 100644
index 0000000..e738e30
--- /dev/null
+++ b/cil/doc/main.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
CIL (C Intermediate Language)
+
+
CIL is a front-end for the C programming language that
+ facilitates program analysis and transformation. CIL will parse and typecheck a
+ program, and compile it into a simplified subset of C. For example, in CIL all
+ looping constructs are given a single form and expressions have no
+ side-effects. This reduces the number of cases that must be considered when
+ manipulating a C program. CIL has been used for a variety of projects,
+ including CCured, a tool that makes C programs memory safe.
+
CIL supports ANSI C as well as most of the extensions of the GNU
+ C and Microsoft C compilers. A Perl script acts as a drop in replacement for
+ either gcc or Microsoft's cl, and allows merging of the source files in your
+ project. Other features include support for control-flow and points-to
+ analyses. More information can be found
+ here.
+
+
diff --git a/cil/doc/makefiles.txt b/cil/doc/makefiles.txt
new file mode 100644
index 0000000..61dc232
--- /dev/null
+++ b/cil/doc/makefiles.txt
@@ -0,0 +1,138 @@
+Cil Makefile Structure
+----------------------
+
+(Originally written by Scott, updated 11/19/01.)
+
+The build rules are spread out among several Makefiles:
+
+ Makefile - toplevel driver Makefile, interprets a variety
+ of command-line arguments (e.g. INFERBOX=infer),
+ and has rules for all the tests/benchmarks
+
+ Makefile.gcc - definitions of make variables that specify the syntax
+ of invoking gcc; for example, it has "INC := -I",
+ meaning -I is the option to name include directories
+
+ Makefile.msvc - similar to above, but for MS's "cl.exe" command-line
+ compiler (e.g. "INC := /I")
+
+ Makefile.ccured - rules for building the 'ccured' program and runtime
+ library
+
+ Makefile.ocaml - generic Makefile for OCaml projects; includes targets
+ to compile and link ML sources into bytecode or
+ native code
+
+ Makefile.combiner - rules for making the 'combiner' program
+
+ Makefile.cil - rules for making the 'cilly' program
+
+
+------------- Makefile -----------
+Typical usage is to run only the toplevel Makefile, but specify options
+on the command line saying what to do. For example:
+
+ make - build the bytecode 'ccured' and debug library
+
+Some of the more important command-line options:
+
+ NATIVECAML=1 - build native code 'ccured'
+ RELEASELIB=1 - build non-debug library
+ OPTIM=1 - enable ccured's built-in optimizer module
+ RELEASE=1 - native code, non-debug, optimizer enabled, etc.
+ NOGC=1 - disable the garbage collector (use malloc/free)
+ NOLINES=1 - disable #line directives in output
+ COMMLINES=1 - print #line, but only as comments
+ TRACE=flag1,.. - enable various debug output flags
+ LOGCALLS=1 - transform code to print at every function entry
+ LOGSTYLE=n - style for LOGCALLS; see Makefile for n's meaning
+ INFERBOX=infer - turn on full ccured transformation; without this,
+ it just transforms to Cil and outputs uninstrumented
+
+so for example "make RELEASE=1" will build release versions of things.
+Some other targets of interest:
+
+ make clean - remove compilation byproducts, including executables
+ make odoc - make OCamlDoc documentation .html files
+ make setup - build *both* bytecode/native, debug/non-debug
+
+For convenience, we've put targets into the Makefile for various test
+programs and benchmarks we use. For example:
+
+ make go INFERBOX=infer - build spec95 "go" benchmark in ccured mode
+ make power - build Olden "power" benchmark in cil-only mode
+
+The line "below here are rules for building benchmarks" separates the
+benchmark targets.
+
+
+------------- Makefile.ccured -----------
+This file does three jobs:
+ - supplies parameters to Makefile.ocaml that let it build the
+ 'ccured' executable, which transforms C code to add runtime checks
+ - says how to build the CCured runtime library
+ - produce patched versions of some system #include files
+
+Among the info to build 'ccured', the most important is the "MODULES"
+line, which says what are the ML modules which comprise this program.
+
+Note that order is *very* important: the OCaml linker wants to see
+*no* forward references, so the modules admit a total order on
+dependencies. (If modules A and B call each other, you can list A
+first, and let B have an exported function reference which module A then
+sets to point at one of A's functions. Ugly, I know.)
+
+Some of the configuration rules from Makefile are repeated in
+Makefile.ocaml. This is unfortunate..
+
+The runtime library contains wrappers for C library calls, and the
+Boehm-Weiser conservative garbage collector.
+
+The library's name is dependent on (1) which compiler you're using,
+(2) whether it's being build in debug mode or not, and (3) what the
+extension for libraries is on the current platform. For
+gcc/debug/linux, it's obj/ccured_GNUCC_debug.a.
+
+The garbage collector is built essentially independently, yielding
+its "gc.a" library. The CCured modules are then added to this.
+
+
+-------------- Makefile.ocaml ------------
+This makefile is a generic OCaml build system. You tell it the names
+of the modules to build, and it compiles and links them. A major
+choice is whether to build bytecode or native code, determined by
+whether NATIVECAML is defined.
+
+The rules themselves are complicated because this makefile works
+hard to allow the source files (.ml, etc.) to live in a different
+directory than the compiled object files (.cmo, etc.).
+
+If you want to see the details of the build process, set the variable
+ECHOSTYLE_SCOTT (in your .ccuredrc, for example). This will print
+every command executed which has a side effect. Without this you'll
+just see English descriptions of what's happening.
+
+
+------------- stylistic conventions ----------
+For the most part, we try to use ":=" instead of "=". Basically, ":="
+evaluates its right-hand-side the moment it's parsed, whereas the
+RHS of "=" is evaluated every time the variable is referenced. We
+find it's easier to predict how ":=" will behave, so unless the delayed
+evaluation of "=" is really desired, use ":=".
+
+Please indent the bodies of "ifdef..endif". This works fine, and
+makes the files much easier to read. (I'm not going to explore here
+the theology behind how *much* to indent...)
+
+
+-------------- references --------------
+Main Cil docs:
+ http://raw.cs.berkeley.edu/ccured/cil/index.html
+
+GNU Make manual:
+ http://www.gnu.org/manual/make/html_chapter/make_toc.html
+
+"Recursive Make Considered Harmful", an interesting and informative
+article about how to use and misuse make:
+ http://www.tip.net.au/~millerp/rmch/recu-make-cons-harm.html
+
diff --git a/cil/doc/ocamldoc.html b/cil/doc/ocamldoc.html
new file mode 100644
index 0000000..9f1ae13
--- /dev/null
+++ b/cil/doc/ocamldoc.html
@@ -0,0 +1,88 @@
+
+
+ How to build the ocamldoc tool
+
+
+
+
How to build the ocamldoc tool
+
+
ocamldoc
+is a tool for extracting documentation from specially-formatted
+comments in the source code. It works similarly to
+javadoc.
+The following instructions explain how to get, build, and use this tool,
+especially in the context of the CCured project.
+
+
For the purposes of these instructions, pick some directories:
+
$DIST: directory where you'll download the tarballs
+ (e.g. /home/scott/dist)
+
$BLD: directory where you'll compile the software
+ (e.g. /home/scott/bld)
+
$PREFIX: directory into which the compiled files will be installed
+ (e.g. /home/scott/lib/ocaml-current or /usr/local)
+
+ % cd $BLD
+ % tar xvfz $DIST/ocamldoc_08_10_2001.tar.gz
+ % cd ocamldoc
+ % ln -s $BLD/ocaml ocaml
+ % patch -p1 < $CIL/doc/ocamldoc.patch # fix configure.in
+ % PATH=$PREFIX/bin:$PATH # for sh/bash
+ or
+ % set path = ($PREFIX/bin $path) # for csh/tcsh
+ % autoconf
+ % ./configure # inherits --prefix from above
+ % make depend
+ % make all
+ (fails with complaint about either missing .cmx (if ocamlc.opt not built)
+ or "inconsistent assumptions over implementation Odoc_misc", but this
+ doesn't matter since it makes 'odoc' successfully)
+ % make install
+ (succeeds in copying 'odoc' to $PREFIX/bin, but fails to copy odoc_info.cma; ignoring)
+
+The resulting odoc binary can be copied anywhere and used. However,
+it contains within it the path to the 'ocamlrun' binary in $PREFIX/bin, so
+that has to stay put. Building odoc.opt unfortunately fails.
+
+
(optional) Staying in $BLD/ocamldoc, we can have it
+generate a few sample documentation files:
+
+ % make doctest # build docs of ocamldoc sources -> doctest/
+ % make stdlib # build docs of ocaml library sources -> stdlib/
+ (appears to fail with "Unbound module Support", but actually succeeds)
+
+
+
+
Finally, we can use this to generate documentation for the CCured sources:
+
+ % cd $CIL
+ % make # need the .cmi files built
+ % make odoc
+
+This will dump a bunch of .html files into the odoc/ directory. It also may spew
+some messages about errors parsing text inside comments; those messages are
+nonfatal but should be addressed.
+
+
+
Originally written by Scott.
+
+
+
diff --git a/cil/doc/ocamldoc.patch b/cil/doc/ocamldoc.patch
new file mode 100644
index 0000000..73560d7
--- /dev/null
+++ b/cil/doc/ocamldoc.patch
@@ -0,0 +1,141 @@
+diff -cb ocamldoc-orig/configure.in ocamldoc/configure.in
+*** ocamldoc-orig/configure.in Fri Oct 5 13:15:45 2001
+--- ocamldoc/configure.in Sat Oct 20 13:04:20 2001
+***************
+*** 44,50 ****
+ else
+ AC_MSG_CHECKING(ocamlopt version)
+ TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+! if test "$TMPVERSION" != $OCAMLVERSION ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlopt discarded.)
+ OCAMLOPT=no
+ else
+--- 44,50 ----
+ else
+ AC_MSG_CHECKING(ocamlopt version)
+ TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+! if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlopt discarded.)
+ OCAMLOPT=no
+ else
+***************
+*** 58,64 ****
+ if test "$OCAMLCDOTOPT" != no ; then
+ AC_MSG_CHECKING(ocamlc.opt version)
+ TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+! if test "$TMPVERSION" != $OCAMLVERSION ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlc.opt discarded.)
+ else
+ AC_MSG_RESULT(ok)
+--- 58,64 ----
+ if test "$OCAMLCDOTOPT" != no ; then
+ AC_MSG_CHECKING(ocamlc.opt version)
+ TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+! if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlc.opt discarded.)
+ else
+ AC_MSG_RESULT(ok)
+***************
+*** 72,78 ****
+ if test "$OCAMLOPTDOTOPT" != no ; then
+ AC_MSG_CHECKING(ocamlc.opt version)
+ TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+! if test "$TMPVER" != $OCAMLVERSION ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlopt.opt discarded.)
+ else
+ AC_MSG_RESULT(ok)
+--- 72,78 ----
+ if test "$OCAMLOPTDOTOPT" != no ; then
+ AC_MSG_CHECKING(ocamlc.opt version)
+ TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+! if test "$TMPVER" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT(differs from ocamlc; ocamlopt.opt discarded.)
+ else
+ AC_MSG_RESULT(ok)
+diff -cb ocamldoc-orig/odoc_html.ml ocamldoc/odoc_html.ml
+*** ocamldoc-orig/odoc_html.ml Mon Oct 8 08:32:51 2001
+--- ocamldoc/odoc_html.ml Sun Oct 21 01:11:24 2001
+***************
+*** 218,223 ****
+--- 218,237 ----
+ val mutable constructor_color = "SlateBlue"
+
+
++ (* sm: utility to get toplevel title string *)
++ method topTitle () : string = (
++ match !Odoc_args.title with
++ None -> ""
++ | Some t -> Text.escape t
++ )
++
++ (* sm: title of something below the toplevel *)
++ method innerTitle (s:string) : string = (
++ match !Odoc_args.title with
++ None -> s
++ | Some t -> (Text.escape t) ^ ": " ^ s
++ )
++
+ (** Return html code with the given string in the keyword color.*)
+ method keyword s = ""^s^""
+
+***************
+*** 967,972 ****
+--- 981,987 ----
+ style^
+ "
\n"^
+ "\n"^
++ (self#innerTitle cl.cl_name)^
+ "\n"^
+ "\n"^
+ "\n"^
+***************
+*** 1010,1015 ****
+--- 1025,1031 ----
+ style^
+ "\n"^
+ "\n"^
++ (self#innerTitle clt.clt_name)^
+ "\n"^
+ "\n"^
+ "\n"^
+***************
+*** 1053,1058 ****
+--- 1069,1075 ----
+ style^
+ "\n"^
+ "\n"^
++ (self#innerTitle mt.mt_name)^
+ "\n"^
+ "\n"^
+ "\n"^
+***************
+*** 1132,1137 ****
+--- 1149,1155 ----
+ style^
+ "\n"^
+ "\n"^
++ (self#innerTitle modu.m_name)^
+ "\n"^
+ "\n"^
+ "\n"^
+***************
+*** 1204,1214 ****
+ method generate_index module_list =
+ try
+ let chanout = open_out (Filename.concat !Odoc_args.target_dir "index.html") in
+! let t =
+! match !Odoc_args.title with
+! None -> ""
+! | Some t -> Text.escape t
+! in
+ output_string chanout
+ (
+ "\n"^
+--- 1222,1228 ----
+ method generate_index module_list =
+ try
+ let chanout = open_out (Filename.concat !Odoc_args.target_dir "index.html") in
+! let t = (self#topTitle ()) in
+ output_string chanout
+ (
+ "\n"^
diff --git a/cil/doc/program.sty b/cil/doc/program.sty
new file mode 100644
index 0000000..315faa6
--- /dev/null
+++ b/cil/doc/program.sty
@@ -0,0 +1,265 @@
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{program}
+ [1998/07/30 1.0 Source program environment for LaTeX]
+\RequirePackage{keyval}
+
+%
+% Style for writing programs
+%
+%\begin{program}[number,stretch=1.1]
+% even if you do not have options better put [] (but in Latex's \newcommand)
+% Options:
+% number[=true] - numbers all the lines with \prognumstyle
+% firstline=xxx - sets the first line number
+% numberevery[=1]- put a number every n lines (first is always numbered)
+% box[=true] - puts the whole program in a minipage
+% valign[=t] - the valign to be passed to minipage
+% width=xxx - the width to be passed to minipage
+% style=xxx - the default style of text in env. Can be "math" or "tt"
+% Or, redefine \Programstyle{#1}{#2} so that #1 is the
+% style start and #2 is the style end
+% stretch=xxx - factor to stretch the distance between lines
+%
+% line breaks are verbatim. Put % to prevent a newline
+% !foo! writes foo with \formatname{foo}. Default \tt
+% |bar| writes bar with \formatvariable{bar}. Default \mathit
+% @foo@ writes foo with \formattext. Default \mbox
+% \tab idents future lines here
+% \stab{dim} puts a \tab forward of this location and backs up
+% \qtab = \quad\tab
+% \untab undoes the last undone \tab
+% \rjust{txt} puts txt right justified
+% \rcomment{txt} like \rjust but with \formatcomment{txt}. Default \mbox
+% \lab{txt} puts a label leftjustified with \formatlabel{txt}
+% \labspace{txt} use on first line to create indentation that clears labels
+% \nonumber omits the line number in this line. The line number is not
+% incremented
+% \donumber makes sure a line number is emitted
+% \bumpnumber{5} increments the line number by 5. Visible on current line
+%
+% This environment is built on top of Latex tabbing environment. As such the
+% tabbing commands work here as well. However, some tabbing commands will
+% interfere with the program environment. The command that you can use are:
+% \> advance to the next tab
+%\end{program}
+%
+% Define the options
+%
+% Define a boolean key with a default value if used without =
+\def\Prog@defboolkey#1[#2]{%
+ \expandafter\newif\csname ifProg@#1\endcsname % Define the if
+ \define@key{Prog}{#1}[#2]{\csname Prog@#1##1\endcsname}}
+\def\Prog@defvalkey#1[#2]{%
+ \define@key{Prog}{#1}[#2]{\expandafter\def\csname Prog@#1\endcsname{##1}}}
+\def\Prog@defvalkeynodef#1{%
+ \define@key{Prog}{#1}{\expandafter\def\csname Prog@#1\endcsname{##1}}}
+
+
+\Prog@defboolkey{number}[true] % numbers lines
+\Prog@defboolkey{box}[true] % it puts the program in a parbox
+\Prog@defboolkey{style}[math] % Can be math or tt
+\Prog@defvalkey{valign}[t] % how to align the minipage (if in box)
+\Prog@defvalkey{stretch}[1.0] % Factor to stretch the distance betwee lines
+\Prog@defvalkeynodef{width}
+\Prog@defvalkeynodef{firstline}
+\Prog@defvalkey{numberevery}[1]% Put a line number every n lines.
+
+% Set the defaults
+\setkeys{Prog}{box=true,number=false,firstline=1,numberevery=1,
+ valign=t,style=math,stretch=1.0,width=\z@}
+
+% Set the global defaults
+%
+% User parameters
+%
+\def\ProgramStyle#1#2{\def\ProgramStyleStart{#1}%
+ \def\ProgramStyleEnd{#1}}
+\def\Prog@stylett{\ProgramStyle{\tt}{}}
+\def\Prog@stylemath{\ProgramStyle{$}{$}}
+\Prog@stylemath
+
+% How to print line numbers
+\def\prognumstyle{\scriptsize\em} % The style for printing line nos
+\def\formatkeyword#1{\keepspaceafter{\underbar{\bfseries #1}}}
+\def\formatvariable#1{\keepspaceafter{\mbox{$\mathit{#1}$}}}
+\def\formatcomment#1{\mbox{#1}}
+\def\formattext#1{\keepspaceafter{\mbox{#1}}}
+\def\proglabelskip{1mm}
+\def\formatlabel#1{#1:\hskip\proglabelskip}
+
+\def\formatname#1{\keepspaceafter{\mbox{\ttfamily #1}}}
+
+
+\def\tab{{}\=\+{}}%
+\def\stab#1{\hskip #1\tab\hskip -#1}
+\def\qtab{\quad\tab}%
+\def\untab{{}\-{}}%
+\def\rjust#1{\`#1}
+\def\rcomment#1{\`\formatcomment{#1}}%
+\def\lab#1{\gdef\prog@label{\formatlabel{#1}}}%
+\def\labref#1{\mbox{#1}}
+\def\labspace#1{\phantom{\formatlabel{#1}}}
+
+\def\proglabelwidth{1em}
+
+%%%%%%%%%%%%%%
+\newcounter{programline}
+\newcounter{programlineskip}
+\newcounter{programid}\setcounter{programid}{0}
+ %This is for hyperref to make the line numbers
+ %unique in a document
+\def\theHprogramline{\arabic{programid}.\arabic{programline}}
+
+\let\exclmark=!
+{% Set |...| to print the ... as a variable
+ \catcode`\|=\active\relax
+ \let\prog@bar=|%
+ \gdef|#1|{\formatvariable{#1}}
+% % Set ; to print a thick space after it in math mode
+% \let\prog@semicolon=;
+% \catcode`\;=\active\relax
+% \gdef;{\ifmmode\prog@semicolon\;\else\prog@semicolon\fi}
+ % Set !...! to print the ... as a name
+ \catcode`\!=\active\relax
+ \gdef!#1!{\formatname{#1}}
+ % Set @...@ to print the ... as text
+ \catcode`\@=\active\relax
+ \gdef@#1@{\formattext{#1}}
+}
+ % Define prog@space
+\def\@tmp.{\futurelet\prog@space\relax}\@tmp. \relax
+ % Keep a space after something
+\def\keepspaceafter#1{\def\@tmp{#1}%
+ \futurelet\@next\@keepspaceafteri}
+\def\@keepspaceafteri{\ifx\@next\prog@space
+ \def\@tmpi{\@tmp\ }%
+ \else
+ \def\@tmpi{\@tmp}\fi
+ \@tmpi}
+
+
+
+%
+% The next few macros override macros from the Latex tabbing environment
+%
+\def\prog@numberthisline{1}% Default is line numbering
+\def\prog@nonumber{\gdef\prog@numberthisline{0}}
+\def\prog@donumber{\gdef\prog@numberthisline{1}}
+\def\prog@bumpnumber#1{\addtocounter{programline}{#1}}
+
+\def\prog@startline{%
+ \ifProg@number
+ \refstepcounter{programline}% Increment the program line before each line
+ \fi
+ \prog@origstartline}
+
+\def\prog@printlineno{\ifProg@number
+ \hskip\proglabelwidth
+ \ifnum\prog@numberthisline=1\relax
+ \ifnum\theprogramlineskip=0\relax
+ \llap{\prognumstyle\theprogramline}%
+ \setcounter{programlineskip}{\Prog@numberevery}%
+ \fi
+ \addtocounter{programlineskip}{-1}%
+ \else
+ \addtocounter{programline}{-1}%
+ \prog@donumber
+ \fi
+ \fi
+ \hskip\labelsep
+ % Now put the current label
+ \ifx\prog@label\empty \else
+ \setbox\z@\hbox{\prog@label}%
+ \copy\z@ \hskip -\wd\z@
+ \global\let\prog@label=\empty
+ \fi
+ }
+
+\def\prog@startfield{%
+ \prog@origstartfield
+ \ProgramStyleStart}
+
+\def\prog@stopfield{%
+ \ProgramStyleEnd
+ \prog@origstopfield}
+
+% A new version of @stopline which ignores blank lines (lines with
+% width 0pt) and prints line numbers. To print a blank line, put "\ \\" on it!
+%
+\def\prog@stopline{%
+ \unskip\@stopfield
+ \if@rjfield
+ \global\@rjfieldfalse
+ \@tempdima\@totalleftmargin \advance\@tempdima\linewidth
+ \hbox to\@tempdima{\@itemfudge\prog@printlineno\hskip\dimen\@curtabmar
+ \box\@curline\hfil\box\@curfield}%
+ \else
+ \@addfield
+ \ifdim\wd\@curline=0pt%
+ \ifProg@number \addtocounter{programline}{-1}\fi
+ \else
+ \hbox{\@itemfudge\prog@printlineno\hskip\dimen\@curtabmar\box\@curline}%
+ \fi
+\fi
+}
+
+
+\newcommand\program[1][]{%
+ \stepcounter{programid}%
+ \bgroup % Start a group so that we can undo easily most assignments
+ % Process the optional arguments
+ \def\Prog@width{\z@}%
+ \setkeys{Prog}{#1}%
+ \ifdim\Prog@width=\z@
+ \edef\Prog@width{\the\linewidth}%
+ \fi
+ % Line numbering
+ \ifProg@number
+ \prog@donumber
+ \else
+ \prog@nonumber
+ \fi
+ % Whether in a box
+ \ifProg@box
+ \begin{minipage}[\Prog@valign]{\Prog@width}%
+ \fi
+ % The distance between lines
+ \setbox\strutbox\hbox{%
+ \vrule\@height\Prog@stretch\ht\strutbox
+ \@depth\Prog@stretch\dp\strutbox
+ \@width\z@}%
+ \setcounter{programline}{\Prog@firstline}%
+ \addtocounter{programline}{-1}% Adjust for preincrement
+ \let\prog@label=\empty
+ \let\prog@origbar=|%
+ \catcode`\|=\active\relax
+ \catcode`\!=\active\relax
+ \catcode`\@=\active\relax
+ % Start a tabbing environment with obey lines
+ \let\prog@origstartline=\@startline
+ \let\@startline=\prog@startline
+ \let\@stopline=\prog@stopline
+ \let\prog@origstartfield=\@startfield
+ \let\@startfield=\prog@startfield
+ \let\prog@origstopfield=\@stopfield
+ \let\@stopfield=\prog@stopfield
+ \let\nonumber=\prog@nonumber
+ \let\donumber=\prog@donumber
+ \let\bumpnumber=\prog@bumpnumber
+ \obeycr% All lines after this must end with a comment
+ \tabbing% Everything after this is local to a field
+% \@gobblecr
+}
+
+\def\endprogram{%
+ \endtabbing%
+ \restorecr%
+ \ifProg@box
+ \end{minipage}%
+ \fi
+ \egroup
+}
+
+
+
diff --git a/cil/doc/proof.sty b/cil/doc/proof.sty
new file mode 100644
index 0000000..00d002c
--- /dev/null
+++ b/cil/doc/proof.sty
@@ -0,0 +1,296 @@
+% proof.sty (Proof Figure Macros)
+%
+% version 3.0 (for both LaTeX 2.09 and LaTeX 2e)
+% Mar 6, 1997
+% Copyright (C) 1990 -- 1997, Makoto Tatsuta (tatsuta@kusm.kyoto-u.ac.jp)
+%
+% This program is free software; you can redistribute it or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either versions 1, or (at your option)
+% any later version.
+%
+% This program is distributed in the hope that it will be useful
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% Usage:
+% In \documentstyle, specify an optional style `proof', say,
+% \documentstyle[proof]{article}.
+%
+% The following macros are available:
+%
+% In all the following macros, all the arguments such as
+% and are processed in math mode.
+%
+% \infer
+% draws an inference.
+%
+% Use & in to delimit upper formulae.
+% consists more than 0 formulae.
+%
+% \infer returns \hbox{ ... } or \vbox{ ... } and
+% sets \@LeftOffset and \@RightOffset globally.
+%
+% \infer[