automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, msvc, updated. v1.11-456-gb


From: Peter Rosin
Subject: [Automake-commit] [SCM] GNU Automake branch, msvc, updated. v1.11-456-gb07777b
Date: Tue, 06 Sep 2011 06:26:21 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b07777bd6da63018e845e18ce96c4168343b47b6

The branch, msvc has been updated
       via  b07777bd6da63018e845e18ce96c4168343b47b6 (commit)
       via  3c99e9dca034ba5cbe3848af024aea5b4fc19b6c (commit)
       via  eda087adfd260504766cf0667fac4dc80e2c0b91 (commit)
       via  884694a8f84f97a584334fd58048be3de51b001a (commit)
       via  e25ee5889f3fdf9890e4a141e1c27d6a063b2ad9 (commit)
       via  ef44cad1cc983f43e6aa48f7b50d19346a7f55f4 (commit)
       via  eb59c423d7addf124d33f50ac920789db1304adb (commit)
       via  1dcba7b847b137330ed91ef8269d403163387e7e (commit)
       via  236ad0bcb351a6e0795a69f272646bd2201b4056 (commit)
       via  bbddd445708efd8e7a484645f7ebf9b2a3a76102 (commit)
       via  91a7653997ca147b3242688f056c89840b789a09 (commit)
       via  720f0a2e5ad7e232390e2c590c331773389e8a25 (commit)
       via  b3afcecf956210275843c3e6e2d6f639f48156eb (commit)
       via  35a0689da39d6874464b7940b4e1a6930ca3c448 (commit)
       via  c7c62a4a2f075d7fcb4c035de361491008778fc5 (commit)
       via  142dab55025486e30985177a814e8c50f6a78c05 (commit)
       via  d9e4f1ec7d87ed96bb663c883ee3dd96e56affa9 (commit)
       via  f4e516e6d4ac0fae8919b1997432443ce90320ac (commit)
       via  5d4dc886c0863ed2a4fdec933a1bded31402094b (commit)
       via  40ef9a0b95e9f15eb53f21db2e07f82342beaad9 (commit)
       via  3680f7deb922ec3128eb1a69788392984b856860 (commit)
       via  9201a314dbbb4793023a069d8530bc37c34b09b7 (commit)
       via  158e1d9b450600f15226eefc5b7a026478e1500b (commit)
       via  edee35da30481a0fa26800bd514bb177416f7e83 (commit)
       via  9d1a3a28e52edf568f5edd598446d00c6deebec4 (commit)
       via  b01fc0873d749b73fcd54378772d36c05ce81bf2 (commit)
       via  76cfe59c148e8ba4299fbd2ee9f29ede6198698e (commit)
       via  8285d525bfa39018781f5c49b5caa3a44960b8b1 (commit)
       via  839b1e34dce6a7038573157a10a4000488926f8d (commit)
       via  fae45c77d9dfd2b566730bf80fc17d91d61a6931 (commit)
       via  e58e5f493fa0856d6782549d978c3f1d5f24de8f (commit)
       via  8c7c3b592e8fe01e263ade96eddbc85f2619943c (commit)
       via  044035ce85d089a9bbdfd6fa99c31dd22b74e7db (commit)
       via  f8cb365330f9b00aa821b5d64239c94d7b4284c1 (commit)
       via  a44667dce47afd200d990910f8e8a966276be756 (commit)
       via  e7a6300b022c251e067dd75229d5c02b658c49d2 (commit)
       via  c9e39919f0afea01e55795050d4978f530e086e2 (commit)
       via  404882ab2ac0a9447f6eccb2fa218df70582f488 (commit)
       via  9667c39a2cd9c1af4be172169031975febe78657 (commit)
       via  5755b7bcbd3892eb6aa31542fc7e2435a0de11ab (commit)
       via  c1040a74c10a9a011a04ad0d347b61465c5ee194 (commit)
       via  9478566087f83d1fac2c9a7629898a3d39a05fdd (commit)
       via  72d36af268fa7bee24466e21d2d543d8d1ce7b1c (commit)
       via  1c3614c6d47b4428c39a784dda7f2641cfc8f6d6 (commit)
       via  42a9c4db8dc4624dc2b59d1f9a3efb45e359c12e (commit)
       via  9b61494445c234e505a2efea8e1c0384591edd2f (commit)
       via  b8c2b69913b652bcfd4665b041f11d8b5316da2b (commit)
       via  60cd9bc070d62bb9046298792bf344d233620a14 (commit)
       via  98fab1246b31bc4eb5d83ac7524d1fd126d0e416 (commit)
       via  f541f9a4c8a5016ed4d77e54f4a3d707a863feaa (commit)
       via  d30f97d1b62026c962240887d76355f89175b755 (commit)
       via  474aad06941498f4c4363b6023eb2f0045b73397 (commit)
       via  e8bcc4800b17c3fd64b951e0136e7769693edbc8 (commit)
       via  5cfe77c655c8c9a82c1cc1686c5da4c9cdd05c45 (commit)
       via  fefc6a0618c9cdace8b9aa97e1404b0a56abf7dc (commit)
       via  5aad6b2552953fbf15f7df672538281b513beff9 (commit)
       via  66249f441c572f7f950ae0ab88305fba73eb5a25 (commit)
       via  73f8daa0b9d0734153d19f9bb44d9c679df5d9c1 (commit)
       via  ed078daae2110f79322c79826be567645ef62ea4 (commit)
       via  9ca632642b006ac6b0fc4ce0ae5b34023faa8cbf (commit)
       via  4e9474e6e9b18723d3fb02858824682dbd0e03f0 (commit)
       via  f84f54f530c8aa0fd3dcd7a31506eef169958a0a (commit)
       via  976003923e43d17985a776f82cf8168e8741f7de (commit)
       via  f4599943df5b596bad2687cd69d7fe5ce03bcb27 (commit)
       via  5b7c6b4ce170477dc3a25a5ca669d117bfb40aa8 (commit)
       via  e4a70cff310e29066e388aa18aeb07242e003eec (commit)
       via  24b9022b753b129d9a2832904fbd9b7a7bbb17d6 (commit)
       via  67ca6940688ed14d84642b34df4f28a07b9d9f00 (commit)
       via  d235db335eaae0934ede72698395f8591d115f9a (commit)
       via  8a8890a9152528a4fc348bb15b27ebb2a4c3b7cb (commit)
       via  bee9871d6a8743b7f01789f196c214354e7f612a (commit)
       via  aa6883fdcf1e7f21ea81fe4745c0018a9398d43f (commit)
       via  f31a38aed9c8ffbd33d797aa2df5b5864860bb17 (commit)
       via  5c237a6208c74eb445613e5237b4749d62f18b28 (commit)
       via  82fc4d353ce941f09f16738a31fb8958d0320be2 (commit)
       via  3352b4e8e52d48fd98cda77750d21a819f5cfd47 (commit)
       via  0f53bd10322ac70691d8bed06533424eef8db0e6 (commit)
       via  2fec9f098ac951e1f7725bce5894c3c7355c59ba (commit)
       via  daa946a431442335bdf965e27b6f81f6c109fddc (commit)
       via  a9eef973b5ea47cc3495f1a8307d4f7b85aea46f (commit)
       via  42a465249b6d3425efbf23df8f2b62fc0e088cfb (commit)
       via  a370e2f5cd098af9b95314cdd49b0fbee6588a82 (commit)
       via  293b93fcbe264c701ebb88bee5eee0dcf685ac38 (commit)
       via  1ada3973ce2ece03695b068477e08253f8d18b5f (commit)
       via  78ea595f035fff5e382df79c95bcf639f53fd12b (commit)
       via  8b3470c0ed6070f6b8d7ce7878284aa0c08aac13 (commit)
       via  305f9120306aab1343da724696aaa88c7f0dd0ab (commit)
       via  d8f365af42b559f1ae46544c2238febfca664f3a (commit)
       via  e9bb4e913957b0388182de7350e198d6fe74bf02 (commit)
       via  214bafdb4f7b97e8897cf8668867a2bbcfc804b2 (commit)
       via  d53f5cd99c0946f77ff473e44db13514cc062837 (commit)
       via  5d1f3f0c14af19df45406386b514008916f7d80b (commit)
       via  9b5a8552fec112499a527a8af8577a9b76144435 (commit)
       via  3b64c7d208952e94c4b6a317cf34e5e650e77fe6 (commit)
       via  9e7c4339cefd512255d30446053a9d84bdb619b1 (commit)
       via  5e5919991ae3992dccc7851cb4af504bba0cc26d (commit)
       via  1cddf4107153300cfb0e321711ddb38eb0d7e96c (commit)
       via  5bbf66bd78066dfe088a8405e6c1755c3a9ab2ba (commit)
       via  e78436cf58d37d8471da0101407ff71d4fdee901 (commit)
       via  82a10984a75107c2b06f71e69c482bbb0c62f84b (commit)
       via  99847a1220b6f3212e73dca10448297f1fc15f3e (commit)
       via  a937127aa2ed5f831459716f7f922c894e3e4eb2 (commit)
       via  8a6f52db53b56b717c8c8dacf5675330fe973840 (commit)
       via  d66a7c60468a4f098b3248e9a467a278c6c65198 (commit)
       via  ac6764da0c0ad499e51a36db0a818b03b697ef37 (commit)
       via  9ada18be77d81c1e79ac360bb7a57810b2b6f546 (commit)
       via  1ae0d32e09b89de68955485fbc906202832f7d74 (commit)
       via  df9b3bc2212dff5edea3dc60abe93ee61e5283f9 (commit)
       via  744705d420e809cc3da27a253892aa69defec4ce (commit)
       via  38f41a03549259cc1a70d5da10b082b1ba86d04b (commit)
       via  7953494a128593bf74d2849f488f593c4d4fea9c (commit)
       via  6a85bc48aa9691574053a153d79cc79cd28e311f (commit)
       via  d4df619bfa53ef0bd81fbbbe03b3672711defe2f (commit)
       via  e87c030d838a0c649239c9d2a632c1b2415852a0 (commit)
       via  0a6a45503a44d149da77e1b3b35aa16592c1a258 (commit)
       via  e72a1b007f3ae165ded1af8a00dce83448c2ff2c (commit)
       via  8d3571b9dddfcab822f7b62832070b2214a11ac9 (commit)
       via  1dd55a48e354e57686879ea9900c8daf0402a10a (commit)
       via  34c1c2d884774ae91f82e1c5027d1502b3112c6a (commit)
       via  32975c638af3628283ba0fe6080729acbc898acb (commit)
       via  e36003d0cf689ab737e774ea5faa07b2375e0d0a (commit)
       via  68694a871f05fcb33a3efb6aada7c084365ca272 (commit)
       via  ef95da1f6a426e26b5f6b3c219ec4d27f982ffc5 (commit)
       via  1325a8ada5e11f19ff41094e8c2f86fe0952e425 (commit)
       via  b532317d8b7f779a45a070fd10012a204cf4ee72 (commit)
       via  78992b3411196a4e9e66bffed5a6ab96aa9d648f (commit)
       via  d51e7b79713f909c235c9880f7f62c4b0c0910d0 (commit)
       via  e6ca61c1a1bf601cfde4b67c33fe861cafff7450 (commit)
       via  a118732d1138b169e3c41759b8e3e03945994172 (commit)
       via  5bf7af6e1e5fa63bc192ed972ef8c83dd6faec2b (commit)
       via  5cc6a5a3835fe98b23e4dae86ba7228f977e50a2 (commit)
       via  5ed043ad03d36be44500501ec0d69f3ba736911d (commit)
       via  e12be9450726e26136a6bc64f7df47ced18f6671 (commit)
       via  9095d6b98f6d9d3755e8b592f336011aef11d61f (commit)
       via  57198decf1d0dfa758d70ac564e2aec4281798d0 (commit)
       via  06b46e1f8f307d2f6d0af6a9d73f7003171d0745 (commit)
       via  fcb15300772146dfcb8d2f232a32989e2d24fefa (commit)
       via  e1a4d87a050607367de05054e069d6f3ddcfca84 (commit)
       via  ead12d3f08f5a04db3fef1a70ee62e1835ce2633 (commit)
       via  e9cb6db11693a39051b43574405c651ce91ab37d (commit)
       via  92c4c0c0a073fee1497ae70b8d269fc81f3884c7 (commit)
       via  4a492566abfbecd896073dc62e4099e182e5e69c (commit)
       via  c876b0e062a41150a667470e250794efed83f721 (commit)
       via  7e2e93d82b46e743c68a821684fc5afc54bfef54 (commit)
       via  e9b44d82fd9d4d55223f11a4fff011c2c7036175 (commit)
       via  4e1ab202ca72822803463aa71e676b938210f0f5 (commit)
       via  15a6e56f4a8f9e262631419dbfc46483c0b69428 (commit)
       via  10315b6dc8fe65f86a901ee9692271b2e8e4f541 (commit)
       via  d652a1c0a5bf2f973c5328eed983b4df9ccd284f (commit)
       via  e8e533e2f5039a34c7c13c9cdd88cfbf0ba2f3ec (commit)
       via  599a8f5ef7241b23ed96b18f32f745d028d26c11 (commit)
       via  80fdae8e515f85b1000bea1ee1823d88d392f659 (commit)
       via  080efc945a834569156c2fc11e7623853e1bdd04 (commit)
       via  87073880107cef3f162305b8681f1cb4826ce623 (commit)
       via  e5fb6dce45aae3a3bc403cd3f3e0d4e3babf2f75 (commit)
       via  09c55b721e4236c694e00ec35d3b4e25a51e5478 (commit)
       via  719d10784ff5a7c5a2f83b6908581911c8bd153e (commit)
       via  7a42b52f626f3b713196b5946b9bfbb3e173226b (commit)
       via  104926af9da5c73470a048342de9349cb86c89e2 (commit)
       via  44eb24d65ca6db445a40535067683418a3760c1f (commit)
       via  6615a9c3195f8e17c7dbfd052ca528019739a517 (commit)
       via  21fec67175f26976a04a7ab29e01536d5f9fc464 (commit)
       via  cf65e60d20f66e867af51f55426e93d1f3c6c328 (commit)
       via  2872bbbde068b45b4788f3998fe3d80146f5442b (commit)
       via  ba14eaecbb3311511d226ca7b7dc74e664e53dd7 (commit)
       via  3d8d5ec1c85f43aaa78e373dfe30f5d397cd5819 (commit)
       via  c8c0a64515e4ed1e08c8eddb9e5dfd06ce987577 (commit)
       via  51b68122c3abc0503e8eddfc188645c9109d76c4 (commit)
       via  36bd45346b317c5cc45ae9f35b710d206ffa05c0 (commit)
       via  73b74f839340b94dad94f090e7d8291064104d0d (commit)
       via  a115c7c75580f71dd6c123bb1cdaa07f742fd3a3 (commit)
       via  6318add07d8f2f8507edcfd85461afea77f68a90 (commit)
       via  ece3872f817855afd265b3a2187116b253439de0 (commit)
       via  bb528a71d97ba1b529c314e391253c3b6e2be078 (commit)
       via  638f21a12eaad4de414f2ee3b5c7d8230da66c38 (commit)
       via  201ee99071fa515e097b5be00cbda2f139da7f65 (commit)
       via  0d93356e18f12daaddb0118d19d1e45df9d4db44 (commit)
       via  dcc0f400e92d994a77dc3228d90ab9fbfd0590e8 (commit)
       via  6880ecb207efdd869ab2a8bcdbd0cd24e36bf9f1 (commit)
       via  23934e1f5b4c552065c9499bf61c65455266989c (commit)
       via  d5a408d73bec98becd56cacfcc7422790fc8a9a7 (commit)
       via  1247b6419fc556255952ef6eeee08da9b185a0bf (commit)
       via  60030d61dafa00b7792cb96eaee10f786182752d (commit)
       via  511ccb162321d30f3187997b94e47ac424cd9baf (commit)
       via  20fb9cebd5ca7c48c0eeba32d6ea42bab1f5b912 (commit)
       via  9552ab180a2ecbccd8a2439ad860838a497315aa (commit)
       via  d7430fea6a8b878b1bfdf89af561a93f2746576d (commit)
       via  49860170d3eea01cca9a76f6e738ca345a09e306 (commit)
       via  2f8861f47415fc98ee381cb13824176ed5932726 (commit)
       via  ab323bcc12b86490a45f9fd6fbbc12d3cc1ea38d (commit)
       via  f6ab59edd56044980c06fb3c57a3c96dd4e6cfbb (commit)
       via  4b285ef86883d30d9fe74a2d33366ee2398bc86e (commit)
       via  3a5f8cc69e6687d2f074522cf9d69be4eea6d8f8 (commit)
       via  4abf2246375e96b8a82affdf04f079e3e9ee7c73 (commit)
       via  fdb2764f70ff5f3aed51a61baf3b72511ffb9d11 (commit)
       via  22ee3bdfb7d140f61e276eae28fbabe321f6c32a (commit)
       via  2601fd8f5688a2e9cb4c723c1c42007d3c019fca (commit)
       via  fadd73d775e558ab476bebd59a39a42e97fbdf39 (commit)
       via  ddf45657245092f6243124b6629bf0cffea0e4bf (commit)
       via  6f1e8ccb0b9289646c84be03f7ea42a7bbb2154d (commit)
       via  15cd54c001e1510c6593adfd3391f69d4bcc9c45 (commit)
       via  b27b2126762e3a39c04548dc21ed30d4cc2c3de7 (commit)
       via  3262c47dcfebd2dbfe79f8c885ff81fda6c0a86b (commit)
       via  36c1b5c0f0d5e9a9a3c91233fcb0e408ef6093e3 (commit)
       via  87b99db562a6353251cd08442ecce8ca262ba807 (commit)
       via  d0d9f70fffcb66757451b8b53e00ae6cffa92b30 (commit)
       via  98462e64b04b0ecd1015961bc3a63caf23f3bb41 (commit)
       via  86a3c0cc4204e87fdcbb10ab716a9156510ac8c0 (commit)
       via  983a977e4575126e9be0376420b3db7856955ca8 (commit)
       via  1e1f2a13d9b97f3327e7ad0e98f0cc10b6dd490a (commit)
       via  3616946d61720db601c70bf986207654d9fde6f1 (commit)
       via  f140b6bce15a1705ec8258e8914e7b605ef15f6f (commit)
       via  c4d75f3e54949a6862e593d56a5de74ed1510801 (commit)
       via  aa45fb2cb11c9231aad5ff4c059a4c0ab077c361 (commit)
       via  a6da48d34bef50210789a32d032b24f9b16d8fb7 (commit)
       via  e46935648e7c3b4d043b8a4cda231918ca636a89 (commit)
       via  ab18ada679ba8d7e3759ed6caa76cfbf2ddbfdbb (commit)
       via  551b1133da2b17fb3d2171346fd4af86f05ad5fe (commit)
       via  7a020d668ab1bf8f36bb1719b63f784c64ae74f2 (commit)
       via  6afea5000636292d3aa7e8933aa61a0d851fa5ad (commit)
       via  d7c1679b14c1ab691927f3243df1cb3cbb2360aa (commit)
       via  a7ba28fd1f3c094aa878b779b883ea185dcaa10e (commit)
       via  2e5b3599df31bc4958f61cf22b9b0ad9d45b86e4 (commit)
       via  78e08c867007864ef740936c3af3fdd1238b9792 (commit)
       via  51e3b6841a474d129fc25077e42dea38ec181cd6 (commit)
       via  0498520e65fed0222d07190b6124d3de92c6044c (commit)
       via  b8c1325a9f839efbd7cbab203eca8d2a26e2ff66 (commit)
       via  3ec8321119d12023058cf6bb92d04c7e1a648676 (commit)
       via  9e126f15eef21b220cae7f1b3556c26ac19e29d0 (commit)
       via  614b643eca8361f9d5a5295d25482d07c34016af (commit)
       via  a82bc0d5cfea18fc96476c23a4fb2d458af09c89 (commit)
       via  a25c6733a0e78fd7aef28e560e027bcef9684e96 (commit)
       via  067455ce40bfa4c7234d46368ab64efb893ab808 (commit)
       via  6bc306097ad74dfafd445243f69a13bda2139505 (commit)
       via  20abe4e50f9beb3bf36a6b8796d7230caa92813a (commit)
       via  627f0a91fce4a715f871334342d4bdd877670dc2 (commit)
       via  c423cdb4bb1d9719376fb54b35e3da9ce422a816 (commit)
       via  580054fa204718b4cddab94b2364f2a52db789d0 (commit)
       via  3cf074bb74da6d54e83e0f2e0cf0de8907fe00fb (commit)
       via  978dfcf5d79630e656a6c1e99a7a8cf2a838688a (commit)
       via  e09f00c8aada78d19c199bb6f7743330dc086afa (commit)
       via  fd7d4da2cb4d4817776fd6b8637060f5351134e3 (commit)
       via  59db71ca887b2cc5b84eb05d1abeb588d3bfea47 (commit)
       via  adf64b4bfdc8e58ff9d3f927ded85b2329cb6bb6 (commit)
       via  77dc6c1bf2dc893a2c393229c2b656668694120e (commit)
       via  1946eadee8f7a342a338048a89161c98e5353ff3 (commit)
       via  4e8b21e113d49633c55004217bd26dab8b5d7401 (commit)
       via  f94d28bca672bb877bcc7a6d4133a2ec765dd03d (commit)
       via  f0b4323ac83c8e2bb57ebece361905cf1bcaa07e (commit)
       via  e335d8bc66314034cfd8435572c23e781c6df922 (commit)
       via  24e3b4ee2f8cb9f72dd94a05a893f3d4e88b7835 (commit)
       via  ccb31f6a93cd6076067b5bf120b4478afdad31bf (commit)
       via  529421a033c9937a853ef0a315a57f230c3a3bc4 (commit)
       via  b268a1f605ba5eb00d15c6e169d535633fa3d39b (commit)
       via  999865553137b48a0770b5073cfd4f91c1e49593 (commit)
       via  c2ff7e81110e29c37fdbb8938407c25049e46813 (commit)
       via  9c9cf0d89bc1b5bdafd9fc8a42254f42c3935d5c (commit)
       via  82f4860ab5725b8fdc3125c4f15c5fac3849bb72 (commit)
       via  8f3f7d7a35a2e11b0979c8710b5205706e4c8b7b (commit)
       via  92783d30b5696a08412ef98d1bdf886b65829ed8 (commit)
       via  1194808ca559ccbf0fef1c3754bac334591d6f4f (commit)
       via  d0dd88f36a8ccc9b3c7b799b0e95b55c98fee40d (commit)
       via  39584250af1d57402795753de4008a8afd87334b (commit)
       via  f9fe878b53bca8297dbb6df861a99632f2f9b5b3 (commit)
       via  a03bb70a8903b1726168f43a99f55732907aef00 (commit)
       via  9ca2fc96af5d85f26848619ef1024c4bbfa9ebed (commit)
       via  4a709b8a432a4e5619e526c4c313902c834770b4 (commit)
       via  c8668e07d0dfa0ad17634f36fda26eeecd2d770d (commit)
       via  4e06cfe8844feb35ff8007511e0270fb8ac2bf3d (commit)
       via  755ebe3254f669cc35cc10d1100a92d058f54048 (commit)
       via  6328f148f51cf748a07981915adb6e4b06c6f7c9 (commit)
       via  c92e890ce35a5f8bbdebf47aab38ee7c0b8daa66 (commit)
       via  22dfae32e71dee267c5231a79b24426b18e3dd5e (commit)
       via  fbab1c8830e2dc05f01a72bebf989ada34af49ae (commit)
       via  d628025fd4ad5ce662a24a818ae97f1af7c0a7d3 (commit)
       via  cd5520e4395eda08ee9db9df8f31f1140acd55fe (commit)
       via  103367103228d5ae88df7aace5c87c5e82d82e11 (commit)
       via  6d316dd0ee1b478baa85896b6f6e05dc8ae240e3 (commit)
       via  e9f3c00ace05be38caabbe29d668ad2c2cb2de9f (commit)
       via  2c0e470fb758a1953c63b4e873a192932bac3444 (commit)
       via  717b86455e2138e0a00b34a4d89e320483be62dc (commit)
       via  926b43d4a4314a4b9eeb4241a36e35afc4fe581b (commit)
       via  e7aa360a4eb92708375957b5fe192deb66ce7f52 (commit)
       via  669e5cd07d5a65ecfb3b9f726eb131671cbb1d44 (commit)
       via  e34409158f6e6166911d7759869cc669f4054ec4 (commit)
      from  38846c5f1cb8ad3745bc9a37816fb1cb7d75b399 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b07777bd6da63018e845e18ce96c4168343b47b6
Merge: 38846c5 3c99e9d
Author: Peter Rosin <address@hidden>
Date:   Mon Sep 5 16:35:54 2011 +0200

    Merge branch 'maint' into msvc

-----------------------------------------------------------------------

Summary of changes:
 .cvsignore                                         |   14 -
 ChangeLog                                          | 2295 +++++++++++++++++++-
 ChangeLog.03                                       |    8 +-
 ChangeLog.96                                       |   30 +-
 ChangeLog.98                                       |   12 +-
 HACKING                                            |   49 +-
 Makefile.am                                        |  150 ++-
 Makefile.in                                        |  143 ++-
 NEWS                                               |   47 +-
 README                                             |    2 +-
 THANKS                                             |   11 +-
 TODO                                               |    6 +-
 aclocal.in                                         |   10 +-
 aclocal.m4                                         |    7 +-
 automake.in                                        |  203 +-
 bootstrap                                          |   42 +-
 configure                                          |  370 ++--
 configure.ac                                       |    6 +-
 doc/.cvsignore                                     |   14 -
 doc/Makefile.am                                    |   10 +-
 doc/Makefile.in                                    |   28 +-
 doc/automake.texi                                  |  922 ++++++--
 lib/.cvsignore                                     |    1 -
 lib/Automake/.cvsignore                            |    2 -
 lib/Automake/ChannelDefs.pm                        |    2 +-
 lib/Automake/Channels.pm                           |    4 +-
 lib/Automake/Config.in                             |    2 +-
 lib/Automake/Configure_ac.pm                       |    4 +-
 lib/Automake/FileUtils.pm                          |    2 +-
 lib/Automake/Makefile.in                           |   18 +-
 lib/Automake/Options.pm                            |    4 +
 lib/Automake/Rule.pm                               |   21 +-
 lib/Automake/Struct.pm                             |    4 +-
 lib/Automake/VarDef.pm                             |   13 +-
 lib/Automake/Variable.pm                           |    4 +-
 lib/Automake/Version.pm                            |    4 +-
 lib/Automake/XFile.pm                              |    2 +-
 lib/Automake/tests/.cvsignore                      |    1 -
 lib/Automake/tests/Makefile.in                     |  120 +-
 lib/INSTALL                                        |    9 +-
 lib/Makefile.in                                    |   18 +-
 lib/am/.cvsignore                                  |    1 -
 lib/am/Makefile.in                                 |   18 +-
 lib/am/check.am                                    |   87 +-
 lib/am/configure.am                                |    9 +-
 lib/am/distdir.am                                  |    6 +-
 lib/am/install.am                                  |   22 +-
 lib/am/java.am                                     |    2 +-
 lib/am/lisp.am                                     |   25 +-
 lib/am/remake-hdr.am                               |    8 +-
 lib/config-ml.in                                   |   31 +-
 lib/config.guess                                   |  219 +-
 lib/config.sub                                     |  162 +-
 lib/depcomp                                        |   16 +-
 lib/install-sh                                     |   23 +-
 lib/mdate-sh                                       |   23 +-
 lib/texinfo.tex                                    | 1408 ++++++++-----
 lib/ylwrap                                         |   28 +-
 m4/.cvsignore                                      |    1 -
 m4/Makefile.in                                     |   18 +-
 m4/amversion.in                                    |    5 +-
 m4/amversion.m4                                    |    5 +-
 m4/auxdir.m4                                       |    4 +-
 m4/depend.m4                                       |    5 +-
 m4/dmalloc.m4                                      |    7 +-
 m4/gcj.m4                                          |    5 +-
 m4/install-sh.m4                                   |    5 +-
 m4/mkdirp.m4                                       |    5 +-
 m4/protos.m4                                       |    2 +
 m4/python.m4                                       |   12 +-
 m4/runlog.m4                                       |    4 +-
 m4/strip.m4                                        |    4 +-
 m4/upc.m4                                          |    4 +-
 tests/.cvsignore                                   |   10 -
 tests/Makefile.am                                  |  137 +-
 tests/Makefile.in                                  |  265 ++-
 tests/README                                       |   40 +-
 tests/acloca10.test                                |    5 +-
 tests/acloca14.test                                |   16 +-
 tests/acloca18.test                                |   27 +-
 tests/acloca19.test                                |    4 +-
 tests/aclocal.in                                   |    3 +-
 tests/aclocal.test                                 |    8 +-
 tests/aclocal5.test                                |    4 +-
 tests/aclocal6.test                                |   28 +-
 tests/aclocal8.test                                |    4 +-
 tests/all.test                                     |   25 +-
 tests/all2.test                                    |   34 +
 tests/alloca.test                                  |   12 +-
 tests/alloca2.test                                 |   12 +-
 tests/amhello-binpkg.test                          |   52 +
 tests/amhello-cflags.test                          |   51 +
 tests/amhello-cross-compile.test                   |   54 +
 tests/ansi.test                                    |    8 +-
 tests/ansi10.test                                  |    4 +-
 tests/ansi2.test                                   |    2 +-
 tests/ansi2knr-deprecation.test                    |   69 +
 tests/ansi3.test                                   |    4 +-
 tests/ansi3b.test                                  |    4 +-
 tests/ansi4.test                                   |    2 +-
 tests/ansi5.test                                   |    4 +-
 tests/ansi6.test                                   |    4 +-
 tests/ansi7.test                                   |    4 +-
 tests/ansi8.test                                   |    2 +-
 tests/ansi9.test                                   |    4 +-
 tests/ar.test                                      |    4 +-
 tests/ar2.test                                     |    8 +-
 tests/asm.test                                     |   77 +-
 tests/asm2.test                                    |   95 +-
 tests/asm3.test                                    |   90 +-
 tests/autodist-acconfig-no-subdir.test             |   58 +
 tests/autodist-acconfig.test                       |   46 +
 tests/autodist-aclocal-m4.test                     |   55 +
 tests/autodist-config-headers.test                 |   61 +
 tests/autodist-configure-no-subdir.test            |   72 +
 tests/autodist-no-duplicate.test                   |   52 +
 tests/autodist-stamp-vti.test                      |   60 +
 tests/autodist-subdir.test                         |  122 ++
 tests/autodist.test                                |  109 +
 tests/autohdr.test                                 |    2 +-
 tests/autohdr2.test                                |    2 +-
 tests/autohdr3.test                                |    2 +-
 tests/autohdr4.test                                |    2 +-
 tests/autohdrdry.test                              |   45 +
 tests/check-concurrency-bug9245.test               |   62 +
 tests/check-exported-srcdir.test                   |   65 +
 tests/check-tests-in-builddir.test                 |   94 +
 tests/check-tests_environment.test                 |   47 +
 tests/colon.test                                   |   10 +-
 tests/colon2.test                                  |   26 +-
 tests/colon3.test                                  |   36 +-
 tests/colon4.test                                  |   25 +-
 tests/colon5.test                                  |   27 +-
 tests/colon6.test                                  |   27 +-
 tests/colon7.test                                  |   16 +-
 tests/color.test                                   |    2 +-
 tests/color2.test                                  |    2 +-
 tests/comments-in-var-def.test                     |   58 +
 tests/compile2.test                                |    8 +-
 tests/compile_f_c_cxx.test                         |    2 +
 tests/cond13.test                                  |    2 +-
 tests/cond14.test                                  |    2 +-
 tests/cond23.test                                  |    2 +-
 tests/cond24.test                                  |    2 +-
 tests/cond25.test                                  |    2 +-
 tests/cond26.test                                  |    2 +-
 tests/cond27.test                                  |    2 +-
 tests/cond28.test                                  |    2 +-
 tests/cond29.test                                  |    2 +-
 tests/cond30.test                                  |    2 +-
 tests/cond31.test                                  |    2 +-
 tests/cond32.test                                  |    2 +-
 tests/cond33.test                                  |    2 +-
 tests/cond34.test                                  |    2 +-
 tests/cond35.test                                  |    2 +-
 tests/cond36.test                                  |    7 +-
 tests/cond37.test                                  |    2 +-
 tests/cond38.test                                  |    2 +-
 tests/cond39.test                                  |    2 +-
 tests/cond40.test                                  |    2 +-
 tests/cond41.test                                  |    2 +-
 tests/cond42.test                                  |    2 +-
 tests/cond43.test                                  |    2 +-
 tests/cond44.test                                  |    2 +-
 tests/cond45.test                                  |    2 +-
 tests/cond5.test                                   |    6 +-
 tests/condd.test                                   |    6 +-
 tests/condhook.test                                |   13 +-
 tests/condhook2.test                               |   49 +
 tests/condinc2.test                                |    4 +-
 tests/condman.test                                 |   14 +-
 tests/condman2.test                                |   17 +-
 tests/condman3.test                                |   65 +
 tests/conf2.test                                   |   38 -
 tests/confdeps.test                                |    2 +-
 tests/conff.test                                   |    4 +-
 tests/conff2.test                                  |   10 +-
 tests/confh.test                                   |   63 +-
 tests/confh4.test                                  |   15 +-
 tests/confh5.test                                  |   15 +-
 tests/confh6.test                                  |   49 +
 tests/confh7.test                                  |   47 +
 tests/confh8.test                                  |   68 +
 tests/config.test                                  |   46 -
 tests/configure.test                               |   31 +-
 tests/confincl.test                                |   19 +-
 tests/conflnk.test                                 |   14 +-
 tests/conflnk2.test                                |   13 +-
 tests/conflnk3.test                                |   23 +-
 tests/conflnk4.test                                |   17 +-
 tests/confsub.test                                 |   14 +-
 tests/confvar.test                                 |    8 +-
 tests/confvar2.test                                |    8 +-
 tests/cxxansi.test                                 |    2 +-
 tests/defs.in                                      |  211 ++-
 tests/depcomp.test                                 |    5 +-
 tests/depcomp10.test                               |   90 +
 tests/depcomp2.test                                |    9 +-
 tests/depcomp3.test                                |    9 +-
 tests/depcomp4.test                                |    9 +-
 tests/depcomp5.test                                |   11 +-
 tests/depcomp6.test                                |   46 +-
 tests/depcomp7.test                                |   44 +-
 tests/depcomp8a.test                               |   81 +
 tests/depcomp8b.test                               |   75 +
 tests/depcomp9.test                                |   92 +
 tests/dirforbid.test                               |   38 -
 ...include2.test => dist-included-parent-dir.test} |    0
 tests/distcheck-configure-flags-am.test            |   70 +
 tests/distcheck-configure-flags-subpkg.test        |   83 +
 tests/distcheck-configure-flags.test               |   56 +
 tests/distcheck-hook.test                          |   53 +
 tests/distcheck-hook2.test                         |   81 +
 tests/distlinksbrk.test                            |   31 +-
 tests/dmalloc.test                                 |   61 +
 tests/doc-parsing-buglets-colneq-subst.test        |   39 +
 tests/doc-parsing-buglets-tabs.test                |   61 +
 tests/dollarvar.test                               |    2 +-
 tests/dollarvar2.test                              |    2 +-
 tests/flibs.test                                   |    2 +
 tests/fn99.test                                    |    5 +-
 tests/fn99subdir.test                              |    5 +-
 tests/fort4.test                                   |    4 +-
 tests/fort5.test                                   |    2 +-
 tests/fpinst2.test                                 |   33 -
 tests/fpinstall.test                               |   33 -
 tests/gen-parallel-tests                           |   11 +-
 tests/{include.test => hdr-vars-defined-once.test} |    0
 tests/help-depend.test                             |   41 +
 tests/help-depend2.test                            |   42 +
 tests/help-dmalloc.test                            |   39 +
 tests/help-init.test                               |   39 +
 tests/help-lispdir.test                            |   42 +
 tests/help-maintainer.test                         |   61 +
 tests/help-multilib.test                           |   38 +
 tests/help-python.test                             |   37 +
 tests/help-regex.test                              |   38 +
 tests/help-silent.test                             |   45 +
 tests/help-upc.test                                |   38 +
 tests/help.test                                    |   28 +-
 tests/help2.test                                   |   53 +
 tests/help3.test                                   |   61 +
 tests/help4.test                                   |   55 +
 tests/hfs.test                                     |    2 +-
 tests/install2.test                                |    5 +-
 tests/instdir-java.test                            |    3 +-
 tests/instdir-texi.test                            |    9 +-
 tests/instfail-java.test                           |    3 +-
 tests/insthook.test                                |    4 +-
 tests/instmany-mans.test                           |    5 +-
 tests/instmany-python.test                         |    4 +-
 tests/instmany.test                                |    4 +-
 tests/instsh2.test                                 |   36 +-
 tests/instspc.test                                 |    8 +-
 tests/interp.test                                  |   18 +-
 tests/java-check.test                              |   66 +
 tests/java-empty-classpath.test                    |   90 +
 tests/java.test                                    |    3 +-
 tests/java3.test                                   |   26 +-
 tests/lex-subobj-nodep.test                        |   73 +
 tests/lex3.test                                    |    2 +-
 tests/lflags.test                                  |    4 +
 tests/lflags2.test                                 |    4 +
 tests/libobj14.test                                |    2 +-
 tests/libobj8.test                                 |    2 +-
 tests/libtool4.test                                |    9 +-
 tests/lispdry.test                                 |   60 +
 tests/ltinit.test                                  |   64 +
 tests/m4-inclusion.test                            |   55 +
 tests/maintclean-vpath.test                        |  106 +
 tests/maintclean.test                              |   36 +-
 tests/man4.test                                    |    4 +-
 tests/mclean.test                                  |   31 -
 tests/mdate6.test                                  |   35 +
 tests/missing6.test                                |    9 +-
 tests/mkinst3.test                                 |    4 +-
 tests/mmode.test                                   |    5 +-
 tests/mmodely.test                                 |    5 +-
 tests/multlib.test                                 |    2 +-
 tests/parallel-tests-harderror.test                |   98 +
 tests/parallel-tests-log-compiler-example.test     |   71 +
 tests/parallel-tests-log-override-1.test           |  112 +
 tests/parallel-tests-log-override-2.test           |   88 +
 tests/parallel-tests-log-override-recheck.test     |   92 +
 tests/parallel-tests-subdir.test                   |   51 +
 tests/parallel-tests-unreadable-log.test           |   60 +
 tests/parallel-tests.test                          |   23 +-
 tests/parallel-tests8.test                         |    7 +-
 tests/percent.test                                 |    2 +-
 tests/percent2.test                                |    2 +-
 tests/phony.test                                   |    2 +-
 tests/pluseq11.test                                |   54 +
 tests/pr2.test                                     |   16 +-
 tests/pr204.test                                   |   11 +-
 tests/pr211.test                                   |   21 +-
 tests/pr220.test                                   |   15 +-
 tests/pr224.test                                   |   29 +-
 tests/pr229.test                                   |    6 +-
 tests/pr243.test                                   |   37 +-
 tests/pr266.test                                   |   30 +-
 tests/pr279-2.test                                 |   27 +-
 tests/pr279.test                                   |   21 +-
 tests/pr287.test                                   |   15 +-
 tests/pr300-lib.test                               |    6 +-
 tests/pr300-ltlib.test                             |    6 +-
 tests/pr300-prog.test                              |    6 +-
 tests/pr307.test                                   |   27 +-
 tests/pr401.test                                   |    5 +-
 tests/pr401b.test                                  |    5 +-
 tests/pr401c.test                                  |    5 +-
 tests/pr72.test                                    |   14 +-
 tests/pr8365-remake-timing.test                    |  110 +
 tests/pr87.test                                    |   27 +-
 tests/pr9.test                                     |   47 +-
 tests/prefix.test                                  |    8 +-
 tests/primary-prefix-couples-documented-valid.test |   88 +
 tests/primary-prefix-couples-force-valid.test      |   88 +
 tests/primary-prefix-invalid-couples.test          |  187 ++
 tests/primary-prefix-valid-couples.test            |   90 +
 tests/primary.test                                 |    8 +-
 tests/primary2.test                                |    7 +-
 tests/primary3.test                                |    4 +-
 tests/proginst.test                                |    9 +-
 tests/remake-subdir-from-subdir.test               |   56 +
 tests/remake-subdir-gnu.test                       |   80 +
 tests/remake-subdir-long-time.test                 |  116 +
 tests/remake-subdir.test                           |   81 +
 tests/remake-subdir2.test                          |   82 +
 tests/self-check-env-sanitize.test                 |   30 +
 tests/self-check-report.test                       |   47 +
 tests/silent-configsite.test                       |   86 +
 tests/silent-lex-gcc.test                          |  143 ++
 tests/silent-lex-generic.test                      |  143 ++
 tests/silent-many-gcc.test                         |  220 ++
 tests/silent-many-generic.test                     |  222 ++
 tests/silent-yacc-gcc.test                         |  145 ++
 tests/silent-yacc-generic.test                     |  145 ++
 tests/silent.test                                  |    2 +-
 tests/silent2.test                                 |    2 +-
 tests/silent3.test                                 |    4 +-
 tests/silent4.test                                 |    4 +-
 tests/silent5.test                                 |  215 --
 tests/silent6.test                                 |    2 +-
 tests/silent7.test                                 |    2 +-
 tests/silent9.test                                 |    4 +-
 tests/silentcxx.test                               |    2 +-
 tests/silentf77.test                               |    9 +-
 tests/silentf90.test                               |    9 +-
 tests/silentlex.test                               |  142 --
 tests/silentyacc.test                              |  144 --
 tests/sinclude.test                                |   61 -
 tests/specflg-dummy.test                           |  248 +++
 tests/specflg8.test                                |   35 +-
 tests/spy.test                                     |   20 +-
 tests/strip2.test                                  |   54 +
 tests/strip3.test                                  |   54 +
 tests/subdir5.test                                 |   28 +-
 tests/subdir8.test                                 |   23 +-
 tests/subdir9.test                                 |    2 -
 tests/subobj.test                                  |    4 +-
 tests/subobj10.test                                |    8 +-
 tests/subobj11a.test                               |   82 +
 tests/subobj11b.test                               |   87 +
 tests/subobj11c.test                               |   53 +
 tests/subobj2.test                                 |    6 +-
 tests/subobj3.test                                 |   17 +-
 tests/subobj4.test                                 |   15 +-
 tests/subobj5.test                                 |   17 +-
 tests/subobj6.test                                 |   12 +-
 tests/subobj7.test                                 |    8 +-
 tests/subobj8.test                                 |   27 +-
 tests/subobj9.test                                 |   26 +-
 tests/subobjname.test                              |    4 +-
 tests/substref.test                                |    4 +-
 tests/suffix13.test                                |    7 +-
 tests/suffix7.test                                 |    2 +-
 tests/tests-environment-backcompat.test            |   61 +
 tests/txinfo.test                                  |   32 +-
 tests/txinfo16.test                                |   11 +-
 tests/txinfo18.test                                |   16 +-
 tests/txinfo2.test                                 |   22 +-
 tests/txinfo21.test                                |    8 +-
 tests/txinfo22.test                                |   20 +-
 tests/txinfo23.test                                |   14 +-
 tests/txinfo24.test                                |   10 +-
 tests/txinfo25.test                                |   15 +-
 tests/txinfo29.test                                |   17 +-
 tests/txinfo3.test                                 |   14 +-
 tests/txinfo30.test                                |    4 +-
 tests/txinfo4.test                                 |    7 +-
 tests/txinfo5.test                                 |   13 +-
 tests/txinfo5b.test                                |   44 +
 tests/txinfo6.test                                 |   13 +-
 tests/txinfo7.test                                 |   12 +-
 tests/txinfo8.test                                 |   49 +-
 tests/txinfo9.test                                 |   22 +-
 tests/vala-vpath.test                              |   58 +
 tests/vtexi.test                                   |   34 +-
 tests/vtexi2.test                                  |    8 +-
 tests/vtexi3.test                                  |  126 ++
 tests/vtexi4.test                                  |  118 +
 tests/yacc-dist-nobuild-subdir.test                |   93 +
 tests/yacc5.test                                   |   11 +-
 tests/yaccdry.test                                 |   60 +
 tests/yflags.test                                  |    6 +-
 tests/yflags2.test                                 |    6 +-
 406 files changed, 14777 insertions(+), 3528 deletions(-)
 delete mode 100644 .cvsignore
 delete mode 100644 doc/.cvsignore
 delete mode 100644 lib/.cvsignore
 delete mode 100644 lib/Automake/.cvsignore
 delete mode 100644 lib/Automake/tests/.cvsignore
 delete mode 100644 lib/am/.cvsignore
 delete mode 100644 m4/.cvsignore
 delete mode 100644 tests/.cvsignore
 create mode 100755 tests/all2.test
 create mode 100755 tests/amhello-binpkg.test
 create mode 100755 tests/amhello-cflags.test
 create mode 100755 tests/amhello-cross-compile.test
 create mode 100755 tests/ansi2knr-deprecation.test
 create mode 100755 tests/autodist-acconfig-no-subdir.test
 create mode 100755 tests/autodist-acconfig.test
 create mode 100755 tests/autodist-aclocal-m4.test
 create mode 100755 tests/autodist-config-headers.test
 create mode 100755 tests/autodist-configure-no-subdir.test
 create mode 100755 tests/autodist-no-duplicate.test
 create mode 100755 tests/autodist-stamp-vti.test
 create mode 100755 tests/autodist-subdir.test
 create mode 100755 tests/autodist.test
 create mode 100755 tests/autohdrdry.test
 create mode 100755 tests/check-concurrency-bug9245.test
 create mode 100755 tests/check-exported-srcdir.test
 create mode 100755 tests/check-tests-in-builddir.test
 create mode 100755 tests/check-tests_environment.test
 create mode 100755 tests/comments-in-var-def.test
 create mode 100755 tests/condhook2.test
 create mode 100755 tests/condman3.test
 delete mode 100755 tests/conf2.test
 create mode 100755 tests/confh6.test
 create mode 100755 tests/confh7.test
 create mode 100755 tests/confh8.test
 delete mode 100755 tests/config.test
 create mode 100755 tests/depcomp10.test
 create mode 100755 tests/depcomp8a.test
 create mode 100755 tests/depcomp8b.test
 create mode 100755 tests/depcomp9.test
 delete mode 100755 tests/dirforbid.test
 rename tests/{include2.test => dist-included-parent-dir.test} (100%)
 create mode 100755 tests/distcheck-configure-flags-am.test
 create mode 100755 tests/distcheck-configure-flags-subpkg.test
 create mode 100755 tests/distcheck-configure-flags.test
 create mode 100755 tests/distcheck-hook.test
 create mode 100755 tests/distcheck-hook2.test
 create mode 100755 tests/dmalloc.test
 create mode 100755 tests/doc-parsing-buglets-colneq-subst.test
 create mode 100755 tests/doc-parsing-buglets-tabs.test
 delete mode 100755 tests/fpinst2.test
 delete mode 100755 tests/fpinstall.test
 rename tests/{include.test => hdr-vars-defined-once.test} (100%)
 create mode 100755 tests/help-depend.test
 create mode 100755 tests/help-depend2.test
 create mode 100755 tests/help-dmalloc.test
 create mode 100755 tests/help-init.test
 create mode 100755 tests/help-lispdir.test
 create mode 100755 tests/help-maintainer.test
 create mode 100755 tests/help-multilib.test
 create mode 100755 tests/help-python.test
 create mode 100755 tests/help-regex.test
 create mode 100755 tests/help-silent.test
 create mode 100755 tests/help-upc.test
 create mode 100755 tests/help2.test
 create mode 100755 tests/help3.test
 create mode 100755 tests/help4.test
 create mode 100755 tests/java-check.test
 create mode 100755 tests/java-empty-classpath.test
 create mode 100755 tests/lex-subobj-nodep.test
 create mode 100755 tests/lispdry.test
 create mode 100755 tests/ltinit.test
 create mode 100755 tests/m4-inclusion.test
 create mode 100755 tests/maintclean-vpath.test
 delete mode 100755 tests/mclean.test
 create mode 100755 tests/mdate6.test
 create mode 100755 tests/parallel-tests-harderror.test
 create mode 100755 tests/parallel-tests-log-compiler-example.test
 create mode 100755 tests/parallel-tests-log-override-1.test
 create mode 100755 tests/parallel-tests-log-override-2.test
 create mode 100755 tests/parallel-tests-log-override-recheck.test
 create mode 100755 tests/parallel-tests-subdir.test
 create mode 100755 tests/parallel-tests-unreadable-log.test
 create mode 100755 tests/pluseq11.test
 create mode 100755 tests/pr8365-remake-timing.test
 create mode 100755 tests/primary-prefix-couples-documented-valid.test
 create mode 100755 tests/primary-prefix-couples-force-valid.test
 create mode 100755 tests/primary-prefix-invalid-couples.test
 create mode 100755 tests/primary-prefix-valid-couples.test
 create mode 100755 tests/remake-subdir-from-subdir.test
 create mode 100755 tests/remake-subdir-gnu.test
 create mode 100755 tests/remake-subdir-long-time.test
 create mode 100755 tests/remake-subdir.test
 create mode 100755 tests/remake-subdir2.test
 create mode 100755 tests/self-check-env-sanitize.test
 create mode 100755 tests/self-check-report.test
 create mode 100755 tests/silent-configsite.test
 create mode 100755 tests/silent-lex-gcc.test
 create mode 100755 tests/silent-lex-generic.test
 create mode 100755 tests/silent-many-gcc.test
 create mode 100755 tests/silent-many-generic.test
 create mode 100755 tests/silent-yacc-gcc.test
 create mode 100755 tests/silent-yacc-generic.test
 delete mode 100755 tests/silent5.test
 delete mode 100755 tests/silentlex.test
 delete mode 100755 tests/silentyacc.test
 delete mode 100755 tests/sinclude.test
 create mode 100755 tests/specflg-dummy.test
 create mode 100755 tests/strip2.test
 create mode 100755 tests/strip3.test
 create mode 100755 tests/subobj11a.test
 create mode 100755 tests/subobj11b.test
 create mode 100755 tests/subobj11c.test
 create mode 100755 tests/tests-environment-backcompat.test
 create mode 100755 tests/txinfo5b.test
 create mode 100755 tests/vala-vpath.test
 create mode 100755 tests/vtexi3.test
 create mode 100755 tests/vtexi4.test
 create mode 100755 tests/yacc-dist-nobuild-subdir.test
 create mode 100755 tests/yaccdry.test

diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 0151972..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-Makefile
-aclocal
-automake
-config.cache
-config.log
-config.status
-configure.scan
-*.log
-log
-diffs
-*.patch
-*.tar.*
-autom4te.cache
-Fetchdir
diff --git a/ChangeLog b/ChangeLog
index 7594302..4e1c067 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,2268 @@
+2011-09-05  Peter Rosin  <address@hidden>
+
+       * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
+
+2011-09-04  Stefano Lattarini  <address@hidden>
+
+       fix: list test 'vala-vpath.test' in XFAIL_TESTS
+       * tests/Makefile.am (XFAIL_TESTS): Update.
+
+2011-09-02  Stefano Lattarini  <address@hidden>
+
+       tests: simplify wrapper for aclocal
+       * tests/aclocal.in: Remove use of $ACLOCAL_TESTSUITE_FLAGS and
+       extra `-I' flags; they are not really required, since the file
+       `m4/amversion.m4' is generated in the srcdir anyway.
+       * tests/acloca10.test: Remove use of $ACLOCAL_TESTSUITE_FLAGS.
+       * tests/acloca18.test: Likewise.
+       * tests/defs.in: Don't nullify $ACLOCAL_TESTSUITE_FLAGS, and do
+       not export it.
+
+2011-09-02  Stefano Lattarini  <address@hidden>
+
+       coverage: vala support failing for VPATH from-scratch builds
+       * tests/vala-vpath.test: New test, xfailing.
+       * tests/Makefile.am (TESTS): Update.
+       * THANKS: Update.
+       From a report by Zbigniew Jędrzejewski-Szmek.
+       Related to automake bug#8753.
+
+2011-09-01  Stefano Lattarini  <address@hidden>
+
+       docs: report few more automake parsing limitations
+       Partly motivated by automake bug#8360.
+       * doc/automake.texi (General Operation): Report few more automake
+       limitations w.r.t. parsing of unusual makefile constructs.  Related
+       minor reorderings.
+       * tests/doc-parsing-buglets-colneq-subst.test: New test.
+       * tests/doc-parsing-buglets-tabs.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-08-25  Stefano Lattarini  <address@hidden>
+
+       tests: list "forgotten" test script in TESTS
+       * tests/Makefile.am (TESTS): Also list ...
+       * tests/java-empty-classpath.test: ... this test.  Since we are
+       at it, remove trailing whitespace from a couple of lines.
+
+2011-08-25  Eric Blake  <address@hidden>
+
+       ylwrap: fix unusual indentation whitespace
+       * lib/ylwrap: Convert tabs to spaces.
+       Reported by Karl Berry.
+
+2011-08-17  Stefano Lattarini  <address@hidden>
+
+       * THANKS (Daniel Richard G.): Update e-mail address.
+
+2011-08-16  Daniel Richard G. <address@hidden>  (tiny change)
+           Stefano Lattarini  <address@hidden>
+
+       java: avoid compilation errors when CLASSPATH is empty
+       * lib/am/java.am (CLASSPATH_ENV): When redefining `$CLASSPATH',
+       do not append an empty component in case the previous value of
+       CLASSPATH is empty or unset.
+       * tests/java-empty-classpath.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       Fixes automake bug#9306.
+
+2011-08-16  Stefano Lattarini  <address@hidden>
+
+       parallel-tests: no more spurious successes for FreeBSD make
+       Work around a bug of FreeBSD make bug that was causing the
+       automake-generated "check" target to complete with success
+       even if some tests failed; this happened only when FreeBSD
+       make was run in concurrent mode (as in, e.g., "make -j2
+       check").  The bug is not present in NetBSD make.
+       This change fixes automake bug#9245:
+        <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
+       See also FreeBSD PR bin/159730:
+        <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>
+       * lib/am/check.am [%?PARALLEL_TESTS%] $(TEST_SUITE_LOG): Use a
+       more "safe" (and apparently redundant) idiom to exit with error,
+       so that the non-zero exit status is picked up also by FreeBSD
+       make when it's running in concurrent mode.
+       * NEWS: Update.
+       * tests/check-concurrency-bug9245.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-08-11  Stefano Lattarini  <address@hidden>
+
+       hacking: we now require autoconf 2.68
+       * HACKING ("Working in git"): Use autoconf and autom4te 2.68,
+       not 2.67, in the examples.
+
+2011-08-08  Stefano Lattarini  <address@hidden>
+
+       test defs: more environment cleanup
+       * tests/defs.in: Also unset variables AM_COLOR_TESTS and
+       AM_TESTS_ENVIRONMENT.
+
+2011-08-08  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failure with Solaris make
+       * tests/distcheck-configure-flags-am.test: Avoid using `+=' too
+       liberally with AM_DISTCHECK_CONFIGURE_FLAGS, since the line breaks
+       so introduced, in conjunction with single quotes, might confuse
+       Solaris make.
+
+2011-08-03  Stefano Lattarini  <address@hidden>
+
+       maintcheck: fix maintainer-check failures, both real and spurious
+       * tests/amhello-binpkg.test: Use "$MAKE", not bare "make".
+       * Makefile.am (sc_perl_local): Also allow perl special variable
+       `$~' to be localized.  And be slightly laxer in the regexp, to
+       allow for usages like "local $_ = $foo;".
+       (sc_tests_overriding_macros_on_cmdline): Also allow for command
+       line overriding of the `DISABLE_HARD_ERRORS' make variable.  Try
+       to avoid false positives for usages like "$MAKE || st=$?".
+
+2011-08-03  Bruno Haible  <address@hidden>
+
+       docs: how to use '-I' option in AM_CPPFLAGS for best VPATH support
+       * doc/automake.texi (Program Variables): Recommend -I options to
+       both the build directory and the source directory when needed.
+
+2011-07-23  Stefano Lattarini  <address@hidden>
+
+       tests: relax a test on amhello examples to cater to Solaris tar
+       * tests/amhello-binpkg.test: When the tar implementation in use
+       is not GNU tar, relax the tests on tar output, to avoid spurious
+       failures.  For example, "tar cvf ..." with GNU tar can output
+       lines like "./usr/bin/hello" on the standard output, while with
+       Solaris tar it can output lines like "a ./usr/bin/hello 8K" on
+       standard output, and with Heirloom tar it can output lines like
+       "a ./usr/bin/hello 15 tape blocks" on standard error.
+
+2011-07-15  Benoit Sigoure  <address@hidden>
+
+       docs: add references between the 2 sections on java support
+       * doc/automake.texi (Java Support, Java): Add cross-references.
+
+2011-07-20  Ralf Wildenhues  <address@hidden>
+
+       Sync auxiliary files from upstream.
+       * INSTALL, lib/INSTALL, lib/config.guess, lib/config.sub,
+       lib/texinfo.tex: Sync from upstream.
+
+2011-07-08  Stefano Lattarini  <address@hidden>
+
+       tests: fix weakness in 'tests-environment-backcompat.test'
+       * tests/tests-environment-backcompat.test: Do not override the
+       content of xfailing test `baz.test' with a "weaker" version that
+       fails unconditionally: the test must fail only when the 'strict'
+       pragma is in use, in order not to reduce coverage.
+
+2011-07-08  Stefano Lattarini  <address@hidden>
+
+       docs, tests: synchronize examples on silent-rules from config.site
+       * doc/automake.texi (Automake silent-rules Option): Reference test
+       'silent-configsite.test' in comments.
+
+2011-07-08  Stefano Lattarini  <address@hidden>
+
+       tests: portability fixes in tests on amhello examples
+       * tests/amhello-binpkg.test: Don't use "tar xzf too.tag.gz" to
+       extract a gzip-compressed tarball, that's unportable to some
+       tar implementations; use the "gzip -dc fo.tar.gz | tar xf -"
+       idiom instead.
+       * tests/amhello-cflags.test: Likewise.
+       * tests/amhello-cross-compile.test: Likewise.
+       Suggestion from Ralf Wildenhues.
+
+2011-07-04  Stefano Lattarini  <address@hidden>
+
+       remake: add test ensuring that slower remakes don't hang
+       * tests/remake-subdir-long-time.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       Suggestion by Ralf Wildenhues.
+
+2011-07-04  Stefano Lattarini  <address@hidden>
+
+       remake: fix outdated comment in configure.am
+       * lib/am/configure.am: Fix comment falsified by changes in
+       commit `v1.11-366-gbee9871'.
+       Suggestion by Ralf Wildenhues.
+
+2011-07-01  Stefano Lattarini  <address@hidden>
+
+       docs, tests: synchronize examples from docs to tests
+       * tests/README (Writing test cases): Give suggestions on how to
+       keep test cases and examples in the documentation synchronized.
+       * doc/automake.texi: Improve or fix existing testcase-referencing
+       comments, and add many new ones.
+       * HACKING (Administrivia): Suggest to test complex examples and
+       idioms from the manual.
+       * tests/specflg8.test: Improve synchronization with the example
+       in the manual.
+       * tests/output11.test:Likewise.
+       * tests/txinfo21.test:Likewise.
+       * tests/interp.test: Likewise.  Since we are at it, and enable
+       the `errexit' shell flag, do related changes, and add trailing
+       `:'command.
+       * tests/amhello-cflags.test: New test.
+       * tests/amhello-cross-compile.test: Likewise.
+       * tests/amhello-binpkg.test: Likewise.
+       * tests/tests-environment-backcompat.test: Likewise.
+       * tests/parallel-tests-log-compiler-example.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-06-23  Stefano Lattarini  <address@hidden>
+
+       docs: avoid a footnote, some related rewordings and improvements
+       * doc/automake.texi (Dist): Reword the part about automatically
+       distributed files to avoid a footnote.  Since we are at it, extend
+       a bit, and add an example and a reference to a relevant test case.
+
+2011-06-23  Stefano Lattarini  <address@hidden>
+
+       docs: minor cosmetic fixes
+       * doc/automake.texi: Break few overly long lines, throughout the
+       file.
+       ("Simple Tests"): Move @vindex for XFAIL_TESTS to the correct
+       position, i.e., before and not after the paragraph where it is
+       introduced.
+       ("Options" @item ansi2knr): Use @pxref instead of @xref.  This
+       fixes a texinfo warning.
+       ("Other things Automake recognizes" @item AM_C_PROTOTYPES): Use
+       @pxref instead of @ref.
+
+2011-06-23  Stefano Lattarini  <address@hidden>
+
+       help: improve text about automatically-distributed files
+       This change fixes automake bug#7819.
+       * automake.in (usage): Distinguish between files that are always
+       automatically distributed when found, and those which are only
+       "under certain conditions".
+       * doc/automake.texi (Basics of Distribution): Update accordingly.
+       * tests/autodist-subdir.test: Update.
+       * tests/autodist-no-duplicate.test: Likewise.
+       * tests/autodist.test: Likewise.
+       (configure.in): Remove useless call to AM_MAINTAINER_MODE.
+
+2011-06-23  Stefano Lattarini  <address@hidden>
+
+       refactor: split 'usage' subroutine in automake
+       This change is related to automake bug#7819.
+       * automake.in (print_autodist_files): New subroutine,
+       extracted from ...
+       (usage): ... this, which now uses it.
+       * tests/autodist-no-duplicate.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-06-23  Stefano Lattarini  <address@hidden>
+
+       tests: fix bug in 'autodist.test'
+       * tests/autodist.test: Avoid spurious failure due to no
+       `defs-static' file being found in the parent directory.
+
+2011-06-21  Stefano Lattarini  <address@hidden>
+
+       maintcheck: extend 'sc_tests_plain_*' checks
+       * Makefile.am (sc_tests_plain_autom4te): New check.
+       (sc_tests_plain_autoreconf): Likewise.
+       (sc_tests_plain_autoheader): Likewise.
+       (syntax_check_rules): Update.
+
+2011-06-20  Stefano Lattarini  <address@hidden>
+
+       maintcheck: avoid few spurious failures
+       * Makefile.am (sc_tests_plain_aclocal, sc_tests_plain_perl,
+       sc_tests_plain_autoconf, sc_tests_plain_automake,
+       sc_tests_plain_autoupate): Be stricter in matching an erroneous
+       literal command, i.e., `aclocal', `automake', `perl', etc.
+
+2011-06-20  Bert Wesarg <address@hidden>  (tiny change)
+
+       check: don't use multi-line coloring for the report
+       "less -R" can't handle multi-line coloring as it is done for the
+       check reports of the serial and parallel testsuite, because of
+       performance reasons.  Thus, color each line of the check report
+       by its own.
+       * lib/am/check.am (am__text_box): Accept colors for lines, and
+       color each line by its own.
+       [%?PARALLEL_TESTS%] $(TEST_SUITE_LOG): Let am__text_box handle
+       the line coloring.
+       [!%?PARALLEL_TESTS%] $(check-TESTS): Color each report line by
+       its own.
+       * THANKS: Update.
+
+2011-06-18  Stefano Lattarini  <address@hidden>
+
+       docs: AM_DISTCHECK_CONFIGURE_FLAGS is for corner cases
+       * doc/automake.texi (Checking the Distribution): Explain that the
+       developers should take care of making their code buildable without
+       requiring any special configure options, so that in general
+       AM_DISTCHECK_CONFIGURE_FLAGS shouldn't be used.  Give an example
+       of where its use is legitimate.
+       Suggestions from Ralf Wildenhues and Eric Blake.
+
+2011-06-14  Stefano Lattarini  <address@hidden>
+
+       ansi2knr: deprecate, it will go away in the next major release
+       * doc/automake.texi: Loudly and repeatedly state that the old
+       de-ANSI-fication features are now deprecated and will be removed
+       in the next major Automake release.  Other related adjustments.
+       * lib/Automake/Options.pm (_process_option_list ): Give a warning
+       in the `obsolete' category when the `ansi2knr' option is used.
+       * m4/protos.m4 (AM_C_PROTOTYPES): Deprecate this macro: a warning
+       in the `obsolete' category will be emitted it if is used.
+       * tests/ansi2knr-deprecation.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * tests/ansi.test: Adjust, by calling autoconf and/or automake
+       with the `-Wno-obsolete' flag.
+       * tests/ansi10.test: Likewise.
+       * tests/ansi2.test: Likewise.
+       * tests/ansi3.test: Likewise.
+       * tests/ansi3b.test: Likewise.
+       * tests/ansi4.test: Likewise.
+       * tests/ansi5.test: Likewise.
+       * tests/ansi6.test: Likewise.
+       * tests/ansi7.test: Likewise.
+       * tests/ansi8.test: Likewise.
+       * tests/ansi9.test: Likewise.
+       * tests/cxxansi.test: Likewise.
+       * tests/libobj8.test: Likewise.
+       * NEWS: Update about the future planned backward-incompatibility
+       due to the removal of de-ANSI-fication feature.
+
+2011-06-19  Stefano Lattarini  <address@hidden>
+
+       docs: primary/prefix combination "pkglib_PROGRAMS" is now invalid
+       * doc/automake.texi (Program Sources): pkglib_PROGRAMS is not a
+       valid combination anymore, so don't document it.  Inconsistency
+       introduced in commit `v1.11-373-g9ca6326'.
+
+2011-06-19  Jim Meyering  <address@hidden>
+
+       docs: replace obsolete @vindex entry with a useful one
+       * doc/automake.texi (Program Sources): Do not index obsolete
+       pkglib_PROGRAMS here.  Do index pkglibexec_PROGRAMS.
+
+2011-06-13  Stefano Lattarini  <address@hidden>
+
+       tests: optimize tests on primary/prefix mismatch for speed
+       * tests/primary-prefix-invalid-couples.test: Partial rewrite, in
+       order to use just a single automake invocation rather than one
+       invocation for each invalid primary/prefix couple.  This improves
+       the test script execution time by an order of magnitude.
+       Since we are at it, throw in some other improvements to avoid
+       unrelated automake warnings and failures that could potentially
+       cause false positives w.r.t. the automake exit status.
+
+2011-06-13  Stefano Lattarini  <address@hidden>
+
+       news: update w.r.t. introduction of AM_DISTCHECK_CONFIGURE_FLAGS
+       * NEWS (Miscellaneous changes): Update.
+
+2011-06-10  Stefano Lattarini  <address@hidden>
+
+       maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
+       * Makefile.am (sc_tests_overriding_macros_on_cmdline): It's now
+       acceptable that the test scripts override DISTCHECK_CONFIGURE_FLAGS
+       on the make command line.  Update comments accordingly.  Since we
+       are at it, make the relevant grepping rules slightly tighter.
+
+2011-06-10  Stefano Lattarini  <address@hidden>
+
+       distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
+       * doc/automake.texi (Checking the Distribution): Suggest to use
+       AM_DISTCHECK_CONFIGURE_FLAGS, not DISTCHECK_CONFIGURE_FLAGS, to
+       define (in the top-level Makefile.am) extra flags to be passed
+       to configure at "make distcheck" time; DISTCHECK_CONFIGURE_FLAGS
+       should be reserved for the user.  Add proper address@hidden' directive.
+       Document that AM_DISTCHECK_CONFIGURE_FLAGS is not honoured in a
+       subpackage Makefile.am, but the flags in it are passed down to
+       the configure script of the subpackage.
+       * lib/am/distdir.am (distcheck): Also pass the flags in
+       $(AM_DISTCHECK_CONFIGURE_FLAGS) to the configure invocation.
+       Update comments.
+       * tests/defs.in.test (AM_DISTCHECK_CONFIGURE_FLAGS,
+       DISTCHECK_CONFIGURE_FLAGS): Unset in case they are exported in
+       the environment, they might improperly influence our testsuite.
+       * tests/distcheck-configure-flags.test: New test.
+       * tests/distcheck-configure-flags-am.test: Likewise.
+       * tests/distcheck-configure-flags-subpkg.test: Likewise.
+       * distcheck-hook.test: Likewise.
+       * distcheck-hook2.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+       Closes automake bug#8784.
+
+2010-06-09  Stefano Lattarini  <address@hidden>
+
+       docs: better documentation for silent make rules
+       * doc/automake.texi (Options): Detailed description of the
+       automake option `silent-rules' moved from here ...
+       (Silent Make): ... into this new chapter, expanded, improved,
+       and subdivided into ...
+       (Make verbosity, Tricks For Silencing Make,
+       Automake silent-rules Option): ... these new sections.
+       (@menu, @detailmenu): Update.
+       * tests/silent-configsite.test: New test, checking that the
+       user can control default mode of silent-rules from config.site,
+       as is documented in the manual.
+       * tests/Makefile.am (TESTS): Updated.
+
+2011-06-11  Stefano Lattarini  <address@hidden>
+
+       Warnings about primary/prefix mismatch fixed and extended.
+       * automake.in (%standard_prefix): Add `doc' and `locale'.
+       Rename `pkgdatadir' to `pkgdata'.  Similarly for`pkglibdir',
+       `pkgincludedir' and `pkglibexecdir'.
+       (handle_programs): List `pkglibexec', not `pkglib', among the
+       prefixes valid for the `PROGRAMS' primary.
+       (handle_data): List also `doc' among the prefixes valid for
+       the `DATA' primary.  This is required by automake's own build
+       system.
+       * tests/dirforbid.test: Test removed, superseded by ...
+       * tests/primary-prefix-invalid-couples.test: ... this new test.
+       * tests/primary-prefix-valid-couples.test: New test.
+       * tests/primary-prefix-couples-documented-valid.test: Likewise.
+       * tests/primary-prefix-couples-force-valid.test: Likewise.
+       * tests/java3.test: Adjusted, and extended a bit.
+       * tests/Makefile.am (TESTS): Updated.
+       * NEWS: Updated.
+       From a report by Eric Blake.
+
+2011-06-08  Stefano Lattarini  <address@hidden>
+
+       test defs: new function 'fatal_', for hard errors
+       Before this patch, the only way offered by tests/defs to
+       properly signal a hard error was the `framework_failure_'
+       function.  But the error message issued by that function,
+       as its name would suggest, refers to a set-up failure in the
+       testsuite, while hard errors can obviously also be due to
+       other reasons.  The best way to fix this inconsistency is to
+       introduce a new function with a more general error message.
+       Inspired by a recent similar change to Gnulib's tests/init.sh.
+       * tests/defs.in (fatal_): New function.
+       * tests/README (Section "Writing test cases" subsection "Do"):
+       Suggest the use of `fatal_', not of `framework_failure_', for
+       generic hard errors.  The latter should be reserved for "real"
+       set-up failures.
+
+2011-06-02  Stefano Lattarini  <address@hidden>
+
+       maintcheck: fix some failures, extend some checks
+       * Makefile.am (sc_diff_automake_in_automake): Update, as we
+       now expect 9 lines, not 8, to be changed from `automake.in'
+       to `automake'.
+       (sc_diff_aclocal_in_aclocal): New maintainer check, similar to
+       the above, and checking that only 10 lines are changed from
+       `aclocal.in' to `aclocal'.
+       (syntax_check_rules): Update.
+       (sc_tests_Exit_not_exit): Exempt self tests `self-check-*.test'
+       from this check, as they can legitimately use the bare `exit'
+       builtin in various places.
+       * doc/automake.texi (Python): Remove stray `@' from the end of
+       a line.  Typo introduced in commit `v1.11-312-g5bf7af6'.
+       * tests/depcomp8a.test: Pass DISTCHECK_CONFIGURE_FLAGS to make
+       from the environment rather than from the command line, to
+       pacify the `sc_tests_overriding_macros_on_cmdline' maintainer
+       check.
+       * tests/depcomp8b.test: Likewise.
+
+2011-05-29  Stefano Lattarini  <address@hidden>
+
+       remake: behave better with non-GNU make in subdirectories
+       Currently, with every decent make program, it is possible to
+       rebuild out-of-date autotools-generated files with a simple
+       "make Makefile" -- but for this to work reliably with non-GNU
+       make implementations, the command must be issued from the
+       top-level directory.  This patch removes such limitation.
+       * lib/am/configure.am (am--refresh): Depend on `%MAKEFILE%'.
+       * tests/defs.in (using_gmake): New function, backported from the
+       `master' branch (and simplified).
+       * tests/remake-subdir.test: New test.
+       * tests/remake-subdir2.test: Likewise.
+       * tests/remake-subdir-gnu.test: Likewise.
+       * tests/remake-subdir-from-subdir.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-05-29  Stefano Lattarini  <address@hidden>
+
+       automake, aclocal: honour configure-time AUTOCONF and AUTOM4TE
+       Currently, the Automake's own configure script allow definition
+       of AUTOCONF and AUTOM4TE, expected to point respectively to an
+       autoconf and autom4te programs.  But while these definitions are
+       honoured in the Automake's build systems and test suite, they
+       were *not* honoured in the generated `automake' and `aclocal'
+       scripts.  This behaviour, apart from being wrong in that it does
+       not allow the user enough freedom in choosing his tools, also
+       caused inconsistencies in the test suite, brining to spurious
+       failures.
+       Problem reported by Graham Reitz on the automake list; see thread:
+       <http://lists.gnu.org/archive/html/automake/2011-05/msg00022.html>
+       * automake.in ($traces): Use address@hidden', not simply `autoconf'.
+       * aclocal.in ($traces): Use address@hidden', not simply `autom4te'.
+       * Makefile.am (do_subst): Substitute also address@hidden' and
+       address@hidden'.
+       * NEWS: Update.
+       * THANKS: Update.
+
+2011-05-29  Stefano Lattarini  <address@hidden>
+
+       build: the user can override AUTOM4TE, AUTORECONF and AUTOUPDATE too
+       Our build system allows the user to override AUTOCONF and AUTOHEADER
+       at configure time, and honours these overrides in our testsuite.
+       But it didn't do the same with AUTOM4TE, AUTORECONF and AUTOUPDATE.
+       This change fixes that inconsistency.
+       * configure.ac (am_AUTOM4TE, am_AUTOUPDATE, am_AUTORECONF): New
+       AC_SUBSTitutions.  Update comments.
+       * tests/defs.in ($AUTOUPDATE): Default to address@hidden@' now.
+       ($AUTOM4TE): New variable, defaulting to address@hidden@'.
+       ($AUTORECONF): New variable, defaulting to address@hidden@'.
+       * doc/Makefile.am ($(srcdir)/amhello-1.0.tar.gz): Update.
+
+2011-05-22  Ralf Wildenhues  <address@hidden>
+           Stefano Lattarini  <address@hidden>
+
+       tests/README: fix example about `make -e' usage
+       * tests/README (Section "Writing test cases" subsection "Do"): When
+       some variable is never initialized in the Makefile, `-e' is not
+       necessary in order to override it.  DESTDIR is such a variable: we
+       ensure that we do not ever initialize it.  And as such, it is quite
+       portable to use:
+         $ make DESTDIR=/foo/bar install
+       and in fact, quite widely used.
+       So our example about when `make -e' is required, which references
+       the `DESTDIR' variable, is poorly chosen, if not downright wrong.
+       Rewrite it to use `prefix' as the overridden variable instead.
+
+2011-05-22  Stefano Lattarini  <address@hidden>
+
+       parallel-tests: stricter checks on DISABLE_HARD_ERRORS support
+       * tests/parallel-tests-harderror.test: New test, doing more
+       in-depth checks on DISABLE_HARD_ERRORS.
+       * tests/parallel-tests.test: Remove tests on DISABLE_HARD_ERRORS,
+       now redundant.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-05-20  Stefano Lattarini  <address@hidden>
+
+       testsuite: avoid re-running few tests with 'parallel-tests' option
+       Some tests in our testsuite use the 'simple-tests' driver only
+       marginally, or simply as a mean to conveniently check unrelated
+       invariants.  It makes little sense to force these tests to also
+       run with the 'parallel-tests' Automake option active, as doing so
+       offers no real gain in coverage, while often causing a measurable
+       overhead in execution time (for an already too-slow testsuite).
+       * tests/pr401.test (parallel_tests): Define to "no", to prevent
+       the generation of a sibling test script using the 'parallel-tests'
+       driver.
+       * tests/pr401b.test: Likewise.
+       * tests/pr401c.test: Likewise.
+
+2011-05-20  Stefano Lattarini  <address@hidden>
+
+       testsuite: allow tests to avoid the use of 'parallel-tests' option
+       * tests/gen-parallel-tests: Do not generate "siblings" for tests
+       that explicitly define the `parallel_tests', whether to "yes" or
+       to any other value.  Extend heading comments to give a rationale
+       for this behaviour.
+       * tests/README: Update.
+
+2011-05-20  Stefano Lattarini  <address@hidden>
+
+       tests/README: update obsoleted advice
+       * tests/README (Section "Writing test cases" subsection "Do"):
+       Do not suggest to use the `*-p.test' pattern for the names of
+       hand-written tests which use the `parallel-tests' Automake option.
+       Not only is this not respected by the existing tests, but it is
+       more likely to cause conflicts with auto-generated tests.
+       So, suggest to *avoid* using the `*-p.test' pattern in names
+       of hand-written tests instead.
+       (Section "Writing test cases" subsection "Do not"):  When
+       suggesting not to override Makefile variables using command
+       line arguments, do not use the badly outdated variables `U'
+       and 'ANSI2KNR' in the example; instead, use the more common
+       and typical `DESTDIR'.
+
+2011-05-19  Stefano Lattarini  <address@hidden>
+
+       test defs: rename requirement 'non-cross' -> 'native'
+       * tests/defs.in (non-cross): Rename requirement ...
+       (native): ... to this, which is clearer and fits the
+       existing lingo better.
+       Suggestion by Ralf Wildenhues.
+
+2011-05-15  Stefano Lattarini  <address@hidden>
+
+       testsuite: be more cross-compile friendly
+       * tests/defs.in (cross_compiling): New subroutine.
+       (am__tool_prefix): New internal variable.
+       (gcc, g++, gcj): Force the use of the correct "tool prefix"
+       when cross compiling.
+       (gfortran, g77, non-cross): New requirements.
+
+2011-05-11  Stefano Lattarini  <address@hidden>
+
+       check: document and test $(TEST_SUITE_LOG) overriding
+       * doc/automake.texi (Simple Tests using parallel-tests): Explain
+       how and why TEST_SUITE_LOG can be overridden at runtime.
+       * tests/parallel-tests-log-override-1.test: New test, check that
+       the newly documented idiom and similar usages are truly supported.
+       * tests/parallel-tests-log-override-2.test: Likewise.
+       * tests/parallel-tests-log-override-recheck.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-05-07  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failure of txinfo21.test on FreeBSD
+       * tests/txinfo21.test: Use the `is_newest' subroutine instead of
+       the `ls -t' hack to to determine whether a file has been updated.
+       This is required because at least FreeBSD `ls' do not sort files
+       with the same timestamp in alphabetical order when using the `-t'
+       option.
+
+2011-05-04  Stefano Lattarini  <address@hidden>
+
+       tests defs: allow requirements for compilers (mostly dummy)
+       Most of the new requirements that are now accepted in `$required'
+       as consequence of this patch are still dummy.  They are planned
+       to be implemented only in master (or in some derived branch), but
+       having them here (even just as no-op) will allow for an easier
+       integration/backporting of potential new testcases.
+       * tests/defs.in (cc, c++, fortran, fortran77): New requirements,
+       still dummy.
+       (flex): New requirement, picking LEX for configure.
+       (lex): New requirement, alias for `flex'.  A more appropriate
+       implementation, looking for a generic `lex' program, will follow
+       in the future.
+       (yacc): New requirement, alias for `bison'.  A more appropriate
+       implementation, looking for a generic `yacc' program, will follow
+       in the future.
+
+2011-04-24  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failure in a test on TESTS (VPATH-related)
+       * tests/check-tests-in-builddir.test: When not using the
+       parallel-tests option, do not check that VPATH components are
+       not present in the displayed test name, since the simple-tests
+       driver do not try to strip them.
+
+2011-04-23  Stefano Lattarini  <address@hidden>
+
+       test: self check subroutines for skipping/failing of tests
+       * tests/self-check-report.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-04-23  Jim Meyering  <address@hidden>
+           Stefano Lattarini  <address@hidden>
+
+       test defs: new subroutines for test skipping/failing
+       * tests/defs.in (Exit): Move definition of this function earlier.
+       (warn_, skip_, fail_, framework_failure_): New functions, inspired
+       to the homonyms in gnulib's tests/init.sh.
+       ($stderr_fileno_): New global variable, used by the new functions
+       above.
+       * tests/README: Updated.
+       From a suggestion by Ralf Wildenhues.
+
+2011-04-23  Stefano Lattarini  <address@hidden>
+
+       tests: fix typo (copy & paste blunder) in heading comment
+       * tests/maintclean-vpath.test: Correctly refer to the sister test
+       as `maintclean.test', not as `maintclean-vpath.test'.
+
+2011-04-23  Stefano Lattarini  <address@hidden>
+
+       tests: remove redundant test `mclean.test'
+       * tests/mclean.test: Remove, it's a weak grepping test completely
+       superseded by the much more complete `maintclean.test'.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-04-22  Stefano Lattarini  <address@hidden>
+
+       testsuite: more environment sanitization
+       * tests/defs.in: Sanity check: abort if any of `parallel_tests'
+       or `required' is in the environment.
+       ($sed_unindent_prog): Initialize to empty, to avoid interferences
+       from the environment.
+       * tests/self-check-me-in-env.test: Renamed to ...
+       * tests/self-check-env-sanitize.test: ... this, and extended.
+       * tests/Makefile.am (TESTS): Update.
+       (TESTS_ENVIRONMENT): Unset variables `parallel_tests' and
+       `required'.  Adjust comments.
+
+2011-04-18  Stefano Lattarini  <address@hidden>
+
+       tests: don't allow `$me' to be overridden from the environment
+       * tests/defs.in: Sanity check: abort if $me is in the environment.
+       * tests/self-check-me-in-env.test: New test.
+       * tests/Makefile.am (TESTS_ENVIRONMENT): Unset variable `me'.
+       (TESTS): Update.
+       Suggestion by Ralf Wildenhues.
+
+2011-04-17  Stefano Lattarini  <address@hidden>
+
+       test defs: allow overriding of `$me'
+       * tests/defs.in ($me): Allow overriding by the including test
+       script.  Add some explicative comments.
+
+2011-04-17  Stefano Lattarini  <address@hidden>
+
+       depcomp tests: don't reject slower dependency extractors
+       * tests/depcomp8b.test: Add the `--enable-dependency-tracking'
+       option to `configure' invocations, so that slower dependency
+       extractors are not rejected.
+       * tests/depcomp8a.test: Likewise.  Also ...
+       (foo.c): ... since we are at it, fix spacing to be consistent
+       with GNU coding standards.
+
+2011-04-17  Stefano Lattarini  <address@hidden>
+
+       m4: add missing serial numbers to a few files
+       Related to automake bug#8483.
+       * m4/amversion.in: Add serial number.
+       * m4/auxdir.m4: Likewise.
+       * m4/gcj.m4: Likewise.
+       * m4/install-sh.m4: Likewise.
+       * m4/mkdirp.m4: Likewise.
+       * m4/python.m4: Likewise.
+       * m4/runlog.m4: Likewise.
+       * m4/strip.m4: Likewise.
+       * m4/upc.m4: Likewise.
+
+2011-04-16  Jim Meyering  <address@hidden>
+
+       depcomp: correct invalid sed invocation
+       * lib/depcomp: Insert missing -e before '/:$/d'.
+       Otherwise, that use of sed would treat '/:$/d' as a file name.
+
+2011-04-14  Stefano Lattarini  <address@hidden>
+
+       maintainer check: quote literal `$' in Makefile rule
+       * Makefile.am (sc_tests_PATH_SEPARATOR): Escape literal `$'
+       character in double-quoted string.  Fix a bug in which the rule
+       emitted an erroneously empty substring in its error message.
+
+2011-04-12  Stefano Lattarini  <address@hidden>
+
+       coverage: test for automake bug#8485 (known regression)
+       * tests/yacc-dist-nobuild-subdir.test: New test.
+       * tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
+
+2011-04-12  Stefano Lattarini  <address@hidden>
+
+       test defs: define default $distdir (help reducing duplication)
+       * tests/defs.in ($distdir): New variable, might be used in
+       testcases checking distribution-related features.
+       * tests/pr9.test: Use it.
+       * tests/subdir9.test: Likewise.
+       * tests/vtexi3.test: Add comment explaining why we redefine
+       $distdir in this test.
+
+2011-04-11  Stefano Lattarini  <address@hidden>
+
+       depcomp: fix bugs in tests and in the depcomp script
+       * lib/depcomp (gcc): Remove duplicated `-e' from sed invocation.
+       * tests/depcomp10.test: Make it executable.  Fix a blunder that
+       has left part of an intended comment not prefixed by `#', thus
+       causing shell syntax errors.  In this same comment, break a
+       too-long reported error message on multiple lines, for clarity.
+       Add reference to the relevant bug report.  Add a comment which
+       explains why the test result 'skipped' if the first "make" call
+       fails.  Add other useful comments.
+       * tests/depcomp9.test: Slightly improve comments.
+
+2011-04-11  Ralf Wildenhues  <address@hidden>
+
+       Fix hp depmode for VPATH builds with GNU make.
+       * lib/depcomp: Be sure to remove VPATH-prefixed object from
+       dependency output when creating stub rule.
+       * tests/depcomp10.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+       Report by Bruno Haible.
+
+2011-04-10  Stefano Lattarini  <address@hidden>
+
+       test defs: fix 'javac' requirement for older JDK versions
+       The Java compiler from JDK 1.5 (and presumably earlier versions)
+       cannot handle the `-version' option by itself; and while it does
+       print the version number, it then errors out with an usage error:
+         $ javac -version
+         javac 1.5.0_22
+         javac: no source files
+         Usage: javac <options> <source files>
+         ...
+       Luckily, adding the `-help' option to the `javac' invocation
+       seems to fix this problem.
+       * tests/defs.in (javac): Pass also the `-help' option to the
+       `javac' program.  Add a comment explaining why it is needed.
+       Report from Ralf Wildenhues.
+
+2011-04-10  Stefano Lattarini  <address@hidden>
+
+       test defs: new requirement for the default java compiler
+       * tests/defs.in (for tool in $required): New requirement 'javac'.
+       * tests/java.test: Use it instead of ad-hoc configure check.
+       * tests/java-check.test: Likewise.
+       * tests/instfail-java.test: Likewise.
+       * tests/instdir-java.test: Likewise.
+
+2011-04-09  Stefano Lattarini  <address@hidden>
+
+       java: check_JAVA does not cause compilation by "make all" anymore
+       Fixes automake bug#8234.
+       * automake.in (handle_java): Make stamp of class files built from
+       java sources in $(check_JAVA) a dependency of `check' target, not
+       `all' target.
+       * tests/java-check.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+       * THANKS: Update.
+       Report from Petteri Räty.
+
+2011-04-09  Ralf Wildenhues  <address@hidden>
+
+       Clarify regex code in depcomp.
+       * lib/depcomp: Add comment why we don't need regex-escaping here.
+       Suggested by Stefano Lattarini.
+
+2011-04-08  Ralf Wildenhues  <address@hidden>
+
+       Fix makedepend depmode for VPATH builds.
+       * lib/depcomp [makedepend]: Remove any VPATH prefix from the
+       object file name, so a rebuild doesn't attempt to update the
+       .Po files in the source tree.
+       * tests/depcomp9.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+
+2011-04-02  Stefano Lattarini  <address@hidden>
+
+       tests: fix timestamp-related failures
+       Fixes automake bug#8365.
+       * tests/aclocal6.test: Sleep before modifying m4 files that should
+       trigger remake rules.  Remove incorrect/obsoleted comments.
+       * tests/subdir5.test: Likewise, and extend a bit.
+       * tests/subdir8.test: Likewise.
+       * tests/pr8365-remake-timing.test: New xfailing test.
+       * tests/Makefile.am (TESTS): Update.
+       Report from Sam Steingold.
+
+2011-04-02  Ralf Wildenhues  <address@hidden>
+
+       Create subdirs for generated sources even when not dep tracking.
+       * automake.in (handle_single_transform): If $object is derived
+       and lands in subdir, be sure to output a dirstamp dependency.
+       * tests/yacc5.test: Avoid falsely matching the dirstamp
+       dependency when grepping for a rule.
+       * tests/lex-subobj-nodep.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * THANKS: Update.
+       Report by Ignacy Gawedzki.
+
+       Fix locale issue in check-exported-srcdir.test.
+       * tests/check-exported-srcdir.test: Reformulate glob to not fail
+       in a locale that ignores or interleaves character case.
+
+2011-04-01  Stefano Lattarini  <address@hidden>
+
+       docs: better visibility for aclocal in the index
+       * doc/automake.texi (@menu): Rename title for entry 'configure'
+       from "Scanning configure.ac or configure.in" to the more precise
+       "Scanning configure.ac, using aclocal".
+       (@detailmenu): Adjust.
+       (@node configure): Adjust, and extend @cindex calls accordingly.
+       * THANKS: Update.
+       From a report by Maynard Johnson.
+
+2011-03-30  Stefano Lattarini  <address@hidden>
+
+       tests: improve tests on "maintainer-clean" target
+       * tests/aclocal6.test: Move checks related to "maintainer-clean"
+       functionalities into ...
+       * tests/maintclean-vpath.test: ... this new test.
+       * tests/maintclean.test: Update heading comments.  Extend to also
+       test subdirs.  Remove useless disabling of YACC.  Fix m4 quoting
+       in configure.in.  Add a trailing `:' command.  Remove extra blank
+       lines.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-03-21  Ralf Wildenhues  <address@hidden>
+
+       tests: fix unindent to use printf not echo for script.
+       * tests/defs.in: Use printf rather than echo, as the latter may
+       interpret the backslashes in the sed script.  Fixes test
+       failures with dash as /bin/sh.
+
+2011-03-17  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       maintcheck: look for problematic names of testcases
+       The configure.in stub created by default by `tests/defs' obtains
+       the first argument of AC_INIT from the test name, and this can
+       cause some supported autoconf versions to fail with a spurious
+       error if that test name contains the name of an m4 or m4sugar
+       builtin or macro (e.g., `defn' or `m4_undefine').
+       See for example the bug fixed by commit v1.11-287-g1325a8a.
+       This change add a maintainer check that warns about test names
+       which are possibly problematic in this regard.
+       * Makefile.am (sc_test_names): New maintainer-check target.
+       (syntax_check_rules): Add it.
+       (m4_builtins): New helper variable.
+       (TESTS): Updated according to the following renamings.
+       * tests/include.test: Renamed ...
+       * tests/hdr-vars-defined-once.test: ... to this.
+       * tests/sinclude.test: Renamed ...
+       * tests/m4-inclusion.test: ... to this, and simplified
+       accordingly.
+       * tests/include2.test: Renamed ...
+       * tests/dist-included-parent-dir.test: ... to this, for
+       consistency.
+
+2011-03-04  Stefano Lattarini  <address@hidden>
+
+       tests: fix bug in alloca*.test
+       * tests/alloca.test: Make grepping of automake stderr stricter,
+       add a trailing `:' command; also, add AC_PROG_CC to configure.in,
+       and create a dummy alloca.c file, to ensure that we fail for the
+       proper reason.
+       * tests/alloca2.test: Likewise.  Also, look for LT_INIT, not
+       AC_PROG_LIBTOOL, in the error message (bug introduced with commit
+       v1.11-315-gd51e7b7 "libtool: suggest LT_INIT if LTLIBRARIES
+       primary is used").
+       From a report by Patrick Welche.
+
+2011-03-04  Stefano Lattarini  <address@hidden>
+
+       tests: fix bug (comments-in-var-defn.test + autoconf 2.62)
+       * tests/comments-in-var-defn.test: The configure.in stub created
+       by default, which has the AC_INIT first argument obtained by the
+       test name, causes autoconf 2.62 to fail with a spurious error
+       message like: "configure.in:1: error: defn: undefined macro:".
+       Thus, to prevent this, the test is renamed to ...
+       * tests/comments-in-var-def.test: ... this.
+       * tests/Makefile.am (TESTS): Updated.
+
+2011-03-04  Stefano Lattarini  <address@hidden>
+
+       cosmetics: convert encoding from ISO-8859 to UTF-8
+       * ChangeLog.03: Convert encoding to UTF-8.
+       * ChangeLog.96: Likewise.
+       * ChangeLog.98: Likewise.
+       * NEWS: Likewise.
+       * TODO: Likewise.
+
+2011-03-01  Peter Rosin  <address@hidden>
+
+       test defs: unindent without temporary file
+       * tests/defs.in (commented_sed_unindent_prog): Commented Sed program
+       that strips the "proper" amount of leading whitespace.
+       (unindent): Lazily strip comments from the above program and use it
+       to unindent without using a temporary file.
+
+2011-02-26  Stefano Lattarini  <address@hidden>
+
+       libtool: suggest LT_INIT if LTLIBRARIES primary is used
+       When the LTLIBRARIES primary was used, but $(LIBTOOL) wasn't
+       defined, automake suggested to add a call to AC_PROG_LIBTOOL
+       in configure.ac.  But that macro is deprecated since Libtool
+       version 1.9b (2004-08-29), in favor of the newer LT_INIT.  So
+       suggest the use of this latter macro instead.
+       * lib/Automake/Variable.pm (%_am_macro_for_var): Pair 'LIBTOOL'
+       with 'LT_INIT', not with 'AC_PROG_LIBTOOL'.
+       * tests/libtool4.test: Adjust and extend.  Also, add a call to
+       macro AC_PROG_CC in configure.in, to help ensuring that automake
+       does not fail for the wrong reasons.
+       * tests/ltinit.test: New test, ensure that automake's libtool
+       support works with LT_INIT-based interface.
+       Thanks to Jack Kelly for the suggestion.
+
+2011-02-20  Stefano Lattarini  <address@hidden>
+
+       tests: tempdirs with restrictive permissions are cleaned correctly
+       Before this change, the removal of a temporary test directory
+       containing subdirectories with restrictive permissions (such as
+       'r--r--r--') could fail.
+       * tests/defs: Ensure that all the subdirectories of a temporary
+       test directory have the 'read', 'write' and 'execute' bits set,
+       before trying to remove it with `rm -rf'.
+       * tests/Makefile.am (clean-local-check): Likewise.
+
+2011-02-16  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       test defs: add subroutine for input unindenting
+       * tests/defs.in (unindent): New subroutine.
+
+2011-02-15  Stefano Lattarini  <address@hidden>
+
+       python: report the 'PYTHON' influential environment variable
+       * m4/python.m4 (AM_PATH_PYTHON): Call AC_ARG_VAR on PYTHON.
+       * doc/automake.texi (Python): Update and extend.
+       * tests/help-python.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * THANKS (Jack Kelly): Update e-mail address.
+       Suggestion by Jack Kelly.
+
+2011-02-10  Stefano Lattarini  <address@hidden>
+
+       tests defs: clear TESTS_ENVIRONMENT variable
+       * tests/defs.in (TESTS_ENVIRONMENT): Unset it, so that values
+       from environment won't interfere with the testcases.
+       Suggestion by Ralf Wildenhues.
+
+2011-02-06  Stefano Lattarini  <address@hidden>
+
+       tests: tweak few tests on simple and parallel test drivers
+       * tests/check-exported-srcdir.test: Improve heading comments.
+       * tests/check-tests-in-builddir.test: Likewise.  Also, unset the
+       `FOO_EXIT_STATUS' variable, so that any pre-existing value in the
+       environment won't risk to interfere with the test.
+       Suggestions by Ralf Wildenhues.
+
+2011-02-01  Stefano Lattarini  <address@hidden>
+
+       coverage: more tests on simple and parallel test drivers
+       * tests/parallel-tests-subdir.test: New test.
+       * tests/check-exported-srcdir.test: Likewise.
+       * tests/check-tests-in-builddir.test: Likewise.
+       * tests/check-tests_environment.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-01-29  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failures in lflags*.test
+       * tests/lflags.test: Remove 'LEX' from the environment, so
+       that it won't be erroneously picked up by `make -e'.
+       * tests/lflags2.test: Likewise.
+
+2011-01-24  Stefano Lattarini  <address@hidden>
+
+       docs: color-tests issues with parallel make
+       * doc/automake.texi (Simple Tests): Document that automatic
+       recognition of a capable terminal attached to stdout can fail
+       with some make implementation when running in parallel mode,
+       thus causing colored test output not to be automatically
+       activated when it should.
+
+2011-01-23  Ralf Wildenhues  <address@hidden>
+
+       tests: avoid instspc.test failures due to make's whitespace trimming
+       * tests/instspc.test: Prepend './' when passing the test
+       characters, to avoid leading whitespace characters to be trimmed
+       from macros set from environment variables.  Fixes testsuite
+       failures with HP-UX, IRIX, and Tru64/OSF make.
+
+2011-01-23  Stefano Lattarini  <address@hidden>
+
+       coverage: test semantics of "dummy" per-target flags
+       * tests/specflg-dummy.test: New test, ensuring that even "dummy"
+       per-target flags triggers the use of renamed objects.
+       * tests/Makefile.am (TESTS): Update.
+       Suggestion by Ralf Wildenhues.
+
+2011-01-23  Stefano Lattarini  <address@hidden>
+
+       tests defs: sanitize IFS
+       * tests/defs.in ($IFS): Define to <space>, <tab>, <newline>.
+       ($sp): New variable, holding a single whitespace character.
+       ($tab): New variable, holding a tabulation character.
+       ($nl): New variable, holding a newline character.
+
+2011-01-22  Ralf Wildenhues  <address@hidden>
+
+       tests: fix VPATH auto-expansion workarounds.
+       * tests/parallel-tests8.test, tests/suffix13.test:
+       Ensure $< is not surrounded by white space, to prevent Solaris
+       make from applying automatic VPATH text expansion.
+
+2011-01-22  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failures in yflags*.test
+       * tests/yflags.test: Remove 'YACC' from the environment, so
+       that it won't be erroneously picked up by `make -e'.
+       * tests/yflags2.test: Likewise.
+
+2011-01-22  Ralf Wildenhues  <address@hidden>
+
+       tests: avoid fn99*.test failures due to buggy AIX 5.3 cp -R.
+       * tests/fn99.test, tests/fn99subdir.test: Skip if an initial
+       `cp -R' of the subdir tree already fails; AIX 5.3 cp messes
+       up its internal memory when copying this tree.
+
+2011-01-22  Ralf Wildenhues  <address@hidden>
+           Stefano Lattarini  <address@hidden>
+
+       Add comment to check-TESTS rule working around make 3.80 bug.
+       * lib/am/check.am (check-TESTS): Update comment.
+
+2011-01-20  Ralf Wildenhues  <address@hidden>
+
+       tests: less strict double-colon spy.test again.
+       * tests/spy.test: We know BSD make doesn't invoke more than one
+       double-colon rule, so no need to expose that failure.
+
+2011-01-19  Ralf Wildenhues  <address@hidden>
+
+       install-sh: avoid Tru64 sh `test' operator precedence issues.
+       * lib/install-sh: Protect file names and directory components
+       that consist of `=', `(', `)', or `!'.  Move protection as early
+       as possible, to avoid errors such as with Tru64 sh `test -z ='.
+       * tests/instsh2.test: Extend test to cover more possibilities.
+       Fixes 1.12 instspc-equal-install.test failure on Tru64/OSF 5.1.
+
+2011-01-19  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       docs: automake testsuite doesn't use TESTS_ENVIRONMENT anymore
+       * doc/automake.texi (Simple Tests): Do not claim Automake uses
+       TESTS_ENVIRONMENT for the perl driver.  Instead, point to the
+       parallel-tests driver.
+
+2011-01-19  Ralf Wildenhues  <address@hidden>
+
+       Allow _AM_DEPENDENCIES to be used later in configure.
+       * m4/depend.m4 (_AM_DEPENDENCIES): Remove a previously existing
+       conftest.dir before recreating it.
+       Fixes bug#7864.
+       Report by Eric Blake, from report by Scott McCreary against M4.
+
+2011-01-18  Ralf Wildenhues  <address@hidden>
+
+       tests: avoid failure on w32 file systems.
+       * tests/parallel-tests-unreadable-log.test: SKIP if file cannot
+       be turned unreadable.
+
+2011-01-17  Ralf Wildenhues  <address@hidden>
+
+       tests: allow double-colon spy.test to work with HP-UX make.
+       * tests/spy.test: Fix comment typos.  Ensure prerequisites we
+       do not want to depend on are strictly older than the target.
+       Also test with a target out of date wrt. more than one rule.
+
+2011-01-16  Stefano Lattarini  <address@hidden>
+
+       tests: remove useless requirements from cond36.test
+       * tests/cond36.test ($required): Remove.
+       Since we are at it, add a trailing `:' command.
+
+2011-01-16  Ralf Wildenhues  <address@hidden>
+           Stefano Lattarini  <address@hidden>
+
+       parallel-tests: work around Tru64/OSF 5.1 sh read bugs.
+       * lib/am/check.am ($(TEST_SUITE_LOG), recheck, recheck-html):
+       Test file readability before redirecting input from it, to avoid
+       exiting Tru64/OSF 5.1 sh which treats read as special builtin.
+       * tests/parallel-tests-unreadable-log.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+
+2011-01-16  Ralf Wildenhues  <address@hidden>
+
+       * NEWS, README: Update copyright years.
+
+       Fix parallel-tests.test failure with HP-UX make.
+       * tests/parallel-tests.test: Sleep inside inner tests, so logs
+       are newer than logs of tests they depend on, for HP-UX make.
+
+2011-01-15  Ralf Wildenhues  <address@hidden>
+
+       docs: ensure example are separated with empty lines in the input
+       * doc/automake.texi (Extending aclocal, Emacs Lisp, Rebuilding)
+       (API Versioning, Renamed Objects, Multiple Outputs): Add empty
+       lines before address@hidden' and after address@hidden example' lines, 
so info
+       output is rendered correctly, and a following @noindent honored.
+       Report by Stefano Lattarini.
+
+2011-01-15  Jim Meyering <address@hidden>
+
+       tests: fix comment typo
+       * tests/substref.test: Fix grammar in a comment.
+
+2011-01-13  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failures in two texinfo tests
+       * tests/txinfo.test ($required): Add 'makeinfo'.
+       * tests/txinfo8.test: Create a dummy 'textutils.info' file, so
+       that make won't try to run makeinfo (which could be unavailable)
+       to build it.
+       Found by NixOS Hydra, reported by Ralf Wildenhues.
+
+2011-01-13  Ralf Wildenhues  <address@hidden>
+
+       Avoid testsuite failures due to Autoconf Fortran change.
+       Autoconf v2.68-21-g727ce95 causes AC_F77_LIBRARY_LDFLAGS to
+       require computing the canonical host name.  Ensure config.guess
+       and config.sub files are present for respective checks.
+       * tests/compile_f_c_cxx.test: Add stub files.
+       * tests/flibs.test: Likewise.
+       * tests/fort4.test: Use $AUTOMAKE -a for installing files.
+
+2011-01-12  Stefano Lattarini  <address@hidden>
+
+       docs: clustered '-d' not recognized in YFLAGS
+       This change fixes automake bug#7828.
+       * doc/automake.texi (Yacc and Lex): Document that automake
+       recognizes '-d' in AM_YFLAGS only if it's not clustered with
+       other options.
+       From a report by Юрий Пухальский.
+
+2011-01-10  Stefano Lattarini  <address@hidden>
+
+       tests: add checks on automatically-distributed files
+       Related to automake bug#7819.
+       * tests/autodist.test: New test.
+       * tests/autodist-subdir.test: Likewise.
+       * tests/autodist-acconfig.test: Likewise.
+       * tests/autodist-acconfig-no-subdir.test: Likewise.
+       * tests/autodist-aclocal-m4.test: Likewise.
+       * tests/autodist-config-headers.test: Likewise.
+       * tests/autodist-configure-no-subdir.test: Likewise.
+       * tests/autodist-stamp-vti.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-01-11  Stefano Lattarini  <address@hidden>
+
+       tests: work around a texi+cygnus bug causing a spurious XFAIL
+       * tests/txinfo5b.test: New test, like txinfo5.test but calling
+       automake with the `-Wno-override' option to work around a bug
+       in the texinfo + cygnus interaction.
+       * tests/txinfo5.test: Update heading comments.
+       * tests/Makefile.am (TEST): Updated.
+
+2011-01-09  Dave Hart  <address@hidden>  (tiny change)
+
+       Fix another typo in Rule.pm comment.
+       * lib/Automake/Rule.pm: Fix typo.
+
+2011-01-11  Stefano Lattarini  <address@hidden>
+
+       Improve, extend and tweak tests on Texinfo support.
+       * tests/instdir-texi.test: Add a call to `ls -l' after that to
+       `make', for debugging.  When looking for required tools, do not
+       redirect the output of "$tool --help" to /dev/null, and do not
+       uselessly run it in a subshell.
+       * tests/txinfo.test: Rewritten to run autoconf, ./configure and
+       make.  All checks moved into Makefile.am.
+       * tests/txinfo8.test: Likewise, and modernize the generated
+       configure.in.
+       * tests/txinfo2.test: Moved checks into Makefile.am, and other
+       minor improvements.
+       * tests/txinfo5.test: Enable `errexit' shell flag, and related
+       changes.  Add trailing `:' command.
+       * tests/txinfo6.test: Likewise, and make grepping of generated
+       Makefile.in stricter.
+       * tests/txinfo7.test: Enable `errexit' shell flag, and related
+       changes.  Add trailing `:' command.  Do not add unnecessary stuff
+       to Makefile.am.
+       * tests/txinfo9.test: Verify that more targets which are expected
+       to be generated only once really are.  Make grepping less strict,
+       to avoid exposing too much internal details.  More minor changes.
+       * tests/txinfo16.test: Add trailing `:'.  Prefer cat over echo
+       for appending to configure.in.  Updated/fixed heading comments.
+       * tests/txinfo23.test: Likewise, and extended a little by making
+       it check that no info file is created in the $(srcdir).
+       * tests/txinfo24.test: Likewise.
+       * tests/txinfo25.test: Likewise.
+       * tests/txinfo18.test: Add trailing `:'.  Prefer cat over echo
+       for appending to configure.in.  Also, check that index files are
+       cleaned also by "make clean", not only by "make distclean".
+       * tests/txinfo22.test: Prefer `$me' over hard-coded test name,
+       and added trailing `:' command.  This testcase also used to check
+       that automake ignores in-line comments when using variables, but
+       preserves them in the output; these checks (added in commit
+       "Release-1-7f-4-g9177ef8") do not really pertain to this test,
+       so they have been moved ...
+       * tests/comments-in-var-defn.test: ... into this new test.
+       * tests/txinfo4.test: Escape literal dots in grep regexps.  Add
+       trailing `:' command.
+       * tests/txinfo29.test: Likewise.  Relax grepping of generated
+       Makefile.in w.r.t. whitespaces.  Prefer `cat' over `echo' to
+       append to configure.in.
+       * tests/txinfo3.test: Likewise.
+       * tests/vtexi.test: Improve grepping of Makefile.in (sometimes
+       make it stricter, sometimes laxer).  Move `set -e' setting just
+       after the inclusion of ./defs.  De-uglify a sed command.  Other
+       minor cosmetic improvements.
+       * tests/vtexi2.test: Make grepping of Makefile.in stricter.  Add
+       trailing `:' command.
+       * tests/vtexi3.test: New test on version.texi support.
+       * tests/vtexi4.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+
+2011-01-09  Peter Rosin  <address@hidden>
+
+       Fix another typo in Rule.pm comment.
+       * lib/Automake/Rule.pm: Fix typo.
+
+2011-01-09  Stefano Lattarini  <address@hidden>
+
+       cosmetics: remove trailing whitespaces
+       * doc/automake.texi: Remove trailing whitespaces.
+       * tests/cond13.test: Likewise.
+       * tests/cond14.test: Likewise.
+       * tests/fort4.test: Likewise.
+       * tests/fort5.test: Likewise.
+       * tests/suffix7.test: Likewise.
+       * tests/vtexi2.test: Likewise.
+
+       automake: minor fixes in comments
+       * automake.in: Some minor fixes and enhancements in comments.
+
+2011-01-09  Ralf Wildenhues  <address@hidden>
+
+       Add test coverage for deleted header files.
+       * tests/depcomp6.test, tests/depcomp7.test: Update tests to
+       also check for the deleted header bug.  If no dependency
+       tracking mechanism could be found, SKIP rather than exit
+       successfully.  Use GNU style spacing and ANSI C prototypes.
+
+       Fix typos in Rule.pm comments.
+       * lib/Automake/Rule.pm: Fix typos in comments.
+
+       docs: split 'amhello Explained' node.
+       * doc/automake.texi (amhello Explained): Split node ...
+       (amhello's configure.ac Setup Explained)
+       (amhello's Makefile.am Setup Explained) : ... into these two.
+       (Top, Hello World): Adjust, and add @anchor for stable URL links.
+       Suggestion by Karl Berry in automake bug#7766.
+
+2011-01-08  Karl Berry  <address@hidden>
+           Eric Blake  <address@hidden>
+
+       docs: reference defining directories in amhello node.
+       * doc/automake.texi (amhello Explained): Point to Autoconf
+       manual for how to convert directory values into macros.
+       (Optional): Fix grammar nit.
+
+2011-01-02  Stefano Lattarini  <address@hidden>
+
+       * NEWS: Fix typo (forgotten word).
+
+2011-01-02  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       docs: how to work around checks on invalid primary/directory couples
+       * doc/automake.texi (Uniform): Document the blessed idiom which can
+       be used to work around automake checks on invalid primary/directory
+       couples (such as `lib_PROGRAMS' or `doc_LIBRARIES').
+
+2011-01-02  Ralf Wildenhues  <address@hidden>
+
+       Sync auxiliary files from upstream.
+       * lib/config.guess, lib/config.sub, lib/texinfo.tex:
+       Sync from upstream.
+
+       Fix maintainer-check regression.
+       * tests/subobj11a.test: Pass DISTCHECK_CONFIGURE_FLAGS in the
+       environment.
+
+       Bump copyright years.
+       * aclocal.in (write_aclocal, version): Bump copyright years.
+       * automake.in (gen_copyright, version): Likewise.
+       * doc/automake.texi: Likewise.
+
+2010-12-23  Ralf Wildenhues  <address@hidden>
+           Stefano Lattarini  <address@hidden>
+
+       Work around a bug in file-inclusion mechanism of Solaris make.
+       * automake.in (handle_single_transform): In the name of the
+       dependency file: collapse multiple slash characters into a single
+       one.
+       * tests/subobj11a.test: New test.
+       * tests/subobj11b.test: Likewise.
+       * tests/subobj11c.test: Likewise.
+       * tests/depcomp8a.test: Likewise.
+       * tests/depcomp8b.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+       * NEWS: Updated.
+       Report by Stefano Lattarini, quick fix by Ralf Wildenhues, final
+       patch and tests by Stefano Lattarini.
+
+2010-12-22  Stefano Lattarini  <address@hidden>
+
+       Fix two spurious testsuite failures on IRIX 6.5.
+       * tests/suffix13.test (Makefile.am): Account for VPATH issues on
+       weaker make implementations (e.g. IRIX 6.5).
+       * tests/parallel-tests8.test: Likewise, plus a required related
+       change.
+       Reported by Ralf Wildenhues.  The bugs have been there from the
+       first versions of the affected test scripts.
+
+2010-12-22  Stefano Lattarini  <address@hidden>
+
+       docs: cygnus mode doesn't require AM_CYGWIN32 macro.
+       * doc/automake.texi (Cygnus): Mode 'cygnus' does not require
+       the AM_CYGWIN32 macro (and indeed hasn't required it since at
+       least commit Release-1-2-31-g3038064 "merged changes from
+       Cygnus" of 1997-08-25).
+
+2010-12-22  Stefano Lattarini  <address@hidden>
+
+       distlinksbrk.test: Work around botched "make -k".
+       * tests/distlinksbrk.test: Run "make" multiple times and grep
+       its output each time for a single error message, rather than
+       running "make -k" one single time and grepping its output for
+       all the expected error messages.  This should work around make
+       implementations with limited (broken?) `-k' support; for more
+       information, see these subthreads on the automake-patches list:
+         - 2010-11-15, "Testsuite failures on HP-UX 11.23",
+           
<http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00162.html>
+         - 2010-11-15, "Testsuite failures on IRIX 6.5",
+           
<http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00166.html>
+
+2010-12-21  Stefano Lattarini  <address@hidden>
+
+       Fix sed-related buglet in test "subdir5.test"
+       * tests/subdir5.test: Always terminate text passed to the
+       `i' sed command with a newline, to work around limitations
+       in e.g. older OpenBSD sed.
+
+2010-12-18  Stefano Lattarini  <address@hidden>
+
+       docs: fix blunder in example about python extension modules
+       * doc/automake.texi (Python): Use `quaternion_la_SOURCES',
+       not `quaternion_SOURCES', to declare the sources of python
+       extension module `quaternion.la'.
+
+2010-12-16  Stefano Lattarini  <address@hidden>
+
+       docs: list LTLIBRARIES among Automake primaries
+       * doc/automake.texi (Uniform): List `LTLIBRARIES' among
+       the Automake primaries.
+
+2010-12-14  Stefano Lattarini  <address@hidden>
+
+       Improve tests on generated portions of configure help screen.
+       * tests/help-depend.test: Grepping of configure help screen
+       relaxed to cater for possible line wrapping, and tightened in
+       other respects.
+       * tests/help-depend2.test: Likewise.
+       * tests/help-dmalloc.test: Likewise.
+       * tests/help-lispdir.test: Likewise.
+       * tests/help-maintainer.test: Likewise.
+       * tests/help-multilib.test: Likewise.
+       * tests/help-silent.test: Likewise.
+       * tests/help-upc.test: Likewise.
+       * tests/help-init.test: Grepping of configure help screen
+       tightened.
+
+2010-12-10  Ralf Wildenhues  <address@hidden>
+
+       Avoid running installed automake from 'libtool --help'.
+       * tests/subobj9.test: Export AUTOCONF and AUTOMAKE.
+       Together with fixed Libtool, this fixes check-coverage to not
+       invoke installed automake.
+
+2010-11-25  Stefano Lattarini  <address@hidden>
+
+       Fix spurious failures in `silent*.test' for $CC != gcc
+       In some tests on automake-produced silent rules, we forced the
+       use of gcc depmode to improve testsuite coverage; but this has
+       unsurprisingly led to spurious failures when some non-GNU C
+       compilers were used.  So we are now careful to require GCC in
+       tests that force gcc depmode.
+       From reports by Ralf Wildenhues.
+       * tests/silent5.test: Test removed, its content split into ...
+       * tests/silent-many-generic.test, tests/silent-many-gcc.test: ...
+       these new sister tests, the latter of which forces gcc depmode
+       and lists "gcc" in $required.
+       * tests/silentlex.test: Test removed, its content split into ...
+       * tests/silent-lex-generic.test, tests/silent-lex-gcc.test: ...
+       these new sister tests, the latter of which forces gcc depmode
+       and lists "gcc" in $required.
+       * tests/silentyacc.test: Test removed, its content split into ...
+       * tests/silent-yacc-generic.test, tests/silent-yacc-gcc.test: ...
+       these new sister tests, the latter of which forces gcc depmode and
+       lists "gcc" in $required.
+       * tests/Makefile.am (TESTS): Updated.
+
+2010-11-21  Stefano Lattarini  <address@hidden>
+
+       Tests: consistently use "|| Exit 1" after ". ./defs".
+       * tests/autohdr.test: Use `. ./defs || Exit 1', not bare
+       `. ./defs', for consistency with other tests.
+       * tests/autohdr2.test: Likewise.
+       * tests/autohdr3.test: Likewise.
+       * tests/autohdr4.test: Likewise.
+       * tests/cond23.test: Likewise.
+       * tests/cond24.test: Likewise.
+       * tests/cond25.test: Likewise.
+       * tests/cond26.test: Likewise.
+       * tests/cond27.test: Likewise.
+       * tests/cond28.test: Likewise.
+       * tests/cond29.test: Likewise.
+       * tests/cond30.test: Likewise.
+       * tests/cond31.test: Likewise.
+       * tests/cond32.test: Likewise.
+       * tests/cond33.test: Likewise.
+       * tests/cond34.test: Likewise.
+       * tests/cond35.test: Likewise.
+       * tests/cond36.test: Likewise.
+       * tests/cond37.test: Likewise.
+       * tests/cond38.test: Likewise.
+       * tests/cond39.test: Likewise.
+       * tests/cond40.test: Likewise.
+       * tests/cond41.test: Likewise.
+       * tests/cond42.test: Likewise.
+       * tests/cond43.test: Likewise.
+       * tests/cond44.test: Likewise.
+       * tests/cond45.test: Likewise.
+       * tests/dollarvar.test: Likewise.
+       * tests/dollarvar2.test: Likewise.
+       * tests/hfs.test: Likewise.
+       * tests/libobj14.test: Likewise.
+       * tests/percent.test: Likewise.
+       * tests/percent2.test: Likewise.
+       * tests/phony.test: Likewise.
+       * tests/silent.test: Likewise.
+       * tests/silent2.test: Likewise.
+       * tests/silent3.test: Likewise.
+       * tests/silent4.test: Likewise.
+       * tests/silent5.test: Likewise.
+       * tests/silent6.test: Likewise.
+       * tests/silent7.test: Likewise.
+       * tests/silent9.test: Likewise.
+       * tests/silentcxx.test: Likewise.
+       * tests/silentf77.test: Likewise.
+       * tests/silentf90.test: Likewise.
+       * tests/silentlex.test: Likewise.
+       * tests/silentyacc.test: Likewise.
+
+       Avoid useless cleaning in some `silent*.test' tests.
+       * tests/silentf77.test: Removed useless calls to "make clean"
+       and "make maintainer-clean".
+       * tests/silentf90.test: Likewise.
+       * tests/silent3.test: Removed useless call to "make distclean".
+       * tests/silent4.test: Likewise.
+       * tests/silent9.test: Likewise.
+
+2010-11-19  Ian Lance Taylor  <address@hidden>
+
+       Sync config-ml.in from GCC.
+       * config-ml.in: Add Go support: treat GOC and GOCFLAGS like other
+       compiler/flag environment variables.
+
+2010-11-19  Stefano Lattarini  <address@hidden>
+
+       Automake::Config: remove extra trailing semicolon.
+       * lib/Automake/Config.in: Remove extra trailing semicolon.
+
+       help4.test: fix botched heading comment.
+       * tests/help4.test: Fixed the heading comment, since it
+       didn't correctly describe what checks the testcase was
+       supposed to perform.
+
+       help2.test: add checks on aclocal too.
+       * tests/help2.test: Check that also `aclocal --version' and
+       `aclocal --help' work with configure.in and acinclude.m4 both
+       broken.
+
+2010-11-17  Stefano Lattarini  <address@hidden>
+
+       Fix spurious failures of silent-rules tests with Sun Fortran.
+       * tests/silentf77.test: Strip from the make output some verbose
+       messages possibly printed by the SunStudio fortran compilers, to
+       avoid spurious failures.  Add a trailing `:' command.
+       * tests/silentf90.test: Likewise.
+
+2010-11-17  Stefano Lattarini  <address@hidden>
+
+       Fix spurious failures of silent5.test with Sun Fortran.
+       * tests/silent5.test: Strip from the make output some verbose
+       messages possibly printed by the SunStudio fortran compilers,
+       to avoid spurious failures.  This bug has been there from the
+       very first version of this test script.
+
+2010-11-16  Stefano Lattarini  <address@hidden>
+
+       Fix regression in colon{5,6}.test (failures on AIX 5.3).
+       * tests/colon5.test: Also substitute address@hidden@' with `$SHELL' when
+       post-processing the generated Makefile.in, to work around a bug
+       of AIX 5.3 make which doesn't allow setting the `$(SHELL)' macro
+       on the commend line.  Calls to `$MAKE' adjusted accordingly.
+       * tests/colon6.test: Likewise.
+       Regression introduced in commit v1.11-175-gf9fe878 "Modernize,
+       improve and/or extend tests `colon*.test", and reported by Ralf
+       Wildenhues.
+
+2010-11-16  Stefano Lattarini  <address@hidden>
+
+       Fix regression in ansi.test (failure on AIX 5.3).
+       * tests/ansi.test: Remove redundant hackish check done using a
+       hand-postprocessed Makefile.in.  This check worked by setting
+       the `$(SHELL)' macro on the command line of make, but this is
+       not supported by the AIX 5.3 make implementation.
+       This bug has been lurking for a long time, and was activated by
+       commit v1.11-125-gc1f6cdb "Enable `errexit' shell flag in various
+       tests".  Report by Ralf Wildenhues.
+
+2010-11-16  Ralf Wildenhues  <address@hidden>
+
+       tests: avoid '##'-style comments inside recipe commands.
+       * tests/confh.test, tests/confh8.test: Remove
+       double-hash comments from makefile rule commands, they
+       are not part of the Automake API.
+
+2010-11-14  Ralf Wildenhues  <address@hidden>
+
+       tests: work around dash quoting issue in case statements.
+       * tests/color.test, tests/color2.test: Quote variable in case
+       pattern, to avoid skipping tests with dash 0.5.5.1.
+
+2010-11-14  Ralf Wildenhues  <address@hidden>
+
+       Rebuild menus in the manual.
+       * doc/automake.texi: Rebuild menus (using ^C ^U ^A in emacs).
+       Thanks to Ian Lance Taylor for the suggestion.
+
+       Fix install-strip when $(STRIP) contains several words.
+       * lib/am/install.am (install-strip): Update comment.  Use
+       separate sub-make invocations for empty and nonempty $(STRIP),
+       to fix quoting issues.
+       * tests/strip2.test, tests/strip3.test: New tests.
+       * tests/Makefile.am (TESTS): Adjust.
+
+2010-11-10  Ralf Wildenhues  <address@hidden>
+
+       Fix yaccdry.test failure: require bison.
+       * tests/yaccdry.test: Require bison.
+       Found by NixOS Hydra.
+
+2010-11-07  Stefano Lattarini  <address@hidden>
+
+       Fix a bug in variable concatenation with `+='.
+       * lib/Automake/VarDef.pm (append): Since the content of the
+       "appended-to" variable is going to be unconditionally normalized
+       later, simply separate the appended value with a single whitespace
+       character, instead of trying to be uselessly smarter by using
+       escaped newlines.  This fixes a bug in which extra backslashes
+       where erroneously inserted in the variable's final value.
+       * tests/pluseq11.test: New test, exposing the bug.
+       * tests/Makefile.am (TESTS): Update.
+       Reported by Andy Wingo.
+
+2010-11-06  Stefano Lattarini  <address@hidden>
+
+       Fix bug in rules for creating vala vapi/header files.
+       * automake.in (lang_vala_finish_target): Add forgotten "fi" in an
+       if control structure in a generated make rules.  Bug introduced
+       by previous commit `v1.11-221-gd7c1679', and revealed by failure
+       of test `vala2.test'.
+
+2010-11-01  Ralf Wildenhues  <address@hidden>
+
+       Fix and document rules to not touch the tree with `make -n'.
+       * doc/automake.texi (Multiple Outputs): Document the problem of
+       modifications during dry-run execution, propose solution.
+       * NEWS: Update.
+       * automake.in (lang_vala_finish_target): Split recipe so the
+       stamp file is not removed with GNU `make -n'.
+       (lang_yacc_target_hook): Separate removal of parser output file
+       and header remaking.
+       * lib/am/lisp.am ($(am__ELCFILES)): Determine whether -n was
+       passed to make, take care not to remove any files in that case.
+       * lib/am/remake-hdr.am (%CONFIG_H%): Separate removal of
+       %STAMP% file from induced remaking of config header.
+       * tests/autohdrdry.test, tests/lispdry.test, tests/yaccdry.test:
+       New tests.
+       * tests/Makefile.am (TESTS): Update.
+
+2010-11-01  Ralf Wildenhues  <address@hidden>
+
+       Add FAQ entry for bug reporting instructions.
+       * doc/automake.texi (Reporting Bugs): New section.
+       (Introduction): Refer to it.
+
+2010-10-04  Stefano Lattarini  <address@hidden>
+
+       Add support for newer python versions.
+       * m4/python.m4 (AM_PATH_PYTHON): Add python2.7 and python3.2 to
+       _AM_PYTHON_INTERPRETER_LIST.  Since we are at it, break a long
+       line and fix indentation.
+       * THANKS: Updated.
+       From a report by Thomas Klausner.
+
+       Add test for `AM_WITH_DMALLOC' macro.
+       * tests/dmalloc.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+       Fix nits and bugs in tests `help*.test'.
+       * tests/help4.test: Fix broken sed commands used to strip `-W...'
+       flags away from "$AUTOMAKE" and "$ACLOCAL".
+       * tests/help3.test: Likewise, and fix a botched comment.
+       * tests/help.test: Likewise.  Also, use "AUTOMAKE_fails ..."
+       instead of "$AUTOMAKE ... && Exit 1", for consistency and to
+       please maintainer-check.
+       * tests/help2.test: Likewise.
+
+2010-10-03  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Improve tests `help*.test' (also fixes maintcheck failures).
+       * tests/help.test: To run automake, use `$AUTOMAKE' with all `-W'
+       flags stripped away rather than hard-coded `automake-$APIVERSION',
+       to better honour user-overrides.  Similarly for aclocal.
+       * tests/help2.test: Likewise.
+       * tests/help3.test: Likewise.
+       * tests/help4.test: Likewise.
+
+2010-10-03  Ralf Wildenhues  <address@hidden>
+
+       Document and fix expansion of variables before rules.
+       * doc/automake.texi (General Operation): Document that variables
+       are expanded before rules.
+       * lib/am/check.am (am__check_post): Reword a bit so it does not
+       get matched as a rule.
+       Suggestion by Ben Pfaff.
+
+2010-10-02  Ralf Wildenhues  <address@hidden>
+
+       Revert "parallel-tests: avoid command-line length limit issue."
+       This reverts commit 24e3b4ee2f8cb9f72dd94a05a893f3d4e88b7835,
+       because it re-opened the bug fixed by v1.11-10-g218e678.
+
+       2010-09-07  Ralf Wildenhues  <address@hidden>
+
+       parallel-tests: avoid command-line length limit issue.
+       * automake.in (handle_tests): New argument $makefile, new
+       substitution %MAKEFILE%.
+       (generate_makefile): Adjust.
+       * lib/am/check.am [%?PARALLEL_TESTS%] (check-TESTS): Pass
+       sanitized TEST_LOGS value as makefile snippet on standard
+       input to $(MAKE), to avoid exceeding the command line limit on
+       w32 (MSYS).
+       * NEWS: Update.
+       Report by Bob Friesenhahn.
+
+2010-09-26  Stefano Lattarini  <address@hidden>
+
+       Extend tests on `--help' and `--version' options.
+       * tests/help.test: Create a new empty directory and chdir into
+       it, rather than removing already present files.  Run the aclocal
+       and automake wrapper scripts directly, instead of relying on
+       $AUTOMAKE and $ACLOCAL.  Be sure to correctly match literal dots
+       in aclocal's and automake's stderr.  Add a trailing `:' command.
+       * tests/help2.test: New test, checking that options `--help' and
+       `--version' works in directories with broken `configure.in'.
+       * tests/help3.test: New test, checking that options `--help' and
+       `--version' take precedence on the other options.
+       * tests/help4.test: New test, checking that the first among the
+       `--help' and `--version' options to be specified on the command
+       line wins.
+       * tests/Makefile.am (TESTS): Updated.
+
+2010-09-25  Stefano Lattarini  <address@hidden>
+
+       Testsuite: Use `$PATH_SEPARATOR', not `:', when extending PATH.
+       * tests/compile2.test: Do no uselessly (implicitly) repeat the
+       computation of PATH_SEPARATOR again.
+       * tests/instmany-mans.test: Use `$PATH_SEPARATOR', not `:', when
+       extending/redefining PATH.
+       * tests/instmany-python.test: Likewise.
+       * tests/instmany.test: Likewise.
+       * tests/man4.test: Likewise.
+       * tests/mkinst3.test: Likewise.
+       * tests/mmodely.test: Likewise.
+       * tests/multlib.test: Likewise.
+       * tests/txinfo30.test: Likewise.
+       * tests/README (Section "Writing test cases" subsection "Do"):
+       Updated.
+       * Makefile.am (sc_tests_PATH_SEPARATOR): New maintainer check.
+       (syntax_check_rules): Updated.
+
+       Testsuite: new variables `$PATH_SEPARATOR' and `$APIVERSION'.
+       * tests/defs.in ($APIVERSION):  New AC_SUBST'd variable.
+       ($ACLOCAL, $AUTOMAKE): Use it.
+       ($PATH_SEPARATOR):  New AC_SUBST'd variables.
+       ($PATH): Use it.
+
+2010-09-22  Stefano Lattarini  <address@hidden>
+
+       Manual: be more agnostic w.r.t. version control system used.
+       * doc/automake.texi (Basics of Distribution): Also refer to `.svn'
+       directories as a type of probably-unwanted files that are copied
+       regardless when adding directories to EXTRA_DIST.
+       (The dist Hook): Show a dist-hook example which removes Subversion
+       `.svn' private directories from distdir, rather than CVS private
+       directories.
+       (missing and AM_MAINTAINER_MODE): Try to be more agnostic w.r.t.
+       the version control system used.
+
+       Manual: index refer to target "git-dist", not "cvs-dist".
+       * doc/automake.texi (General Operation): Index the non-standard
+       example about "git-dist" under the "git-dist" label, not under
+       the "cvs-dist" one.
+
+       Perl modules: remove references to "Automake CVS repository".
+       * lib/Automake/Channels.pm: Update comments to refer to "Automke's
+       git repository" rather than to "Automake's CVS repository".
+       * lib/Automake/Configure_ac.pm: Likewise.
+       * lib/Automake/FileUtils.pm: Likewise.
+       * lib/Automake/Struct.pm: Likewise.
+       * lib/Automake/XFile.pm: Likewise.
+       * lib/Automake/Version.pm (=head1 DESCRIPTION): Refer to "git
+       branches" rather than "CVS branches".
+
+       Remove obsolete .cvsignore files.
+       * .cvsignore, doc/.cvsignore, lib/.cvsignore, lib/am/.cvsignore,
+       lib/Automake/.cvsignore, lib/Automake/tests/.cvsignore,
+       m4/.cvsignore, tests/.cvsignore: Files deleted.  Even when using
+       savannah's CVS readonly mirror there's no way to commit back to
+       the real repository, so this files are not worth maintaining or
+       keeping around.
+
+2010-09-21  Stefano Lattarini  <address@hidden>
+
+       * m4/dmalloc.m4: Bump serial number and copyright years.
+
+2010-09-20  Stefano Lattarini  <address@hidden>
+
+       Fix broken link in `AM_WITH_DMALLOC' help screen.
+       * m4/dmalloc.m4 (AM_WITH_DMALLOC): Refer only to the dmalloc site
+       `http://www.dmalloc.com', not to the dmalloc tarball there (which
+       seems to have been removed, substituted by multiple release
+       tarballs now).
+
+2010-09-17  Eric Blake  <address@hidden>
+
+       Avoid triple-space after period.
+       * automake.in (handle_single_transform): Avoid 3 spaces at
+       sentence end.
+       * ChangeLog.03: Likewise.
+       * lib/Automake/ChannelDefs.pm: Likewise.
+       * lib/Automake/Channels.pm (_print_message): Likewise.
+       * lib/Automake/Rule.pm (rule): Likewise.
+       * lib/Automake/Variable.pm (var): Likewise.
+       * lib/am/distdir.am: Likewise.
+       * tests/insthook.test: Likewise.
+
+2010-09-15  Stefano Lattarini  <address@hidden>
+
+       Test automake-generated portions of configure help screen.
+       * tests/help-depend.test: New test.
+       * tests/help-depend2.test: Likewise.
+       * tests/help-dmalloc.test: Likewise.
+       * tests/help-init.test: Likewise.
+       * tests/help-lispdir.test: Likewise.
+       * tests/help-maintainer.test: Likewise.
+       * tests/help-multilib.test: Likewise.
+       * tests/help-regex.test: Likewise.
+       * tests/help-silent.test: Likewise.
+       * tests/help-upc.test: Likewise.
+       * tests/mmode.test: Remove tests on `configure --help' output,
+       they are superseded by tests in `help-maintainer.test'.
+       * tests/Makefile.am (TESTS): Update.
+
+2010-09-14  Stefano Lattarini  <address@hidden>
+
+       * tests/README: Don't put GCS mandated tools in $required.
+
+2010-09-13  Ralf Wildenhues  <address@hidden>
+
+       * HACKING: Hint at old commits with `git describe' output.
+
+2010-09-12  Stefano Lattarini  <address@hidden>
+
+       Fix regression in test `colon4.test'.
+       * tests/colon4.test: Fix botched editing to `configure.in'
+       that made the test useless.  Since we are at it, improve
+       comments and make grepping of generated Makefile.in slightly
+       stricter.
+       Regression introduced by change "Modernize, improve and/or
+       extend tests `colon*.test" (Stefano Lattarini, 2010-08-08).
+
+2010-09-08  Stefano Lattarini  <address@hidden>
+
+       Do not require "gzip" explicitly in tests.
+       The gzip utility is simply expected to be present on any decent
+       target system for Automake.  So it's pointless to put it in
+       $required.
+       * tests/install2.test ($required): Do not require "gzip".
+       * tests/lex3.test: Likewise.
+       * tests/pr9.test: Likewise.
+       From a suggestion by Ralf Wildenhues.
+
+       Make some `confh*.test' tests more "semantic" (plus tweakings).
+       * tests/confh.test: Run "autoconf", "configure" and "make check",
+       instead of munging/grepping the generated `Makefile.in'.
+       * tests/confh4.test: Relax the grepping of Makefile.in w.r.t.
+       white spaces.  Do not create useless dummy source file `foo.c'
+       and useless dummy header file `acconfig.h'.
+       (configure.in): Remove superfluous call to `AC_OUTPUT'.
+       * tests/confh6.test: Add trailing `:' command.
+       * tests/confh7.test: In comments, add reference to ...
+       * tests/confh8.test: ... this new test, "semantic" sister
+       of `confh7.test'.
+       * tests/Makefile.am (TESTS): Updated.
+       Prompted by a report from Ralf Wildenhues.
+
+       Remove useless whitespace padding in XFAIL_TESTS definition.
+       * tests/Makefile.am (XFAIL_TESTS): Remove whitespace padding.
+
+2010-09-07  Ralf Wildenhues  <address@hidden>
+
+       parallel-tests: avoid command-line length limit issue.
+       * automake.in (handle_tests): New argument $makefile, new
+       substitution %MAKEFILE%.
+       (generate_makefile): Adjust.
+       * lib/am/check.am [%?PARALLEL_TESTS%] (check-TESTS): Pass
+       sanitized TEST_LOGS value as makefile snippet on standard
+       input to $(MAKE), to avoid exceeding the command line limit on
+       w32 (MSYS).
+       * NEWS: Update.
+       Report by Bob Friesenhahn.
+
+       Posix 2008 requires make to set errexit.
+       * lib/am/check.am: Update comment.
+
+2010-08-27  Stefano Lattarini  <address@hidden>
+
+       Fix bug in test missing6.test.
+       * tests/missing6.test: Fix the hack used to edit `configure.in',
+       to avoid producing a configure script that breaks with shells
+       that do not support $LINENO.  Also throw in a couple of cosmetic
+       changes.
+
+2010-08-21  Ralf Wildenhues  <address@hidden>
+
+       Improve robustness of mdate-sh script.
+       * lib/mdate-sh: Sanitize zsh behavior on startup, to ensure
+       $ls_command is word-split properly upon invocation.
+       (error): New function.
+       (main): Use it.  Improve error checking to avoid endless loop
+       in case $ls_command gave bogus output.  Fix eval quotation.
+       * tests/mdate6.test: New test, to expose eval quotation error.
+       * tests/Makefile.am: Update.
+
+2010-08-18  Stefano Lattarini  <address@hidden>
+
+       Fix potential regressions in depcomp{3,5}.test.
+       * tests/depcomp3.test: Do not uselessly escape the character `$'
+       in makefile rules, when it's used to expand a make macro.
+       * tests/depcomp5.test: Likewise.
+
+2010-08-17  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Docs: clarify how to avoid automatic dependencies tracking.
+       * doc/automake.texi (Automatic dependency tracking): Mention that
+       automatic dependencies tracking is enabled by default, but that
+       the package developer can disable it altogether.  Add a reference
+       to the proper section for a more in-depth explanation.
+
+       Fix typo in manual (`Makefile.in' instead of `Makefile.am').
+       * doc/automake.texi (Automatic dependency tracking): Fix typo.
+
+2010-08-16  Bruno Haible  <address@hidden>
+
+       Don't hide the table of contents.
+       * doc/automake.texi: Move the table of contents to the beginning.
+
+2010-08-10  Stefano Lattarini  <address@hidden>
+
+       Tweak and/or extend some `acloca*.test' tests.
+       * tests/aclocal8.test:  Ensure verbose printing of captured
+       output.
+       * tests/aclocal.test: Likewise.  Also, add trailing `:'
+       command.
+       * tests/acloca19.test: Likewise.
+       * tests/aclocal5.test: Add trailing `:' command, and prefer
+       `$me' over hard-coded test name.
+       * tests/aclocal6.test: Likewise.
+       * tests/aclocal18.test: Add trailing `:' command, and make
+       some grepping slightly stricter.
+       * tests/acloca14.test: Likewise.  Also, prefer `diff' over
+       `cmp', and add some "cosmetic" blank lines.
+
+2010-08-09  Stefano Lattarini  <address@hidden>
+
+       Tweak and extend tests `pr[!0-9]*.test'.
+       * tests/primary3.test: Add trailing `:' command.
+       * tests/primary.test: Make grepping of Automake's stderr stricter.
+       Also, add trailing `:' command, and cosmetic changes in spacing.
+       * tests/primary2.test: Likewise.
+       * tests/prefix.test: Enable `errexit' shell flags, and related
+       changes.  Add a trailing `:' command.
+       * tests/proginst.test: Likewise.
+
+       Modernize, improve and extend tests for PR (`pr[0-9]*.test').
+       * tests/pr2.test: Add trailing `:' command.
+       * tests/pr229.test: Likewise.
+       * tests/pr401.test: Likewise.
+       * tests/pr401b.test: Likewise.
+       * tests/pr401c.test: Likewise.
+       * tests/pr300-prog.test: Likewise, plus cosmetic changes in
+       spacing.
+       * tests/pr300-lib.test: Likewise.
+       * tests/pr300-ltlib.test: Likewise, and ensure verbose printing
+       of captured make stdout.
+       * tests/pr211.test: Add trailing `:' command.  Also, use the
+       `configure.in' stub created by ./defs, rather than writing it
+       from scratch.
+       * tests/pr204.test: Likewise, plus cosmetic spacing changes.
+       * tests/pr287.test: Likewise, and move setting of `errexit' shell
+       flag earlier in the script (just after inclusion of ./defs).
+       * tests/pr220.test: Make grepping of Automake's stderr stricter.
+       Also, add trailing `:' command, and cosmetic changes in spacing.
+       * tests/pr224.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Do not export
+       `CC=gcc' to configure explicitly (it's already exported globally
+       in ./defs, since we have "gcc" in $required).  Use the stub for
+       `configure.in' created by ./defs, rather than writing it from
+       scratch.  Do not create dummy files required by "gnu" mode (e.g.
+       README, NEWS), since we run automake in foreign mode anyway.
+       * tests/pr72.test: Enable `errexit' shell flags, and related
+       changes.  Extend existing checks a bit.
+       * tests/pr9.test: Likewise.  Also, avoid obsolescent constructs in
+       the generated `configure.in', and extend existing checks over the
+       generated tarball a bit.
+       * tests/pr87.test: Enable `errexit' shell flags, and related
+       changes.  Add a trailing `:' command.  Also, do not create dummy
+       files required by "gnu" mode (e.g. README, NEWS), since we run
+       automake in foreign mode anyway.
+       * tests/pr243.test: Avoid obsolescent constructs in the generated
+       `configure.in'.  Enable the `errexit' shell flag, and related
+       changes.  Cosmetic changes to spacing, add trailing `:' command,
+       and add a "FIXME" comment.
+       * tests/pr266.test: Likewise, and add explicit command line switch
+       `--enable-dependecy-tracking' to the ./configure call.
+       * tests/pr279.test: Avoid obsolescent constructs in the generated
+       `configure.in'; also, use the `configure.in' stub created by
+       ./defs, rather than writing it from scratch.  Enable `errexit'
+       shell flag, and related changes.  Add trailing `:' command.
+       * tests/pr279-2.test: Likewise, and make grepping of Makefile.in
+       stricter.
+       * tests/pr307.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Escape literal
+       dots in grep regular expressions.  Also, add a trailing `:'
+       command, and cosmetic changes to spacing.
+
+       Tests for PR: add excerpts from original bug report, for clarity.
+       * tests/pr2.test: Ditto.
+       * tests/pr9.test: Likewise.
+       * tests/pr72.test: Likewise.
+       * tests/pr87.test: Likewise.
+       * tests/pr211.test: Likewise.
+       * tests/pr220.test: Likewise.
+       * tests/pr224.test: Likewise.
+       * tests/pr229.test: Likewise.
+       * tests/pr243.test: Likewise.
+       * tests/pr266.test: Likewise.
+       * tests/pr279.test: Likewise, and tell to keep it in sync
+       with its sister test.
+       * tests/pr279-2.test: Likewise.
+
+2010-08-08  Stefano Lattarini  <address@hidden>
+
+       Tweak, extend and improve tests `cond[a-z]*.test'.
+       * tests/condd.test: Add trailing `:' command.  Typofix in
+       comment.
+       * tests/condhook.test: Make sure target `install-data-hook' is
+       not called by `make install', but that data files are installed.
+       Use proper m4 quoting in configure.in. Add trailing `:' command.
+       * tests/condhook2.test: New test, sister test of condhook, with
+       inverted semantic.
+       * tests/condinc2.test: Use proper m4 quoting in configure.in.
+       Prefer trailing `:' command over trailing `Exit 0'.
+       * tests/condman2.test: Enable errexit shell flag, and related
+       changes.  Add trailing `:' command.
+       * tests/condman.test: Likewise.  Also, do not create useless
+       dummy manpages, and use proper m4 quoting in configure.in.
+       * tests/condman3.test: New test, similar to condman.test, but
+       it also runs ./configure and "make install", and check the
+       installed files.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Modernize, improve and/or extend tests `colon*.test.
+       * tests/colon.test: Rely on the `configure.in' stub created by
+       `./defs', rather than writing one from scratch.  Do not create
+       a useless dummy file.  Add trailing `:' command.
+       * tests/colon4.test: Enable the `errexit' shell flag, and
+       related changes.  Rely on the `configure.in' stub created by
+       `./defs', rather than writing one from scratch.
+       * tests/colon7.test: Enable `errexit' shell flag, and related
+       changes.  Improve the generated `configure.in' file.  Add
+       trailing `:' command.
+       * tests/colon2.test: Likewise.  Also, add some new checks.
+       * tests/colon5.test: Improve the generated `configure.in' file.
+       Add new, much deeper checks.  Add trailing `:' command.
+       * tests/colon6.test: Likewise.
+       * tests/colon3.test: Add trailing `:' command.  Remove useless
+       comments and echos.  Improve the generated `configure.in' file.
+       make some grepping tests stricter.  Add a "FIXME" comments about
+       planned improvements.
+
+       Improve and extend tests `asm*.test'.
+       * tests/asm.test: Use configure.in stub generated by ./defs,
+       and avoid obsoleted autoconf constructs.  Make grepping of
+       Automake stderr stricter.  Do not create useless source file.
+       Improve verbose messages.  Minor cosmetic changes.  Tell to
+       keep it in sync with other sister tests asm*.test.
+       * tests/asm2.test: Likewise.
+       * tests/asm3.test: Likewise.
+
+       Modernize, improve and/or extend test scripts `conf*.test'.
+       * tests/confh5.test: Cosmetic changes.
+       * tests/conff.test: Likewise.
+       * tests/confdeps.test: Likewise.
+       * tests/conflnk.test: Likewise.
+       * tests/conflnk2.test: Likewise.
+       * tests/confsub.test: Likewise.
+       * tests/confvar.test: Likewise, and make grepping of Makefile.in
+       stricter.
+       * tests/confvar2.test: Likewise.
+       * tests/conflnk3.test: Cosmetic changes.  Re-enable a temporarily
+       disabled test (which didn't work with autoconf <= 2.59, but now we
+       are requiring autoconf 2.62, so...)
+       * tests/conflnk4.test: Cosmetic changes, and extend existing tests
+       accordingly to "TODO" comments.
+       * tests/conff2.test: Make grepping of Automake's stderr stricter.
+       Add some comments explaining why we don't use the `configure.in'
+       stub preset be ./defs.
+       * tests/confh.test: Use the `configure.in' stub created by ./defs,
+       rather than writing one from scratch, and do not call AC_OUTPUT.
+       Enable `errexit' shell flag, and related changes.  Prefer diff over
+       cmp to compare text files. Prefer perl over sed to fetch the value
+       of $(DIST_COMMON) from Makefile.in.  Make grepping of the contents
+       of $(DIST_COMMON) stricter.
+       * tests/confh4.test: Use the `configure.in' stub created by ./defs,
+       rather than writing one from scratch.  Make grepping of Makefile.in
+       stricter.
+       * tests/confh5.test: Make grepping of `config.h' stricter.  Add a
+       comment.
+       * tests/configure.test: Avoid obsolescent constructs in generated
+       `configure.ac'.  Do not write `configure.in' two times.  Escape
+       literal dots in grep regular expressions.
+       * tests/confincl.test:  Enable `errexit' shell flag, and related
+       changes.  Prefer fgrep over grep.  Other cosmetic changes.
+       * tests/config.test: Renamed to ...
+       * tests/confh6.test: ... this.  Fix m4 quoting in `configure.in',
+       and make grepping of `config.h' and `config.h.in' stricter.
+       * tests/conf2.test: Renamed ...
+       * tests/confh7.test: ... to this.  Use the `configure.in' stub
+       created by ./defs, rather than writing one from scratch.  Try to
+       run the checks both with and without AC_PROG_CC and AC_OUTPUT in
+       `configure.in'.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Minor improvements and fixes in tests `depcomp*.test'.
+       * tests/depcomp.test: Do not create useless dummy source files.
+       Add a trailing `:' command.
+       * tests/depcomp2.test: Use `unset' on the CFLAG variable to ensure
+       it's not in in the environment, rather than exporting it with an
+       empty value.  Do not pass CC=gcc to configure, as that's already
+       done in ./defs since we have gcc in $required.  Ensure verbose
+       printing of captured stderr, and normalize its checking.  Add a
+       trailing `:' command.
+       * tests/depcomp3.test: Quote literal dots and dollar characters in
+       grep regexps.  Always use `: >' rather than `touch' to create empty
+       files.  Explicitly declare phony targets as such in the created
+       Makefile.am.  Add a trailing `:' command.
+       * tests/depcomp4.test: Quote literal dots and dollar characters in
+       grep regexp.  Explicitly declare phony targets as such in the
+       created Makefile.am.  Ensure verbose printing of captured makes'
+       stoud/stderr.  Add a trailing `:' command.
+       * tests/depcomp5.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Quote literal dots
+       and dollar characters in grep regexps.  Explicitly declare phony
+       targets as such in the created Makefile.am.  Add a trailing `:'
+       command.
+       * tests/depcomp6.test: Consistently use m4 quoting in the generated
+       configure.in.  Cosmetic fixes to spacing.  Make the "dummy" `if'
+       statement required by OpenBSD's sh `set -e' more robust, and add
+       explanatory comments to it.
+       * tests/depcomp7.test: Likewise, and add  a trailing `:' command.
+
+       Separate failing part of test `all.test'.
+       * tests/all.test: Keep only (x)failing part of the test.  Working
+       checks moved out to ...
+       * tests/all2.test: ... this new test.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Modernize, improve and extend tests `subobj*.test'.
+       * tests/subobjname.test:  Add trailing `:' command.
+       * tests/subobj.test: Make grepping of `Makefile.in' stricter.
+       Escape literal dots in grep regexps.
+       * tests/subobj2.test:  Add trailing `:' command.  Do not use the
+       unportable fgrep option `-e'.
+       * tests/subobj3.test: Add trailing `:' command.
+       (configure.in): Use proper m4 quoting, and avoid obsolescent
+       constructs.
+       * tests/subobj8.test: Likewise.  Also, enable `errexit' shell
+       flag, with related changes
+       * tests/subobj4.test: Likewise.  Also, make grepping of
+       `Makefile.in' stricter.
+       * tests/subobj5.test: Add trailing `:' command.  Move setting of
+       `errexit' shell flag earlier in the script (just after inclusion
+       of ./defs).
+       (configure.in): Use the stub created by `./defs', rather than
+       writing it from scratch, and avoid obsolescent constructs.
+       * tests/subobj6.test: Add trailing `:' command.  Move setting of
+       `errexit' shell flag earlier in the script (just after inclusion
+       of ./defs).  Do not create useless dummy ac-init file `f'.
+       * tests/subobj7.test: Do not create useless dummy ac-init file
+       `f'.
+       (configure.in): Use the stub created by `./defs', rather than
+       writing it from scratch, and avoid obsolescent constructs.
+       * tests/subobj9.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Fail the test if
+       `make distcheck' fails.  Ensure verbose printing of captured make
+       stdout.  Avoid useless fork by doing simple grep instead of using
+       test -n "`COMMAND | grep ...`".
+       (configure.in): Normalize the call to AC_INIT w.r.t. other tests.
+       (Makefile.am): Explicitly mark target "print" as phony.
+       * tests/subobj10.test: Removed duplicated call to `set -e'.  Add
+       trailing `:' command.
+       (configure.in): Normalize the call to AC_INIT w.r.t. other tests.
+
+       Remove a couple of obsoleted tests.
+       * tests/fpinstall.test: Removed.
+       * tests/fpinst2.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Bootstrap: updated HACKING entry.
+       * HACKING ("Working with git"): Explain how to override the
+       autoconf and autom4te programs used by the bootstrap process.
+
+       Bootstrap: fixlet.
+       * bootstrap: Do not remove `lib/Automake/Config.pm' anymore,
+       since we don't generate it.  Correctly quote arguments of
+       `eval' builtin.  Fixed a botched error message.  Removed an
+       extra blank line.
+
+       Bootstrap: don't search perl in $PATH.
+       * bootstrap: Do not explicitly search perl in $PATH anymore.
+       ($PATH_SEPARATOR): Removed, it's no more needed.
+
+       Bootstrap: let the user choose which autoconf to use.
+       * bootstrap ($AUTOCONF): New variable, from the environment.
+       ($AUTOM4TE): Likewise, for clarity.
+       Use "$AUTOCONF" instead of calling "autoconf" directly.
+
+       Minor improvements to tests ar*.test.
+       * tests/ar.test: Add trailing `:' command.
+       * tests/ar2.test: Likewise, and make grepping of generated
+       Makefile.in stricter.
+
+2010-08-08  Ralf Wildenhues  <address@hidden>
+
+       Fix maintainer-check failure.
+       * tests/cond5.test: Quote sleep argument, this isn't about
+       time stamp differences.
+
+       Sync auxiliary files from upstream.
+       * lib/config.guess, lib/config.sub, lib/texinfo.tex:
+       Sync from upstream.
+
+2010-08-06  Stefano Lattarini  <address@hidden>
+
+       Work around a nasty bug (segfault) of Solaris make.
+       * lib/am/check.am (recheck, recheck-html): Trim trailing spaces
+       from $list, to avoid triggering a nasty bug (potential segfault)
+       on Solaris make.
+
+2010-08-06  Peter Rosin  <address@hidden>
+
+       Make cond5.test more robust on MSYS.
+       * tests/cond5.test: Add delay before the first kill attempt to
+       cater for problems with MSYS bash.
+
 2010-11-16  Peter Rosin  <address@hidden>
 
        Skip MSVC oriented tests if the shell is not capable.
@@ -220,7 +2485,7 @@
        the background automake process, but poll it every 10 seconds for
        at most 30 times (this makes the test both faster on good machines,
        and more resilient to spurious timeout-due failures when in low
-       priority or on havily-loaded systems).
+       priority or on heavily-loaded systems).
        Check also that automake writes the expected error messages on the
        standard error.
        Enable `errexit' flag, and related changes.
@@ -334,7 +2599,7 @@
        source file.
        * tests/suffix7.test: Likewise.
        * tests/suffix5.test: Enable `errexit' shell flag, and related
-       changes.  Make grepping of Makefile.in slighty stricter.
+       changes.  Make grepping of Makefile.in slightly stricter.
        * tests/suffix.test: Enable `errexit' shell flag, and related
        changes.  Also, do not redirect grep output to /dev/null, as this
        might unmotivatedly hide useful information.
@@ -349,7 +2614,7 @@
        $FGREP rather than plain grep.
        * tests/suffix11.test: Likewise.
        * tests/suffix12.test: Likewise.
-       * tests/suffix9.test: Prefet cat + here-doc over echo to append to
+       * tests/suffix9.test: Prefer cat + here-doc over echo to append to
        the `configure.in' stub.  Cosmetic changes.
        * tests/suffix13.test: Cosmetic spacing change.
 
@@ -360,7 +2625,7 @@
        useless `if' statement is indeed required.
 
        Add useful comment in test script obsolete.test.
-       * tests/obsolte.test: Add a comment explaining why we need
+       * tests/obsolete.test: Add a comment explaining why we need
        an indirection in adding $AUTOUPDATE to $required.
 
        Normalize whitespaces in 'tests/Makefile.am'.
@@ -386,7 +2651,7 @@
        changes, and a couple of unrelated cosmetic changes.
        * tests/recurs.test: Use the `configure.in' stub created by
        `./defs', rather than writing one from scratch.  Make grepping
-       of Automake stderr slighty stricter.
+       of Automake stderr slightly stricter.
        * tests/substtarg.test: Likewise.
        * tests/strip.test: Likewise, and move the call to `set -e'
        earlier (just after the inclusion of `./defs'). Also, make sure
@@ -399,7 +2664,7 @@
        in ./defs).  Avoid potential problems with unpredictable make
        output.  Finally, make grepping of Makefile.in stricter.
        * tests/substre2.test: Ensure verbose printing of the captured
-       make's output, and make its grepping slighty stricter.
+       make's output, and make its grepping slightly stricter.
        * tests/cygwin32.test: Enable `errexit' shell flag, and related
        changes.  Also, do not create useless dummy source/data files.
        * tests/scripts.test: Likewise.
@@ -412,7 +2677,7 @@
        here-doc, not using echo.
        * tests/pluseq10.test: Make sure that the captured output of
        `make' command is always displayed. Where possible, use $FGREP
-       instead of grep (this change makes some checks slighty stricter).
+       instead of grep (this change makes some checks slightly stricter).
        * tests/pluseq8.test: Enable `errexit' shell flag, with related
        changes.
        * tests/pluseq.test: Likewise.  Also, do not create useless dummy
@@ -423,7 +2688,7 @@
        * tests/pluseq4.test: Likewise.
        * tests/pluseq6.test: Likewise.
        * tests/pluseq7.test: Do not create useless dummy source file.
-       * tests/pluseq9.test: Slighty extended w.r.t. the grepping of
+       * tests/pluseq9.test: Slightly extended w.r.t. the grepping of
        Automake stderr.  Some unrelated cosmetic changes.
 
        Testsuite: ensure verbose printing of captured stderr.
@@ -483,7 +2748,7 @@
 2010-06-11  Stefano Lattarini  <address@hidden>
 
        Improve determination of PATH separator in bootstrap script.
-       * bootstrap: Detemine what the PATH separator is the same way
+       * bootstrap: Determine what the PATH separator is the same way
        autoconf does.
 
        Minor improvements in bootstrap script.
@@ -510,7 +2775,7 @@
        $AUTOMAKE, and improve the positioning of an $ACLOCAL call.
        * tests/exeext4.test: Use $FGREP instead of grep, where possible.
        Make auxiliary rules in the generated Makefile more silent.
-       These changes make some checks slighty stricter.
+       These changes make some checks slightly stricter.
        * tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails.
        * tests/gettext2.test: Place final `:' at the end of the script,
        rather than in the middle.
@@ -536,7 +2801,7 @@
        * tests/python2.test: Improved verbose messages.
 
        Make test `ammissing.test' stricter.
-       * tests/ammissing.test: Fail if $ACLOCAL succeds unexpectedly.
+       * tests/ammissing.test: Fail if $ACLOCAL succeeds unexpectedly.
        Enable `errexit' shell flag.
 
 2010-06-08  Stefano Lattarini  <address@hidden>
@@ -618,9 +2883,9 @@
        * tests/nodep.test: Likewise.
        * tests/nodepcomp.test: Likewise.
        * tests/f90only.test: Likewise, and remove botched/obsoleted
-       comments and unecessary commands.
+       comments and unnecessary commands.
        * tests/fonly.test: Likewise, and remove botched/obsoleted
-       comments and unecessary commands.
+       comments and unnecessary commands.
        * tests/discover.test: Likewise, and made stricter.
 
        Enable `errexit' shell flag in all tests cxx*.test.
@@ -753,7 +3018,7 @@
        Extend test on `nostdinc' automake option.
        * tests/nostdinc.test: Enable `errexit' shell flag.  Related and
        unrelated minor changes.  Make the grepping of the generated
-       Makefile.in slighty stricter.  Generate and run configure, so that
+       Makefile.in slightly stricter.  Generate and run configure, so that
        the generated Makefile can be grepped too.
 
 2010-05-23  Ralf Wildenhues  <address@hidden>
@@ -1100,7 +3365,7 @@
 
 -----
 
-Copyright (C) 2010  Free Software Foundation, Inc.
+Copyright (C) 2010, 2011  Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
diff --git a/ChangeLog.03 b/ChangeLog.03
index aa31380..0152d56 100644
--- a/ChangeLog.03
+++ b/ChangeLog.03
@@ -67,7 +67,7 @@
 
        * tests/txinfo24.test, tests/txinfo25.test, tests/txinfo28.test:
        Require texi2dvi-o.
-       Report from Václav Haisman.
+       Report from Václav Haisman.
 
 2003-12-10  Alexandre Duret-Lutz  <address@hidden>
 
@@ -1325,7 +1325,7 @@
        Makefile.am into DIST_COMMON here.
        * lib/am/configure.am (DIST_COMMON): Do it here, and use
        %MAKEFILE-AM% and %MAKEFILE-IN% so that items in DIST_COMMON
-       actually match the targets.   Prefix `configure' with `$(srcdir)/'
+       actually match the targets.  Prefix `configure' with `$(srcdir)/'
        to match the target.
        * tests/remake4.test: New file.
        * tests/Makefile.am (TESTS): Add remake4.test.
@@ -1928,9 +1928,9 @@
 
 2003-05-22  Alexandre Duret-Lutz  <address@hidden>
 
-       * automake.texi (maintainer-mode): s/François/Fran@,{c}ois/.
+       * automake.texi (maintainer-mode): s/François/Fran@,{c}ois/.
 
-       * lib/elisp-comp: s/François/Franc,ois/.
+       * lib/elisp-comp: s/François/Franc,ois/.
        Suggested by Paul Eggert.
 
        * automake.in: Move the "main" code at the end.
diff --git a/ChangeLog.96 b/ChangeLog.96
index 33e6542..07f71c2 100644
--- a/ChangeLog.96
+++ b/ChangeLog.96
@@ -234,7 +234,7 @@ Sun Nov 24 00:33:50 1996  Tom Tromey  <address@hidden>
        * libtool.am (.c.lo): Set --mode=compile when running libtool.
        * progs.am: Set --mode=install when running libtool.
 
-       Fix for bug reported by François Pinard:
+       Fix for bug reported by François Pinard:
        * automake.in (do_check_merge_target): New sub.
        (do_one_merge_target): No longer handle `check'.
        (handle_merge_targets): Use do_check_merge_target.
@@ -914,7 +914,7 @@ Tue Sep  3 18:50:32 1996  Tom Tromey  <address@hidden>
        NORMAL_INSTALL defined.
 
        * m4/AM_PROG_INSTALL.m4: INSTALL_SCRIPT defaults to
-       ${INSTALL_PROGRAM}.  From François Pinard.
+       ${INSTALL_PROGRAM}.  From François Pinard.
 
 Tue Aug 27 08:25:05 1996  Tom Tromey  <address@hidden>
 
@@ -962,7 +962,7 @@ Sat Aug 24 09:30:46 1996  Tom Tromey  <address@hidden>
 
        * m4/AM_INIT_AUTOMAKE.m4: Define PACKAGE and VERSION.
 
-       * m4/AM_WITH_REGEX.m4: New version from François Pinard.
+       * m4/AM_WITH_REGEX.m4: New version from François Pinard.
 
        * m4/AM_TYPE_PTRDIFF_T.m4: Use am_cv, not ac_cv.
        * m4/AM_C_PROTOTYPES.m4: Ditto.
@@ -1222,7 +1222,7 @@ Sun Aug  4 12:52:43 1996  Tom Tromey  <address@hidden>
 
        * automake.in (handle_dist_worker): Use fgrep, not grep.
 
-       * m4/AM_C_PROTOTYPES.m4: Changes from François Pinard.
+       * m4/AM_C_PROTOTYPES.m4: Changes from François Pinard.
 
        * automake.in (handle_emacs_lisp): Include lisp-clean.am in
        output.
@@ -1272,7 +1272,7 @@ Sun Jul 28 11:14:52 1996  Tom Tromey  <address@hidden>
 Fri Jul 19 10:12:27 1996  Tom Tromey  <address@hidden>
 
        * automake.in (initialize_global_constants): Put ansi2knr.c and
-       ansi2knr.1 into common_files.  Bug report from François Pinard.
+       ansi2knr.1 into common_files.  Bug report from François Pinard.
 
 Mon Jul 15 10:28:29 1996  Tom Tromey  <address@hidden>
 
@@ -1730,7 +1730,7 @@ Thu Mar 14 09:28:21 1996  Tom Tromey  <address@hidden>
        * data.am (address@hidden@DATA): Allow empty list of data.
        (address@hidden@DATA): Ditto.
        * programs.am (address@hidden@PROGRAMS): Added missing semicolon.
-       From François Pinard.
+       From François Pinard.
        (address@hidden@PROGRAMS): Fixed bug when list of programs empty.
        (address@hidden@PROGRAMS): Ditto.
 
@@ -2273,7 +2273,7 @@ Fri Jan 19 00:50:29 1996  Tom Tromey  <address@hidden>
 
 Thu Jan 18 00:25:56 1996  Tom Tromey  <address@hidden>
 
-       From François Pinard:
+       From François Pinard:
        * automake.in (handle_source_transform): Transform $o file into .P
        file.
        (handle_dist_worker): Handle case where DISTFILES includes
@@ -2286,7 +2286,7 @@ Sun Jan 14 13:54:16 1996  Tom Tromey  <address@hidden>
 
        * automake.in (scan_configure): Look for NLS support.
 
-       Changes from François Pinard:
+       Changes from François Pinard:
        * texinfos.am (install-info): Correctly install when build dir is
        not srcdir.
        * tags-subd.am (ID): Indentation change.
@@ -2317,7 +2317,7 @@ Sat Jan 13 00:18:06 1996  Tom Tromey  <address@hidden>
        * texi-version.am (mostlyclean-vti): Remove version.tmp, not
        *.tmp.
 
-       * automake.in (handle_dist): Chmod distdir 777.  From François
+       * automake.in (handle_dist): Chmod distdir 777.  From François
        Pinard.
 
        * automake.in (scan_configure): New function.
@@ -2344,7 +2344,7 @@ Thu Jan 11 23:14:18 1996  Tom Tromey  <address@hidden>
 
 Tue Jan  9 11:24:14 1996  Tom Tromey  <address@hidden>
 
-       Fixes from François Pinard:
+       Fixes from François Pinard:
        * depend.am ($(srcdir)/.deps/%.P): Handle deansification.
        * automake.in (get_object_extension): Use $o, not $(kr)o.
        (handle_source_transform): Don't look for $(kr)c files.
@@ -2394,7 +2394,7 @@ Fri Jan  5 10:31:19 1996  Tom Tromey  <address@hidden>
 
        * Added copyright notice to each .am file.
 
-       * automake.in: Cleanups from François Pinard to avoid $#.
+       * automake.in: Cleanups from François Pinard to avoid $#.
        (require_argument): Fixed sense of test.
        (set_strictness): Bug fix.
 
@@ -2450,7 +2450,7 @@ Wed Jan  3 00:05:40 1996  Tom Tromey  <address@hidden>
        ABOUT-GNU.
        (check_gnu_standards): Require file COPYING.
 
-       From François Pinard:
+       From François Pinard:
        * automake.in (file_contents): Comment out "warn"s.
        (usage): Use 4 columns.
        (USAGE_FORMAT): Ditto.
@@ -2476,7 +2476,7 @@ Wed Jan  3 00:05:40 1996  Tom Tromey  <address@hidden>
 Tue Jan  2 23:33:24 1996  Tom Tromey  <address@hidden>
 
        * texinfos.am (install-info): Look in $d for info files.  From
-       François Pinard.
+       François Pinard.
 
        * depend.am ($(srcdir)/.deps/%.P): Fixed regexp.
 
@@ -2495,7 +2495,7 @@ Mon Jan  1 15:43:25 1996  Tom Tromey  <address@hidden>
        (read_am_file): Ditto.
        (do_one_clean_target): Removed spurious newline.
 
-       Some changes from François Pinard:
+       Some changes from François Pinard:
        * Removed trailing whitespace from all '.am' files.
        * tags-subd.am (ID): Use &&, not ;.
        (TAGS): Ditto.
@@ -2557,7 +2557,7 @@ Sun Dec 31 13:04:59 1995  Tom Tromey  <address@hidden>
        * automake.in (initialize_global_constants): Don't print body of
        loop at make time.
 
-       Changes from François Pinard:
+       Changes from François Pinard:
        * depend.am (MKDEP): Include DEFS, INCLUDES, CPPFLAGS, CFLAGS.
        (DEP_FILES): Put dependency files in $(srcdir).
        Look in $(srcdir) when including dependency files.
diff --git a/ChangeLog.98 b/ChangeLog.98
index bb719c3..1fcc56c 100644
--- a/ChangeLog.98
+++ b/ChangeLog.98
@@ -166,7 +166,7 @@ Fri Dec 11 10:23:17 1998  Matthew D. Langston  
<address@hidden>
 
        * Makefile.am (cvs-dist): Run `cvs tag' operation in srcdir.
 
-       Some bugs from François Pinard:
+       Some bugs from François Pinard:
        * automake.in (usage): Remove duplicates in file list.
 
        * automake.in (usage): Print files in column-major order.
@@ -1485,7 +1485,7 @@ Sun Jun 22 14:01:59 1997  Tom Tromey  <address@hidden>
        when actually installing.  From Gord Matzigkeit.
 
        * automake.in (handle_tests): Exit status `77' means `ignore
-       test'.  From François Pinard.
+       test'.  From François Pinard.
        (handle_tests) Also, make banner same size as text.
 
        * automake.in (handle_configure): Don't handle PRE_BUILT_SOURCES.
@@ -1579,7 +1579,7 @@ Sun May 11 13:59:14 1997  Tom Tromey  <address@hidden>
        * kr-extra.am (clean-krextra): Remove ansi2knr here, not in
        distclean-krextra.
 
-       * missing: Regularized grammar.  From François Pinard.
+       * missing: Regularized grammar.  From François Pinard.
 
 Sat May 10 16:48:47 1997  Tom Tromey  <address@hidden>
 
@@ -1641,7 +1641,7 @@ Wed Apr 30 14:46:37 1997  Ian Lance Taylor  
<address@hidden>
 
 Tue Apr 29 19:11:45 1997  Tom Tromey  <address@hidden>
 
-       * INSTALL, mkinstalldirs, install-sh: Update from François
+       * INSTALL, mkinstalldirs, install-sh: Update from François
        Pinard.
 
        * aclocal.in (add_macro): If AC_ macro was defined, then mark it
@@ -2001,7 +2001,7 @@ Tue Mar 18 17:20:03 1997  Tom Tromey  <address@hidden>
        * m4/init.m4 (missing_dir): Use AM_MISSING_PROG.
        * m4/missing.m4: New file.
 
-       `missing' changes from François Pinard:
+       `missing' changes from François Pinard:
        * Everywhere: Use ACLOCAL_M4 to name aclocal.m4 file; ACLOCAL now
        names aclocal program.
        * m4/init.m4: Replace programs with `missing' if not found.
@@ -2140,7 +2140,7 @@ Tue Feb  4 18:29:42 1997  Tom Tromey  <address@hidden>
        (handle_aclocal_m4): Use ACLOCAL_AMFLAGS.
        (handle_clean): Put -recursive target before -am target.
        (handle_merge_targets): Put basename of $config_name on @all.
-       Test confsub.test.  From Ramón García Fernández.
+       Test confsub.test.  From Ramón García Fernández.
 
 Tue Jan 28 22:19:04 1997  Tom Tromey  <address@hidden>
 
diff --git a/HACKING b/HACKING
index f25a0e0..873243c 100644
--- a/HACKING
+++ b/HACKING
@@ -7,7 +7,6 @@
 * Don't put this file into the distribution.  Don't mention it in the
   ChangeLog.
 
-
 ================================================================
 = Administrivia
 
@@ -21,6 +20,10 @@
 * If somebody reports a new bug, mention his name in the ChangeLog entry
   and in the test case you write.  Put him into THANKS.
 
+* When documenting a non-trivial idiom or example in the manual, be
+  sure to add a test case for it, and to reference such test case from
+  a proper Texinfo comment.
+
 * The correct response to most actual bugs is to write a new test case
   which demonstrates the bug.  Then fix the bug, re-run the test suite,
   and check everything in.
@@ -33,17 +36,17 @@
       texinfo.tex (address@hidden),
   Most of them are updated before release with `make fetch'.
 
-* Changes other than bug fixes must be mentioned in NEWS
-
+* Changes other than bug fixes must be mentioned in NEWS.  Important
+  bug fixes should be mentioned in NEWS, too.
 
 ================================================================
 = Naming
 
 * We've adopted the convention that internal AC_SUBSTs should be
-  named with a leading `am__', and internally generated targets should
-  be named with a leading `am--'.  This convention is very new
-  (as of Feb 7 2001) and so it isn't yet universally used.  But all
-  new code should use it.
+  named with a leading `am__', and internally generated targets
+  should be named with a leading `am--'.  This convention, although
+  in place from at least February 2001, isn't yet universally used.
+  But all new code should use it.
 
   We used to use `_am_' as the prefix for an internal AC_SUBST.
   However, it turns out that NEWS-OS 4.2R complains if a Makefile
@@ -60,7 +63,7 @@
 * Use `##' comments liberally.  Comment anything even remotely
   unusual.
 
-* Never use basename or dirname.  Instead use sed
+* Never use basename or dirname.  Instead use sed.
 
 * Do not use `cd' within back-quotes, use `$(am__cd)' instead.
   Otherwise the directory name may be printed, depending on CDPATH.
@@ -73,7 +76,6 @@
   "important" command it runs.  The printed commands should be preceded
   by a single space.
 
-
 ================================================================
 = Editing automake.in and aclocal.in
 
@@ -88,9 +90,6 @@
   &, just convert the old code as you work on it, and write new
   code without.
 
-* Perl 5 is now OK.
-
-
 ================================================================
 = Working with git
 
@@ -99,7 +98,12 @@
   tree, so the resulting files (aclocal.m4 and Makefile.in) should
   be the same as you would get if you install this version of
   automake and use it to generate those files.  Be sure to have the
-  latest stable version of Autoconf installed.
+  latest stable version of Autoconf installed.  If such version is
+  not installed as "autoconf", pass it explicitly (along with the
+  accompanying "autom4te") when calling `bootstrap' and `configure'.
+  For example:
+    $ AUTOCONF=autoconf2.68 AUTOM4TE=autom4te2.68 ./bootstrap
+    $ ./configure AUTOCONF=autoconf2.68 AUTOM4TE=autom4te2.68
 
 * Dependent files aclocal.m4, configure and Makefile.in in all
   directories should be up to date in the git repository, so that
@@ -137,9 +141,13 @@
   # if all seems ok, then actually push:
   git push origin maint branch-1.11 master
 
-* For bug fixes of long-standing bugs, it may be useful to commit them to
-  a new branch based off of the commit that introduced the bug, and merge
-  this bugfix branch into active branches that descend from the buggy commit.
+* When fixing a bug (especially a long-standing one), it may be useful
+  to commit the fix to a new temporary branch based off the commit that
+  introduced the bug.  Then this "bugfix branch" can be merged into all
+  the active branches descending from the buggy commit.  This offers a
+  simple way to fix the bug consistently and effectively.
+
+* When referring to older commits, use 'git describe' output as pointer.
 
 * There may be a number of longer-lived feature branches for new developments.
   They should be based off of a common ancestor of all active branches to
@@ -164,13 +172,15 @@
 ================================================================
 = Test suite
 
-* Use "make check" and "make maintainer-check" liberally
+* Use "make check" and "make maintainer-check" liberally.
 
-* Make sure each test file is executable
+* Make sure each test file is executable.
 
 * Use `keep_testdirs=yes' to keep test directories for successful
   tests also.
 
+* See file `tests/README' for more information.
+
 ================================================================
 = Release procedure
 
@@ -234,7 +244,8 @@
 
 -----
 
-Copyright (C) 2003, 2007, 2008, 2010 Free Software Foundation, Inc.
+Copyright (C) 2003, 2007, 2008, 2010, 2011 Free Software Foundation,
+Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/Makefile.am b/Makefile.am
index 3aead75..51eeb23 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,8 @@
 ## Makefile for Automake.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -76,6 +77,8 @@ do_subst = sed \
   -e 's,address@hidden@],$(PERL),g' \
   -e 's,address@hidden@],$(PERL_THREADS),g' \
   -e 's,address@hidden@],$(SHELL),g' \
+  -e 's,address@hidden@],$(am_AUTOCONF),g' \
+  -e 's,address@hidden@],$(am_AUTOM4TE),g' \
   -e 's,address@hidden@],$(VERSION),g' \
   -e 's,address@hidden@],Generated from address@hidden; do not edit by 
hand.,g' \
   -e 's,address@hidden@],$(datadir),g'
@@ -111,7 +114,9 @@ dist-hook:
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
 syntax_check_rules = \
+sc_test_names \
 sc_diff_automake_in_automake \
+sc_diff_aclocal_in_automake \
 sc_perl_syntax \
 sc_no_brace_variable_expansions \
 sc_rm_minus_f \
@@ -131,6 +136,9 @@ sc_tests_plain_make \
 sc_tests_plain_autoconf \
 sc_tests_plain_autoupdate \
 sc_tests_plain_automake \
+sc_tests_plain_autom4te \
+sc_tests_plain_autoheader \
+sc_tests_plain_autoreconf \
 sc_tests_here_document_format \
 sc_tests_Exit_not_exit \
 sc_tests_automake_fails \
@@ -140,6 +148,7 @@ sc_tests_required_after_defs \
 sc_tests_overriding_macros_on_cmdline \
 sc_tests_plain_sleep \
 sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
 sc_mkdir_p \
 sc_perl_at_substs \
 sc_unquoted_DESTDIR \
@@ -150,15 +159,82 @@ sc_at_in_texi
 $(syntax_check_rules): automake aclocal
 maintainer-check: $(syntax_check_rules)
 
-## This check avoids accidental configure substitutions in the source.
-## There are exactly 8 lines that should be modified.  This works out
-## to 28 lines of diffs.
+## Look for test whose names can cause spurious failures when used as
+## first argument to AC_INIT (chiefly because they might contain an
+## m4/m4sugar builtin or macro name).
+m4_builtins = \
+  __gnu__ \
+  __unix__ \
+  bpatsubst \
+  bregexp \
+  builtin \
+  changecom \
+  changequote \
+  changeword \
+  debugfile \
+  debugmode \
+  decr \
+  define \
+  defn \
+  divert \
+  divnum \
+  dnl \
+  dumpdef \
+  errprint \
+  esyscmd \
+  eval \
+  format \
+  ifdef \
+  ifelse \
+  include \
+  incr \
+  index \
+  indir \
+  len \
+  m4exit \
+  m4wrap \
+  maketemp \
+  mkstemp \
+  patsubst \
+  popdef \
+  pushdef \
+  regexp \
+  shift \
+  sinclude \
+  substr \
+  symbols \
+  syscmd \
+  sysval \
+  traceoff \
+  traceon \
+  translit \
+  undefine \
+  undivert
+sc_test_names:
+       @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
+        m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
+        if ls tests/*.test | LC_ALL=C grep -E "$$m4_macro_rx"; then \
+          echo "the names of the tests above can be problematic" 1>&2; \
+          echo "Avoid test names that contain names of m4 macros" 1>&2; \
+          exit 1; \
+        fi
+
+## These check avoids accidental configure substitutions in the source.
+## There are exactly 9 lines that should be modified from automake.in to
+## automake, and 10 lines that should be modified from aclocal.in to
+## aclocal; these wors out to 32 and 34 lines of diffs, respectively.
 sc_diff_automake_in_automake:
-       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
+       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \
          echo "found too many diffs between automake.in and automake" 1>&2; \
          diff -c $(srcdir)/automake.in automake; \
          exit 1; \
        fi
+sc_diff_aclocal_in_aclocal:
+       @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \
+         echo "found too many diffs between aclocal.in and aclocal" 1>&2; \
+         diff -c $(srcdir)/aclocal.in aclocal; \
+         exit 1; \
+       fi
 
 ## Syntax check with default Perl (on my machine, Perl 5).
 sc_perl_syntax:
@@ -261,9 +337,9 @@ sc_perl_local_no_parens:
          exit 1; \
        fi
 
-## Allow only `local $_' in Automake.
+## Allow only few variables to be localized in Automake.
 sc_perl_local:
-       @if grep -v '^[ \t]*local \$$_;' $(srcdir)/automake.in | \
+       @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
                grep '^[ \t]*local [^*]'; then \
          echo "Please avoid \`local'." 1>&2; \
          exit 1; \
@@ -293,25 +369,46 @@ sc_tests_plain_make:
 
 ## Tests should never call autoconf directly.
 sc_tests_plain_autoconf:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoconf'; 
then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoconf\>'; 
then \
          echo 'Do not run "autoconf" in the above tests.  Use "$$AUTOCONF" 
instead.' 1>&2; \
          exit 1; \
        fi
 
 ## Tests should never call autoupdate directly.
 sc_tests_plain_autoupdate:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoupdate'; 
then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      
]*autoupdate\>'; then \
          echo 'Do not run "autoupdate" in the above tests.  Use "$$AUTOUPDATE" 
instead.' 1>&2; \
          exit 1; \
        fi
 
 ## Tests should never call automake directly.
 sc_tests_plain_automake:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[   
]*automake([^:]|$$)'; then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[   
]*automake\>([^:]|$$)'; then \
          echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" 
instead.' 1>&2;  \
          exit 1; \
        fi
 
+## Tests should never call autoheader directly.
+sc_tests_plain_autoheader:
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      
]*autoheader\>'; then \
+         echo 'Do not run "automake" in the above tests.  Use "$$AUTOHEADER" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+## Tests should never call autoreconf directly.
+sc_tests_plain_autoreconf:
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      
]*autoreconf\>'; then \
+         echo 'Do not run "automake" in the above tests.  Use "$$AUTORECONF" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+## Tests should never call autom4te directly.
+sc_tests_plain_autom4te:
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autom4te\>'; 
then \
+         echo 'Do not run "automake" in the above tests.  Use "$$AUTOM4TE" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
 ## Tests should only use END and EOF for here documents
 ## (so that the next test is effective).
 sc_tests_here_document_format:
@@ -322,9 +419,10 @@ sc_tests_here_document_format:
 
 ## Tests should never call exit directly, but use Exit.
 ## This is so that the exit status is transported correctly across the 0 trap.
-## Ignore comments, and ignore one perl line in ext2.test.
+## Ignore comments, testsuite self tests, and one perl line in ext2.test.
 sc_tests_Exit_not_exit:
        @found=false; for file in $(srcdir)/tests/*.test; do \
+         case $$file in */self-check-*.test) continue;; esac; \
          res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \
                      -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \
          if test -n "$$res"; then \
@@ -346,14 +444,14 @@ sc_tests_automake_fails:
 
 ## Tests should never call aclocal directly.
 sc_tests_plain_aclocal:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal'; 
then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal\>'; 
then \
          echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" 
instead.' 1>&2;  \
          exit 1; \
        fi
 
 ## Tests should never call perl directly.
 sc_tests_plain_perl:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*perl'; then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*perl\>'; then 
\
          echo 'Do not run "perl" in the above tests.  Use "$$PERL" instead.' 
1>&2; \
          exit 1; \
        fi
@@ -368,17 +466,26 @@ sc_tests_required_after_defs:
        done
 
 ## Overriding a Makefile macro on the command line is not portable when
-## recursive targets are used.  Better use an envvar.  SHELL is an exception,
-## POSIX says it can't come from the environment.  V and DESTDIRS are 
exceptions,
-## too, as package authors are urged not to initialize them anywhere.
+## recursive targets are used.  Better use an envvar.  SHELL is an
+## exception, POSIX says it can't come from the environment.  V, DESTDIR,
+## DISTCHECK_CONFIGURE_FLAGS and DISABLE_HARD_ERRORS are exceptions, too,
+## as package authors are urged not to initialize them anywhere.
 sc_tests_overriding_macros_on_cmdline:
        @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(srcdir)/tests/*.test; 
then \
          echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e 
SHELL=$$SHELL"' 1>&2; \
          echo ' in the above lines, it is more portable.' 1>&2; \
          exit 1; \
        fi
-       @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//' 
$(srcdir)/tests/*.test | \
-           grep '\$$MAKE .*=' ; then \
+## Also try to account for usages like "$MAKE || st=$?".
+       @if sed -e 's/ || .*//' -e 's/ && .*//' \
+               -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
+               -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
+## DISTCHECK_CONFIGURE_FLAGS is allowed to contain whitespace in its
+## definition, so the more complex substitutions below.
+               -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
+             $(srcdir)/tests/*.test | grep '\$$MAKE .*='; then \
          echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above 
lines,' 1>&2; \
          echo 'it is more portable.' 1>&2; \
          exit 1; \
@@ -409,6 +516,13 @@ sc_tests_plain_egrep_fgrep:
          exit 1; \
        fi
 
+## Using `:' as a PATH separator is not portable.
+sc_tests_PATH_SEPARATOR:
+       @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+         echo "Use \`\$$PATH_SEPARATOR', not \`:', in PATH definitions above." 
1>&2; \
+         exit 1; \
+       fi
+
 sc_mkdir_p:
        @if grep 'mkdir_p' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
diff --git a/Makefile.in b/Makefile.in
index 528b80e..35a9cbd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,8 @@
 @SET_MAKE@
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -194,6 +195,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -261,6 +265,8 @@ do_subst = sed \
   -e 's,address@hidden@],$(PERL),g' \
   -e 's,address@hidden@],$(PERL_THREADS),g' \
   -e 's,address@hidden@],$(SHELL),g' \
+  -e 's,address@hidden@],$(am_AUTOCONF),g' \
+  -e 's,address@hidden@],$(am_AUTOM4TE),g' \
   -e 's,address@hidden@],$(VERSION),g' \
   -e 's,address@hidden@],Generated from address@hidden; do not edit by 
hand.,g' \
   -e 's,address@hidden@],$(datadir),g'
@@ -269,7 +275,9 @@ do_subst = sed \
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
 syntax_check_rules = \
+sc_test_names \
 sc_diff_automake_in_automake \
+sc_diff_aclocal_in_automake \
 sc_perl_syntax \
 sc_no_brace_variable_expansions \
 sc_rm_minus_f \
@@ -289,6 +297,9 @@ sc_tests_plain_make \
 sc_tests_plain_autoconf \
 sc_tests_plain_autoupdate \
 sc_tests_plain_automake \
+sc_tests_plain_autom4te \
+sc_tests_plain_autoheader \
+sc_tests_plain_autoreconf \
 sc_tests_here_document_format \
 sc_tests_Exit_not_exit \
 sc_tests_automake_fails \
@@ -298,12 +309,62 @@ sc_tests_required_after_defs \
 sc_tests_overriding_macros_on_cmdline \
 sc_tests_plain_sleep \
 sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
 sc_mkdir_p \
 sc_perl_at_substs \
 sc_unquoted_DESTDIR \
 sc_tabs_in_texi \
 sc_at_in_texi
 
+m4_builtins = \
+  __gnu__ \
+  __unix__ \
+  bpatsubst \
+  bregexp \
+  builtin \
+  changecom \
+  changequote \
+  changeword \
+  debugfile \
+  debugmode \
+  decr \
+  define \
+  defn \
+  divert \
+  divnum \
+  dnl \
+  dumpdef \
+  errprint \
+  esyscmd \
+  eval \
+  format \
+  ifdef \
+  ifelse \
+  include \
+  incr \
+  index \
+  indir \
+  len \
+  m4exit \
+  m4wrap \
+  maketemp \
+  mkstemp \
+  patsubst \
+  popdef \
+  pushdef \
+  regexp \
+  shift \
+  sinclude \
+  substr \
+  symbols \
+  syscmd \
+  sysval \
+  traceoff \
+  traceon \
+  translit \
+  undefine \
+  undivert
+
 WGET = wget
 WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
 WGET_SV_GIT_CF = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
@@ -321,7 +382,7 @@ texinfo.tex
 all: all-recursive
 
 .SUFFIXES:
-am--refresh:
+am--refresh: Makefile
        @:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
@@ -663,6 +724,7 @@ distcheck: dist
          && am__cwd=`pwd` \
          && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -726,10 +788,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -873,13 +940,27 @@ dist-hook:
 .PHONY: $(syntax_check_rules)
 $(syntax_check_rules): automake aclocal
 maintainer-check: $(syntax_check_rules)
+sc_test_names:
+       @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
+        m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
+        if ls tests/*.test | LC_ALL=C grep -E "$$m4_macro_rx"; then \
+          echo "the names of the tests above can be problematic" 1>&2; \
+          echo "Avoid test names that contain names of m4 macros" 1>&2; \
+          exit 1; \
+        fi
 
 sc_diff_automake_in_automake:
-       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
+       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \
          echo "found too many diffs between automake.in and automake" 1>&2; \
          diff -c $(srcdir)/automake.in automake; \
          exit 1; \
        fi
+sc_diff_aclocal_in_aclocal:
+       @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \
+         echo "found too many diffs between aclocal.in and aclocal" 1>&2; \
+         diff -c $(srcdir)/aclocal.in aclocal; \
+         exit 1; \
+       fi
 
 sc_perl_syntax:
        perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
@@ -967,7 +1048,7 @@ sc_perl_local_no_parens:
        fi
 
 sc_perl_local:
-       @if grep -v '^[ \t]*local \$$_;' $(srcdir)/automake.in | \
+       @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
                grep '^[ \t]*local [^*]'; then \
          echo "Please avoid \`local'." 1>&2; \
          exit 1; \
@@ -993,23 +1074,41 @@ sc_tests_plain_make:
        fi
 
 sc_tests_plain_autoconf:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoconf'; 
then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoconf\>'; 
then \
          echo 'Do not run "autoconf" in the above tests.  Use "$$AUTOCONF" 
instead.' 1>&2; \
          exit 1; \
        fi
 
 sc_tests_plain_autoupdate:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoupdate'; 
then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      
]*autoupdate\>'; then \
          echo 'Do not run "autoupdate" in the above tests.  Use "$$AUTOUPDATE" 
instead.' 1>&2; \
          exit 1; \
        fi
 
 sc_tests_plain_automake:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[   
]*automake([^:]|$$)'; then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[   
]*automake\>([^:]|$$)'; then \
          echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" 
instead.' 1>&2;  \
          exit 1; \
        fi
 
+sc_tests_plain_autoheader:
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      
]*autoheader\>'; then \
+         echo 'Do not run "automake" in the above tests.  Use "$$AUTOHEADER" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+sc_tests_plain_autoreconf:
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      
]*autoreconf\>'; then \
+         echo 'Do not run "automake" in the above tests.  Use "$$AUTORECONF" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
+sc_tests_plain_autom4te:
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autom4te\>'; 
then \
+         echo 'Do not run "automake" in the above tests.  Use "$$AUTOM4TE" 
instead.' 1>&2;  \
+         exit 1; \
+       fi
+
 sc_tests_here_document_format:
        @if grep '<<' $(srcdir)/tests/*.test | grep -v 'END' | grep -v 'EOF'; 
then \
          echo 'Use here documents with "END" and "EOF" only, for 
greppability.' 1>&2; \
@@ -1018,6 +1117,7 @@ sc_tests_here_document_format:
 
 sc_tests_Exit_not_exit:
        @found=false; for file in $(srcdir)/tests/*.test; do \
+         case $$file in */self-check-*.test) continue;; esac; \
          res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \
                      -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \
          if test -n "$$res"; then \
@@ -1037,13 +1137,13 @@ sc_tests_automake_fails:
        fi
 
 sc_tests_plain_aclocal:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal'; 
then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal\>'; 
then \
          echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" 
instead.' 1>&2;  \
          exit 1; \
        fi
 
 sc_tests_plain_perl:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*perl'; then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*perl\>'; then 
\
          echo 'Do not run "perl" in the above tests.  Use "$$PERL" instead.' 
1>&2; \
          exit 1; \
        fi
@@ -1062,8 +1162,13 @@ sc_tests_overriding_macros_on_cmdline:
          echo ' in the above lines, it is more portable.' 1>&2; \
          exit 1; \
        fi
-       @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//' 
$(srcdir)/tests/*.test | \
-           grep '\$$MAKE .*=' ; then \
+       @if sed -e 's/ || .*//' -e 's/ && .*//' \
+               -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
+               -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
+               -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
+             $(srcdir)/tests/*.test | grep '\$$MAKE .*='; then \
          echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above 
lines,' 1>&2; \
          echo 'it is more portable.' 1>&2; \
          exit 1; \
@@ -1090,6 +1195,12 @@ sc_tests_plain_egrep_fgrep:
          exit 1; \
        fi
 
+sc_tests_PATH_SEPARATOR:
+       @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+         echo "Use \`\$$PATH_SEPARATOR', not \`:', in PATH definitions above." 
1>&2; \
+         exit 1; \
+       fi
+
 sc_mkdir_p:
        @if grep 'mkdir_p' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
diff --git a/NEWS b/NEWS
index 6971bd7..b59a820 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
 New in 1.11.0a:
 
+* WARNING: Future backward-incompatibilities!
+
+  - The Automake support for automatic de-ANSI-fication will be removed in
+    the next major Automake release (1.12).
+
 * Miscellaneous changes:
 
   - The `lzma' compression scheme and associated automake option `dist-lzma'
@@ -8,12 +13,22 @@ New in 1.11.0a:
   - The `compile' script now converts some options for MSVC for a better
     user experience.  Similarly, the new `ar-lib' script wraps Microsoft lib.
 
+  - A developer that needs to pass specific flags to configure at "make
+    distcheck" time can now, and indeed he's advised to, do so by defining
+    the developer-reserved makefile variable AM_DISTCHECK_CONFIGURE_FLAGS,
+    instead of the old DISTCHECK_CONFIGURE_FLAGS.
+    The DISTCHECK_CONFIGURE_FLAGS variable should now be reserved for the
+    user; still, the old Makefile.am files that used to define it should
+    still continue to work as before.
+
 Bugs fixed in 1.11.0a:
 
 * Bugs introduced by 1.11:
 
   - The `parallel-tests' test driver works around a GNU make 3.80 bug with
-    trailing white space in the test list (`TESTS = foo $(EMPTY)').
+    trailing white space in the test list (`TESTS = foo $(EMPTY)'), and
+    does not report spurious successes when used with concurrent FreeBSD
+    make (e.g., "make check -j3").
 
   - The `silent-rules' option now also silences all compile rules if dependency
     tracking is disabled.  Also, when `silent-rules' is not used, the output 
from
@@ -27,6 +42,9 @@ Bugs fixed in 1.11.0a:
 
 * Long standing bugs:
 
+  - Automake now warns about more primary/directory invalid combinations,
+    such as "doc_LIBRARIES" or "pkglib_PROGRAMS".
+
   - On Darwin 9, `pythondir' and `pyexecdir' pointed below `/Library/Python'
     even if the `--prefix' argument pointed outside of a system directory.
     AM_PATH_PYTHON has been fixed to ignore the value returned from python's
@@ -48,6 +66,26 @@ Bugs fixed in 1.11.0a:
   - The order of Yacc and Lex flags is fixed to be consistent with other
     languages: $(AM_YFLAGS) comes before $(YFLAGS), and $(AM_LFLAGS) before
     $(LFLAGS), so that the user variables override the developer variables.
+
+  - Rules generated by Automake now try harder to not change any files when
+    `make -n' is invoked.  Fixes include compilation of Emacs Lisp, Vala, or
+    Yacc source files and the rule to update config.h.
+
+  - The code for automatic dependency tracking works around a Solaris
+    make bug triggered by sources containing repeated slashes when the
+    `subdir-objects' option was used.
+
+  - The parallel-tests driver now does not produce erroneous results
+    with Tru64/OSF 5.1 sh upon unreadable log files any more.
+
+  - The makedepend and hp depmodes now works better with VPATH builds.
+
+  - Java sources specified with check_JAVA are not compiled anymore upon
+    "make all", but only upon "make check".
+
+  - Now aclocal and automake, when they've to spawn autoconf or autom4te
+    processes, honour the configure-time definitions of AUTOCONF and
+    AUTOM4TE.
 
 New in 1.11:
 
@@ -1420,7 +1458,7 @@ New in 0.32:
 
 New in 0.31:
 * Bug fixes
-* Documentation updates (many from François Pinard)
+* Documentation updates (many from François Pinard)
 * strictness `normal' now renamed to `foreign'
 * Renamed --install-missing to --add-missing
 * Now handles AC_CONFIG_AUX_DIR
@@ -1478,7 +1516,7 @@ New in 0.26:
 * Comments in Makefile.am are placed more intelligently in Makefile.in
 * Generates .PHONY target
 * Rule or macro in Makefile.am now overrides contents of Automake file
-* Substantial cleanups from François Pinard
+* Substantial cleanups from François Pinard
 
 New in 0.25:
 * Bug fixes.
@@ -1520,7 +1558,8 @@ New in 0.20:
 -----
 
 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-2004, 2005, 2006, 2007  Free Software Foundation, Inc.
+2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011  Free Software
+Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/README b/README
index de361be..eb49e71 100644
--- a/README
+++ b/README
@@ -43,7 +43,7 @@ address@hidden if you want to receive them.
 
 -----
 
-Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2003
+Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2003, 2008, 2009, 2011
   Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
diff --git a/THANKS b/THANKS
index b3ceae6..f83e1fc 100644
--- a/THANKS
+++ b/THANKS
@@ -37,6 +37,7 @@ Benoit Sigoure                address@hidden
 Bernard Giroud         address@hidden
 Bernard Urban          address@hidden
 Bernd Jendrissek       address@hidden
+Bert Wesarg            address@hidden
 Bill Currie            address@hidden
 Bill Davidson          address@hidden
 Bill Fenner            address@hidden
@@ -66,7 +67,7 @@ Dalibor Topic         address@hidden
 danbp                  address@hidden
 Daniel Jacobowitz      address@hidden
 Daniel Kahn Gillmor    address@hidden
-Daniel Richard G.      address@hidden
+Daniel Richard G.      address@hidden
 Dave Brolley           address@hidden
 Dave Korn              address@hidden
 Dave Morrison          address@hidden
@@ -117,6 +118,7 @@ Geoffrey Keating    address@hidden
 Glenn Amerine          address@hidden
 Gord Matzigkeit                address@hidden
 Gordon Sadler          address@hidden
+Graham Reitz           address@hidden
 Greg A. Woods          address@hidden
 Greg Schafer           address@hidden
 Guido Draheim          address@hidden
@@ -131,10 +133,11 @@ Harlan Stenn              address@hidden
 He Li                  address@hidden
 Henrik Frystyk Nielsen address@hidden
 Ian Lance Taylor       address@hidden
+Ignacy Gawedzki                address@hidden
 Илья Н. Голубев            address@hidden
 Imacat                 address@hidden
 Inoue                  address@hidden
-Jack Kelly             address@hidden
+Jack Kelly             address@hidden
 James Amundson         address@hidden
 James Henstridge       address@hidden
 James R. Van Zandt     address@hidden
@@ -223,6 +226,7 @@ Matthias Andree             address@hidden
 Matthias Clasen                address@hidden
 Matthias Klose         address@hidden
 Maxim Sinev            address@hidden
+Maynard Johnson                address@hidden
 Merijn de Jonge                address@hidden
 Michael Brantley       address@hidden
 Michael Ploujnikov     address@hidden
@@ -277,6 +281,7 @@ Peter O'Gorman              address@hidden
 Peter Rosin            address@hidden
 Peter Seiderer         address@hidden
 Petter Reinholdtsen    address@hidden
+Petteri Räty          address@hidden
 Phil Edwards           address@hidden
 Phil Nelson            address@hidden
 Philip Fong            address@hidden
@@ -335,6 +340,7 @@ Theodoros V. Kalamatianos address@hidden
 Thien-Thi Nguyen       address@hidden
 Thomas Fitzsimmons     address@hidden
 Thomas Gagne           address@hidden
+Thomas Klausner                address@hidden
 Thomas Morgan          address@hidden
 Thomas Schwinge                address@hidden
 Thomas Tanner          address@hidden
@@ -359,6 +365,7 @@ William S Fulton    address@hidden
 Yann Droneaud          address@hidden
 Younes Younes          address@hidden
 Zack Weinberg          address@hidden
+Zbigniew Jędrzejewski-Szmek address@hidden
 Zoltan Rado            address@hidden
 
 ;; Local Variables:
diff --git a/TODO b/TODO
index 0c28f49..79f298f 100644
--- a/TODO
+++ b/TODO
@@ -311,7 +311,7 @@ them in a directory)
 
 Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
 (why isn't this merged with "pathchk"?) when doing a dist.  Do
-whatever else François says here...
+whatever else François says here...
 
 Add support for html via an option.  Use texi2html.  Use
 "html_TEXINFOS", and htmldir = .../html.  Include html files in
@@ -373,7 +373,7 @@ Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
 Internationalize. [ gettext doesn't have the necessary machinery yet ]
 am_error should use printf-style arguments (for eventual gettext scheme)
 
-François says the ordering of files in a distribution should be as follows:
+François says the ordering of files in a distribution should be as follows:
 * README
 * source files
 * derived files
@@ -433,7 +433,7 @@ follow calc example in dejagnu docs
 
 document which variables are actually scanned and which are not.
 
-Document customary ordering of Makefile.am.  From François.
+Document customary ordering of Makefile.am.  From François.
 
 Should include extended version of diagram from Autoconf (suggested by
 Greg Woods)
diff --git a/aclocal.in b/aclocal.in
index b5c2c41..4b63c1a 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -8,7 +8,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S 
"$0" "$@";; esac'
 # aclocal - create aclocal.m4 by scanning configure.ac
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -662,7 +663,7 @@ sub trace_used_macros ()
   my %files = map { $map{$_} => 1 } keys %macro_seen;
   %files = strip_redundant_includes %files;
 
-  my $traces = ($ENV{AUTOM4TE} || 'autom4te');
+  my $traces = ($ENV{AUTOM4TE} || '@am_AUTOM4TE@');
   $traces .= " --language Autoconf-without-aclocal-m4 ";
   # All candidate files.
   $traces .= join (' ',
@@ -818,7 +819,8 @@ $output";
   $output = "# generated automatically by aclocal $VERSION -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -910,7 +912,7 @@ sub version()
 {
   print <<EOF;
 aclocal (GNU $PACKAGE) $VERSION
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 License GPLv2+: GNU GPL version 2 or later 
<http://gnu.org/licenses/gpl-2.0.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/aclocal.m4 b/aclocal.m4
index d7cbc11..f60cbdb 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,8 @@
 # generated automatically by aclocal 1.11 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,8 +14,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 
`autoreconf'.])])
diff --git a/automake.in b/automake.in
index 8fd6869..83db668 100755
--- a/automake.in
+++ b/automake.in
@@ -7,7 +7,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S 
"$0" "$@";; esac'
 
 # automake - create Makefile.in from Makefile.am
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -249,16 +249,16 @@ my @common_sometimes =
 # Standard directories from the GNU Coding Standards, and additional
 # pkg* directories from Automake.  Stored in a hash for fast member check.
 my %standard_prefix =
-    map { $_ => 1 } (qw(bin data dataroot dvi exec html include info
-                       lib libexec lisp localstate man man1 man2 man3
-                       man4 man5 man6 man7 man8 man9 oldinclude pdf
-                       pkgdatadir pkgincludedir pkglibdir pkglibexecdir
-                       ps sbin sharedstate sysconf));
+    map { $_ => 1 } (qw(bin data dataroot doc dvi exec html include info
+                       lib libexec lisp locale localstate man man1 man2
+                       man3 man4 man5 man6 man7 man8 man9 oldinclude pdf
+                       pkgdata pkginclude pkglib pkglibexec ps sbin
+                       sharedstate sysconf));
 
 # Copyright on generated Makefile.ins.
 my $gen_copyright = "\
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1369,7 +1369,7 @@ sub handle_languages
 
     my %done;
 
-    # Is the c linker needed?
+    # Is the C linker needed?
     my $needs_c = 0;
     foreach my $ext (sort keys %extension_seen)
     {
@@ -1991,7 +1991,7 @@ sub handle_single_transform ($$$$$%)
 
                # Each item on this list is a reference to a list consisting
                # of four values followed by additional transform flags for
-               # file_contents.   The four values are the derived flag prefix
+               # file_contents.  The four values are the derived flag prefix
                # (e.g. for `foo_CFLAGS', it is `foo'), the name of the
                # source file, the base name of the output file, and
                # the extension for the object file.
@@ -2053,6 +2053,15 @@ sub handle_single_transform ($$$$$%)
            # derived from is not.
            &push_dist_common ($object)
              unless ($topparent =~ /^(?:nobase_)?nodist_/);
+
+           # If resulting derived source is in a subdir, we need to make
+           # sure the subdir exists at build time.
+           if ($object =~ /\//)
+             {
+               my $dirstamp = require_build_directory_maybe ($object);
+               depend ($object, $dirstamp)
+                 if ($dirstamp);
+             }
            next;
          }
 
@@ -2108,14 +2117,24 @@ sub handle_single_transform ($$$$$%)
 
        # Transform .o or $o file into .P file (for automatic
        # dependency code).
-       if ($lang && $lang->autodep ne 'no')
-       {
-           my $depfile = $object;
-           $depfile =~ s/\.([^.]*)$/.P$1/;
-           $depfile =~ s/\$\(OBJEXT\)$/o/;
-           $dep_files{dirname ($depfile) . '/$(DEPDIR)/'
-                        . basename ($depfile)} = 1;
-       }
+        # Properly flatten multiple adjacent slashes, as Solaris 10 make
+        # might fail over them in an include statement.
+        # Leading double slashes may be special, as per Posix, so deal
+        # with them carefully.
+        if ($lang && $lang->autodep ne 'no')
+        {
+            my $depfile = $object;
+            $depfile =~ s/\.([^.]*)$/.P$1/;
+            $depfile =~ s/\$\(OBJEXT\)$/o/;
+            my $maybe_extra_leading_slash = '';
+            $maybe_extra_leading_slash = '/' if $depfile =~ m,^//[^/],;
+            $depfile =~ s,/+,/,g;
+            my $basename = basename ($depfile);
+            # This might make $dirname empty, but we account for that below.
+            (my $dirname = dirname ($depfile)) =~ s/\/*$//;
+            $dirname = $maybe_extra_leading_slash . $dirname;
+            $dep_files{$dirname . '/$(DEPDIR)/' . $basename} = 1;
+        }
     }
 
     return @result;
@@ -2325,7 +2344,7 @@ sub handle_lib_objects
           if ($val !~ /^-[lL]/ &&
               # Skip -dlopen and -dlpreopen; these are explicitly allowed
               # for Libtool libraries or programs.  (Actually we are a bit
-              # laxe here since this code also applies to non-libtool
+              # lax here since this code also applies to non-libtool
               # libraries or programs, for which -dlopen and -dlopreopen
               # are pure nonsense.  Diagnosing this doesn't seem very
               # important: the developer will quickly get complaints from
@@ -2566,7 +2585,8 @@ sub handle_compile ()
            require_file ($ansi2knr_where, FOREIGN,
                          'ansi2knr.c', 'ansi2knr.1');
 
-           # ansi2knr needs to be built before subdirs, so unshift it.
+           # ansi2knr needs to be built before subdirs, so unshift it
+           # rather then pushing it.
            unshift (@all, '$(ANSI2KNR)');
          }
        else
@@ -2616,7 +2636,7 @@ sub handle_libtool
 sub handle_programs
 {
   my @proglist = &am_install_var ('progs', 'PROGRAMS',
-                                 'bin', 'sbin', 'libexec', 'pkglib',
+                                 'bin', 'sbin', 'libexec', 'pkglibexec',
                                  'noinst', 'check');
   return if ! @proglist;
 
@@ -3178,7 +3198,7 @@ sub scan_texinfo_file ($)
 # ------------------------------------------------------------------
 # SOURCE - the source Texinfo file
 # DEST - the destination Info file
-# INSRC - wether DEST should be built in the source tree
+# INSRC - whether DEST should be built in the source tree
 # DEPENDENCIES - known dependencies
 sub output_texinfo_build_rules ($$$@)
 {
@@ -3726,8 +3746,8 @@ sub handle_man_pages
 sub handle_data
 {
     &am_install_var ('-noextra', '-candist', 'data', 'DATA',
-                    'data', 'dataroot', 'dvi', 'html', 'pdf', 'ps',
-                    'sysconf', 'sharedstate', 'localstate',
+                    'data', 'dataroot', 'doc', 'dvi', 'html', 'pdf',
+                    'ps', 'sysconf', 'sharedstate', 'localstate',
                     'pkgdata', 'lisp', 'noinst', 'check');
 }
 
@@ -4159,7 +4179,7 @@ sub prepend_srcdir (@)
 # Compute a list of dependencies appropriate for the rebuild
 # rule of
 #   AC_CONFIG_FILES($OUTPUT:$INPUT[0]:$INPUTS[1]:...)
-# Also distribute $INPUTs which are not built by another AC_CONFIG_FOOS.
+# Also distribute $INPUTs which are not built by another AC_CONFIG_FOOs.
 sub rewrite_inputs_into_dependencies ($@)
 {
   my ($file, @inputs) = @_;
@@ -5101,8 +5121,14 @@ sub handle_java
        $dir = $curs;
       }
 
-
-    push (@all, 'class' . $dir . '.stamp');
+    if ($dir eq 'check')
+      {
+        push (@check, "class$dir.stamp");
+      }
+    else
+      {
+        push (@all, "class$dir.stamp");
+      }
 }
 
 
@@ -5255,7 +5281,7 @@ sub scan_autoconf_traces ($)
                sinclude => 1,
              );
 
-  my $traces = ($ENV{AUTOCONF} || 'autoconf') . " ";
+  my $traces = ($ENV{AUTOCONF} || '@am_AUTOCONF@') . " ";
 
   # Use a separator unlikely to be used, not `:', the default, which
   # has a precise meaning for AC_CONFIG_FILES and so on.
@@ -5954,11 +5980,11 @@ sub lang_vala_finish_target ($$)
     {
       foreach my $file ($var->value_as_list_recursive)
         {
-          $output_rules .= "\$(srcdir)/$file: 
\$(srcdir)/${derived}_vala.stamp\n".
-            "address@hidden test -f \$@; then :; else \\\n".
-            "\t  rm -f \$(srcdir)/${derived}_vala.stamp; \\\n".
-            "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) 
${derived}_vala.stamp; \\\n".
-            "\tfi\n"
+          $output_rules .= "\$(srcdir)/$file: 
\$(srcdir)/${derived}_vala.stamp\n"
+            . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
+            . "address@hidden test -f \$@; then :; else \\\n"
+            . "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) 
${derived}_vala.stamp; \\\n"
+           . "\tfi\n"
             if $file =~ s/(.*)\.vala$/$1.c/;
         }
     }
@@ -5974,11 +6000,11 @@ sub lang_vala_finish_target ($$)
                                  '--vapi', '--internal-vapi', '--gir')))
            {
              my $headerfile = $flag;
-             $output_rules .= "\$(srcdir)/$headerfile: 
\$(srcdir)/${derived}_vala.stamp\n".
-               "address@hidden test -f \$@; then :; else \\\n".
-               "\t  rm -f \$(srcdir)/${derived}_vala.stamp; \\\n".
-               "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) 
${derived}_vala.stamp; \\\n".
-               "\tfi\n";
+             $output_rules .= "\$(srcdir)/$headerfile: 
\$(srcdir)/${derived}_vala.stamp\n"
+               . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
+               . "address@hidden test -f \$@; then :; else \\\n"
+               . "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) 
${derived}_vala.stamp; \\\n"
+               . "\tfi\n";
 
              # valac is not used when building from dist tarballs
              # distribute the generated files
@@ -6073,10 +6099,8 @@ sub lang_yacc_target_hook
            $output_rules .=
              "$condstr${header}: $output\n"
              # Recover from removal of $header
-             . "address@hidden test ! -f \$@; then \\\n"
-             . "$condstr\t  rm -f $output; \\\n"
-             . "$condstr\t  \$(MAKE) \$(AM_MAKEFLAGS) $output; \\\n"
-             . "$condstr\telse :; fi\n";
+             . "address@hidden test ! -f \$@; then rm -f $output; else :; fi\n"
+             . "address@hidden test ! -f \$@; then \$(MAKE) \$(AM_MAKEFLAGS) 
$output; else :; fi\n";
          }
        # Distribute the generated file, unless its .y source was
        # listed in a nodist_ variable.  (&handle_source_transform
@@ -8299,6 +8323,50 @@ sub generate_makefile ($$)
 
 ################################################################
 
+# Helper function for usage().
+sub print_autodist_files (@)
+{
+  my @lcomm = sort (&uniq (@_));
+
+  my @four;
+  format USAGE_FORMAT =
+  @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<
+  $four[0],           $four[1],           $four[2],           $four[3]
+.
+  local $~ = "USAGE_FORMAT";
+
+  my $cols = 4;
+  my $rows = int(@lcomm / $cols);
+  my $rest = @lcomm % $cols;
+
+  if ($rest)
+    {
+      $rows++;
+    }
+  else
+    {
+      $rest = $cols;
+    }
+
+  for (my $y = 0; $y < $rows; $y++)
+    {
+      @four = ("", "", "", "");
+      for (my $x = 0; $x < $cols; $x++)
+        {
+          last if $y + 1 == $rows && $x == $rest;
+
+          my $idx = (($x > $rest)
+               ?  ($rows * $rest + ($rows - 1) * ($x - $rest))
+               : ($rows * $x));
+
+          $idx += $y;
+          $four[$x] = $lcomm[$idx];
+        }
+      write;
+    }
+}
+
+
 # Print usage information.
 sub usage ()
 {
@@ -8332,51 +8400,12 @@ Library files:
 ";
     Automake::ChannelDefs::usage;
 
-    my ($last, @lcomm);
-    $last = '';
-    foreach my $iter (sort ((@common_files, @common_sometimes)))
-    {
-       push (@lcomm, $iter) unless $iter eq $last;
-       $last = $iter;
-    }
-
-    my @four;
-    print "\nFiles which are automatically distributed, if found:\n";
-    format USAGE_FORMAT =
-  @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<
-  $four[0],           $four[1],           $four[2],           $four[3]
-.
-    $~ = "USAGE_FORMAT";
-
-    my $cols = 4;
-    my $rows = int(@lcomm / $cols);
-    my $rest = @lcomm % $cols;
-
-    if ($rest)
-    {
-       $rows++;
-    }
-    else
-    {
-       $rest = $cols;
-    }
-
-    for (my $y = 0; $y < $rows; $y++)
-    {
-       @four = ("", "", "", "");
-       for (my $x = 0; $x < $cols; $x++)
-       {
-           last if $y + 1 == $rows && $x == $rest;
-
-           my $idx = (($x > $rest)
-                      ?  ($rows * $rest + ($rows - 1) * ($x - $rest))
-                      : ($rows * $x));
-
-           $idx += $y;
-           $four[$x] = $lcomm[$idx];
-       }
-       write;
-    }
+    print "\nFiles automatically distributed if found " .
+          "(always):\n";
+    print_autodist_files @common_files;
+    print "\nFiles automatically distributed if found " .
+          "(under certain conditions):\n";
+    print_autodist_files @common_sometimes;
 
     print '
 Report bugs to <@PACKAGE_BUGREPORT@>.
@@ -8396,7 +8425,7 @@ sub version ()
 {
   print <<EOF;
 automake (GNU $PACKAGE) $VERSION
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 License GPLv2+: GNU GPL version 2 or later 
<http://gnu.org/licenses/gpl-2.0.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/bootstrap b/bootstrap
index 7766bd3..9f1a8d8 100755
--- a/bootstrap
+++ b/bootstrap
@@ -19,40 +19,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Find the path separator.
-# (Snippet copied from configure's initialization in Autoconf 2.65)
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
 # Don't ignore failures.
 set -e
 
 # Set program basename.
 me=`echo "$0" | sed 's,^.*/,,'`
 
-# Find perl.  Code based on Autoconf, but without non-POSIX support.
-if test -z "$PERL"; then
-  save_IFS=$IFS
-  IFS=$PATH_SEPARATOR
-  for dir in $PATH; do
-    IFS=$save_IFS
-    test -z "$dir" && dir=.
-    if test -x "$dir/perl" && test ! -d "$dir/perl"; then
-      PERL="$dir/perl"
-      break
-    fi
-  done
-fi
-
-if test -z "$PERL"; then
-  echo "$me: cannot find perl" >&2
-  exit 1
-fi
+# Let user choose which version of autoconf, autom4te and perl to use.
+: ${AUTOCONF=autoconf}
+export AUTOCONF  # might be used by aclocal and/or automake
+: ${AUTOM4TE=autom4te}
+export AUTOM4TE  # ditto
+: ${PERL=perl}
 
 # Variables to substitute.
 VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
@@ -71,7 +49,7 @@ fi
 
 # Read the rule for calculating APIVERSION and execute it.
 apiver_cmd=`sed -ne 's/\[\[/[/g;s/\]\]/]/g;/^APIVERSION=/p' configure.ac`
-eval $apiver_cmd
+eval "$apiver_cmd"
 
 # Sanity checks.
 if test -z "$VERSION"; then
@@ -80,7 +58,7 @@ if test -z "$VERSION"; then
 fi
 
 if test -z "$APIVERSION"; then
-  echo "$me: cannot find VERSION" >&2
+  echo "$me: cannot find APIVERSION" >&2
   exit 1
 fi
 
@@ -112,7 +90,6 @@ dosubst ()
   chmod a-w $2
 }
 
-
 # Create temporary replacement for lib/Automake/Config.pm.
 dosubst automake-$APIVERSION/Automake/Config.in \
         automake-$APIVERSION/Automake/Config.pm
@@ -133,10 +110,9 @@ cd ..
 
 # Run the autotools.
 $PERL ./aclocal.tmp -I m4
-autoconf
+$AUTOCONF
 $PERL ./automake.tmp
 
 # Remove temporary files and directories.
 rm -rf aclocal-$APIVERSION automake-$APIVERSION
 rm -f aclocal.tmp automake.tmp
-rm -f lib/Automake/Config.pm
diff --git a/configure b/configure
index cdfa840..5044112 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for GNU Automake 1.11.
+# Generated by GNU Autoconf 2.68 for GNU Automake 1.11.
 #
 # Report bugs to <address@hidden>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -91,6 +91,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # We cannot yet assume a decent shell, so we have to provide a
        # neutralization value for shells without unset; and this also
        # works around shells that cannot unset nonexistent variables.
+       # Preserve -v and -x to the replacement shell.
        BASH_ENV=/dev/null
        ENV=/dev/null
        (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
        export CONFIG_SHELL
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+       case $- in # ((((
+         *v*x* | *x*v* ) as_opts=-vx ;;
+         *v* ) as_opts=-v ;;
+         *x* ) as_opts=-x ;;
+         * ) as_opts= ;;
+       esac
+       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -319,7 +327,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -359,19 +367,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} 
as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} 
as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -533,7 +541,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -595,7 +603,10 @@ am__isrc
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
+am_AUTOUPDATE
 am_AUTOHEADER
+am_AUTORECONF
+am_AUTOM4TE
 am_AUTOCONF
 build_os
 build_vendor
@@ -708,8 +719,9 @@ do
   fi
 
   case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -754,7 +766,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -780,7 +792,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -984,7 +996,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1000,7 +1012,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1030,8 +1042,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1039,7 +1051,7 @@ Try \`$0 --help' for more information."
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1049,7 +1061,7 @@ Try \`$0 --help' for more information."
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} 
${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} 
${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1057,13 +1069,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: 
$ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1086,7 +1098,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1100,8 +1112,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't 
use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't 
use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1116,9 +1128,9 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1157,11 +1169,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
        pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1201,7 +1213,7 @@ Configuration:
       --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
+  -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
@@ -1326,9 +1338,9 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 GNU Automake configure 1.11
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.68
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1343,7 +1355,7 @@ This file contains any messages produced by compilers 
while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by GNU Automake $as_me 1.11, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -1453,11 +1465,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1491,11 +1501,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var 
contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -1508,11 +1516,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -1526,11 +1532,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -1585,7 +1589,12 @@ _ACEOF
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
 elif test "x$prefix" != xNONE; then
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -1600,7 +1609,11 @@ do
     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script 
$ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -1676,7 +1689,7 @@ if $ac_cache_corrupted; then
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment 
can compromise the build" >&5
 $as_echo "$as_me: error: changes in the environment can compromise the build" 
>&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" 
"$LINENO" 5
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start 
over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -1695,16 +1708,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_aux_dir=
 for ac_dir in lib "$srcdir"/lib; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
 done
 if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in lib 
\"$srcdir\"/lib" "$LINENO" 5
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in lib 
\"$srcdir\"/lib" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -1719,27 +1738,27 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please 
don't use this var.
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 
5
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" 
"$LINENO" 5
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -1758,11 +1777,18 @@ case $build_os in *\ *) build_os=`echo "$build_os" | 
sed 's/ /-/g'`;; esac
 
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
 # way we can run Autoconf tests from configure (or from the test
-# suite) without being bothered by `missing'.  Likewise for autoheader.
+# suite) without being bothered by `missing'.  Likewise for autom4te,
+# autoreconf, autoheader, and autoupdate.
 am_AUTOCONF="${AUTOCONF-autoconf}"
 
+am_AUTOM4TE="${AUTOM4TE-autom4te}"
+
+am_AUTORECONF="${AUTORECONF-autoreconf}"
+
 am_AUTOHEADER="${AUTOHEADER-autoheader}"
 
+am_AUTOUPDATE="${AUTOUPDATE-autoupdate}"
+
 
 am__api_version='1.11'
 
@@ -1783,7 +1809,7 @@ am__api_version='1.11'
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible 
install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -1867,11 +1893,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -1895,7 +1921,7 @@ if (
        # if, for instance, CONFIG_SHELL is bash and it inherits a
        # broken ls alias from the environment.  This has actually
        # happened.  Such a system could not be considered "sane".
-       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
   alias in your environment" "$LINENO" 5
      fi
      if test "$2" = conftest.file || test $am_try -eq 2; then
@@ -1910,7 +1936,7 @@ then
    # Ok.
    :
 else
-   as_fn_error "newly created file is older than distributed files!
+   as_fn_error $? "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -1964,7 +1990,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2004,7 +2030,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2057,7 +2083,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" 
>&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2108,7 +2134,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2148,7 +2174,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = 
set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2156,7 +2182,7 @@ SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2190,7 +2216,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    as_fn_error "source directory already configured; run \"make distclean\" 
there first" "$LINENO" 5
+    as_fn_error $? "source directory already configured; run \"make 
distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2270,7 +2296,7 @@ AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" 
\"`pwd`/automake\" --libd
 set dummy perl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PERL+set}" = set; then :
+if ${ac_cv_path_PERL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PERL in
@@ -2307,10 +2333,10 @@ fi
 
 
 if test -z "$PERL"; then
-   as_fn_error "perl not found" "$LINENO" 5
+   as_fn_error $? "perl not found" "$LINENO" 5
 fi
 $PERL -e 'require 5.006;' || {
-   as_fn_error "perl 5.6 or better is required; perl 5.8.2 or better
+   as_fn_error $? "perl 5.6 or better is required; perl 5.8.2 or better
 is recommended.  If you have several perl versions
 installed, select the one Automake should use using
   ./configure PERL=/path/to/perl" "$LINENO" 5
@@ -2319,7 +2345,7 @@ installed, select the one Automake should use using
 # We require ithreads support, and version 5.7.2 for CLONE.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PERL supports 
ithreads" >&5
 $as_echo_n "checking whether $PERL supports ithreads... " >&6; }
-if test "${am_cv_prog_PERL_ithreads+set}" = set; then :
+if ${am_cv_prog_PERL_ithreads+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if $PERL -e '
@@ -2354,7 +2380,7 @@ fi
 set dummy tex; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_TEX+set}" = set; then :
+if ${ac_cv_prog_TEX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$TEX"; then
@@ -2402,7 +2428,7 @@ HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
 required_autoconf_version=2.62
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoconf is 
installed" >&5
 $as_echo_n "checking whether autoconf is installed... " >&6; }
-if test "${am_cv_autoconf_installed+set}" = set; then :
+if ${am_cv_autoconf_installed+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if { echo "$as_me:$LINENO: eval $am_AUTOCONF --version" >&5
@@ -2419,13 +2445,13 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_installed" >&5
 $as_echo "$am_cv_autoconf_installed" >&6; }
 if test "$am_cv_autoconf_installed" = no; then
-  as_fn_error "Autoconf $required_autoconf_version or better is required.
+  as_fn_error $? "Autoconf $required_autoconf_version or better is required.
     Please make sure it is installed and in your PATH." "$LINENO" 5
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoconf works" >&5
 $as_echo_n "checking whether autoconf works... " >&6; }
-if test "${am_cv_autoconf_works+set}" = set; then :
+if ${am_cv_autoconf_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   mkdir conftest
@@ -2445,13 +2471,13 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_works" >&5
 $as_echo "$am_cv_autoconf_works" >&6; }
 if test "$am_cv_autoconf_works" = no; then
-  as_fn_error "The installed version of autoconf does not work.
+  as_fn_error $? "The installed version of autoconf does not work.
     Please check config.log for error messages before this one." "$LINENO" 5
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoconf is recent 
enough" >&5
 $as_echo_n "checking whether autoconf is recent enough... " >&6; }
-if test "${am_cv_autoconf_version+set}" = set; then :
+if ${am_cv_autoconf_version+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   mkdir conftest
@@ -2471,13 +2497,13 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_version" >&5
 $as_echo "$am_cv_autoconf_version" >&6; }
 if test "$am_cv_autoconf_version" = no; then
-  as_fn_error "Autoconf $required_autoconf_version or better is required." 
"$LINENO" 5
+  as_fn_error $? "Autoconf $required_autoconf_version or better is required." 
"$LINENO" 5
 fi
 
 # Test for ln.  We need use it to install the versioned binaries.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5
 $as_echo_n "checking whether ln works... " >&6; }
-if test "${am_cv_prog_ln+set}" = set; then :
+if ${am_cv_prog_ln+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -2512,7 +2538,7 @@ esac
 # Test for things needed by the test suite.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long 
lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -2561,7 +2587,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in 
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable grep could be found in 
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_GREP=$GREP
@@ -2575,7 +2601,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -2627,7 +2653,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in 
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable egrep could be found in 
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_EGREP=$EGREP
@@ -2642,7 +2668,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+if ${ac_cv_path_FGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -2694,7 +2720,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_FGREP"; then
-    as_fn_error "no acceptable fgrep could be found in 
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable fgrep could be found in 
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_FGREP=$FGREP
@@ -2710,7 +2736,7 @@ $as_echo "$ac_cv_path_FGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /bin/sh has working 
'set -e' with exit trap" >&5
 $as_echo_n "checking whether /bin/sh has working 'set -e' with exit trap... " 
>&6; }
-if test "${am_cv_sh_errexit_works+set}" = set; then :
+if ${am_cv_sh_errexit_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if /bin/sh -ec "trap 'exit \$?' 0; (exit 77); exit 77"; test $? = 77
@@ -2805,10 +2831,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var 
contains a newline" >&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" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache 
$cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -2860,6 +2897,7 @@ DEFS=`sed -n "$ac_script" confdefs.h`
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -2876,7 +2914,7 @@ LTLIBOBJS=$ac_ltlibobjs
 
 
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -2977,6 +3015,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3022,19 +3061,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} 
as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} 
as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -3230,7 +3269,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -3284,7 +3323,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # values after options handling.
 ac_log="
 This file was extended by GNU Automake $as_me 1.11, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -3339,10 +3378,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 GNU Automake config.status 1.11
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -3360,11 +3399,16 @@ ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -3386,6 +3430,7 @@ do
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -3396,7 +3441,7 @@ do
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -3462,7 +3507,7 @@ do
     "tests/aclocal-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES 
tests/aclocal-${APIVERSION}:tests/aclocal.in" ;;
     "tests/automake-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES 
tests/automake-${APIVERSION}:tests/automake.in" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -3483,9 +3528,10 @@ fi
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -3493,12 +3539,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -3515,12 +3562,12 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -3529,18 +3576,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -3548,7 +3595,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -3596,7 +3643,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = ""
 
@@ -3628,21 +3675,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:address@hidden@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[      ]*$//
 }'
 fi
@@ -3660,7 +3715,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -3679,7 +3734,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
         # (if the path is not absolute).  The absolute path cannot be 
DOS-style,
         # because $ac_f cannot contain `:'.
@@ -3688,7 +3743,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; 
esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -3714,8 +3769,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -3851,23 +3906,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" 
>$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z 
"$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a 
reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
+which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable 
\`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
 
 
@@ -3888,7 +3944,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -3909,7 +3965,7 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; 
then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: 
$ac_unrecognized_opts" >&5
diff --git a/configure.ac b/configure.ac
index de4583d..f804d18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,9 +28,13 @@ AC_CANONICAL_BUILD
 
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
 # way we can run Autoconf tests from configure (or from the test
-# suite) without being bothered by `missing'.  Likewise for autoheader.
+# suite) without being bothered by `missing'.  Likewise for autom4te,
+# autoreconf, autoheader, and autoupdate.
 AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
+AC_SUBST([am_AUTOM4TE], ["${AUTOM4TE-autom4te}"])
+AC_SUBST([am_AUTORECONF], ["${AUTORECONF-autoreconf}"])
 AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
+AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
 
 AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests 
parallel-tests])
 
diff --git a/doc/.cvsignore b/doc/.cvsignore
deleted file mode 100644
index a3ce790..0000000
--- a/doc/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-Makefile
-automake.info*
-automake.dvi
-automake-[0-9].*
-*.log
-log
-diffs
-automake.vrs automake.cps automake.tr automake.op automake.cv
-automake.ov automake.toc automake.pg automake.ky automake.tp
-automake.vr automake.fn automake.cp automake.aux
-automake.cm automake.ps automake.html
-*.gz
-stamp-vti
-version.texi
diff --git a/doc/Makefile.am b/doc/Makefile.am
index bb48fa2..f4f76c6 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -73,8 +73,14 @@ $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) 
$(top_srcdir)/configure.ac
        PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
        export PATH && \
        cd $(srcdir)/amhello && \
-       ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \
-       autoreconf -vfi && \
+       ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL && \
+       AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE && \
+       AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF && \
+       AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE && \
+       AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF && \
+       AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER && \
+       AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE && \
+       $(am_AUTORECONF) -vfi && \
        ./configure && \
        $(MAKE) $(AM_MAKEFLAGS) distcheck && \
        $(MAKE) $(AM_MAKEFLAGS) distclean && \
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 95a8fb8..3034dcb 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -161,6 +161,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -614,10 +617,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -812,8 +820,14 @@ $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) 
$(top_srcdir)/configure.ac
        PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
        export PATH && \
        cd $(srcdir)/amhello && \
-       ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \
-       autoreconf -vfi && \
+       ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL && \
+       AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE && \
+       AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF && \
+       AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE && \
+       AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF && \
+       AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER && \
+       AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE && \
+       $(am_AUTORECONF) -vfi && \
        ./configure && \
        $(MAKE) $(AM_MAKEFLAGS) distcheck && \
        $(MAKE) $(AM_MAKEFLAGS) distclean && \
diff --git a/doc/automake.texi b/doc/automake.texi
index 66c5a7e..ce1bdbb 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -24,8 +24,8 @@ This manual is for GNU Automake (version @value{VERSION},
 Makefiles from template files.
 
 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-Inc.
+2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -63,6 +63,7 @@ section entitled ``GNU Free Documentation License.''
 @insertcopying
 @end titlepage
 
address@hidden
 
 @c We use the following macros to define indices:
 @c   @cindex   concepts, and anything that does not fit elsewhere
@@ -83,7 +84,8 @@ section entitled ``GNU Free Documentation License.''
 @c Put the macros in the function index.
 @syncodeindex ac fn
 
address@hidden Put everything else into one index (arbitrarily chosen to be the 
concept index).
address@hidden Put everything else into one index (arbitrarily chosen to be the
address@hidden concept index).
 @syncodeindex op cp
 @syncodeindex tr cp
 @syncodeindex cm cp
@@ -101,7 +103,7 @@ section entitled ``GNU Free Documentation License.''
 * Generalities::                General ideas
 * Examples::                    Some example packages
 * Invoking Automake::           Creating a Makefile.in
-* configure::                   Scanning configure.ac or configure.in
+* configure::                   Scanning configure.ac, using aclocal
 * Directories::                 Declaring subdirectories
 * Programs::                    Building programs and libraries
 * Other Objects::               Other derived objects
@@ -116,6 +118,7 @@ section entitled ``GNU Free Documentation License.''
 * Miscellaneous::               Miscellaneous rules
 * Include::                     Including extra files in an Automake template
 * Conditionals::                Conditionals
+* Silencing Make::              Obtain less verbose output from @command{make}
 * Gnits::                       The effect of @option{--gnu} and 
@option{--gnits}
 * Cygnus::                      The effect of @option{--cygnus}
 * Not Enough::                  When Automake is not Enough
@@ -156,15 +159,16 @@ Use Cases for the GNU Build System
 A Small Hello World
 
 * Creating amhello::            Create @file{amhello-1.0.tar.gz} from scratch
-* amhello Explained::           @file{configure.ac} and @file{Makefile.am} 
explained
+* amhello's configure.ac Setup Explained::
+* amhello's Makefile.am Setup Explained::
 
 General ideas
 
 * General Operation::           General operation of Automake
 * Strictness::                  Standards conformance checking
 * Uniform::                     The Uniform Naming Scheme
-* Canonicalization::            How derived variables are named
 * Length Limitations::          Staying below the command line length limit
+* Canonicalization::            How derived variables are named
 * User Variables::              Variables reserved for the user
 * Auxiliary Programs::          Programs automake might require
 
@@ -173,7 +177,7 @@ Some example packages
 * Complete::                    A simple example, start to finish
 * true::                        Building true and false
 
-Scanning @file{configure.ac}
+Scanning @file{configure.ac}, using @command{aclocal}
 
 * Requirements::                Configuration requirements
 * Optional::                    Other things Automake recognizes
@@ -229,7 +233,7 @@ Building Programs and Libraries
 * Java Support::                Compiling Java sources
 * Vala Support::                Compiling Vala sources
 * Support for Other Languages::  Compiling other languages
-* ANSI::                        Automatic de-ANSI-fication (obsolete)
+* ANSI::                        Automatic de-ANSI-fication (deprecated, soon 
to be removed)
 * Dependencies::                Automatic dependency tracking
 * EXEEXT::                      Support for executable extensions
 
@@ -238,7 +242,7 @@ Building a program
 * Program Sources::             Defining program sources
 * Linking::                     Linking with libraries or extra objects
 * Conditional Sources::         Handling conditional sources
-* Conditional Programs::        Building program conditionally
+* Conditional Programs::        Building a program conditionally
 
 Building a Shared Library
 
@@ -252,6 +256,11 @@ Building a Shared Library
 * LTLIBOBJS::                   Using $(LTLIBOBJS) and $(LTALLOCA)
 * Libtool Issues::              Common Issues Related to Libtool's Use
 
+Common Issues Related to Libtool's Use
+
+* Error required file ltmain.sh not found::  The need to run libtoolize
+* Objects created both with libtool and without::  Avoid a specific build race
+
 Fortran 77 Support
 
 * Preprocessing Fortran 77::    Preprocessing Fortran 77 sources
@@ -290,7 +299,7 @@ Building documentation
 * Texinfo::                     Texinfo
 * Man Pages::                   Man pages
 
-Installation
+What Gets Installed
 
 * Basics of Installation::      What gets installed where
 * The Two Parts of Install::    Installing data and programs separately
@@ -298,7 +307,7 @@ Installation
 * Staged Installs::             Installation in a temporary location
 * Install Rules for the User::  Useful additional rules
 
-Distribution
+What Goes in a Distribution
 
 * Basics of Distribution::      Files distributed by default
 * Fine-grained Distribution Control::  @code{dist_} and @code{nodist_} prefixes
@@ -306,7 +315,7 @@ Distribution
 * Checking the Distribution::   @samp{make distcheck} explained
 * The Types of Distributions::  A variety of formats and compression methods
 
-Support for Test Suites
+Support for test suites
 
 * Simple Tests::                Listing programs and scripts in @code{TESTS}
 * Simple Tests using parallel-tests::  More powerful test driver
@@ -324,6 +333,12 @@ Conditionals
 * Usage of Conditionals::       Declaring conditional content
 * Limits of Conditionals::      Enclosing complete statements
 
+Silencing Make
+
+* Make verbosity::               Make is verbose by default
+* Tricks For Silencing Make::    Standard and generic ways to silence make
+* Automake silent-rules Option:: How Automake can help in silencing make
+
 When Automake Isn't Enough
 
 * Extending::                   Adding new rules or overriding existing ones.
@@ -342,6 +357,7 @@ Frequently Asked Questions about Automake
 * Multiple Outputs::            Writing rules for tools with many output files
 * Hard-Coded Install Paths::    Installing to hard-coded locations
 * Debugging Make Rules::        Strategies when things don't work as expected
+* Reporting Bugs::              Feedback on bugs and feature requests
 
 History of Automake
 
@@ -349,12 +365,12 @@ History of Automake
 * Dependency Tracking Evolution::  Evolution of Automatic Dependency Tracking
 * Releases::                    Statistics about Automake Releases
 
-Dependency Tracking Evolution
+Dependency Tracking in Automake
 
 * First Take on Dependencies::  Precomputed dependency tracking
 * Dependencies As Side Effects::  Update at developer compile time
 * Dependencies for the User::   Update at user compile time
-* Techniques for Dependencies:: Alternative approaches
+* Techniques for Dependencies::  Alternative approaches
 * Recommendations for Tool Writers::  What tool writers can do to help
 * Future Directions for Dependencies::  Languages Automake does not know
 
@@ -423,8 +439,7 @@ to be built.
 @cindex Reporting bugs
 @cindex E-mail, bug reports
 
-Mail suggestions and bug reports for Automake to
address@hidden@value{PACKAGE_BUGREPORT}}.
+For more information on bug reports, @xref{Reporting Bugs}.
 
 @node Autotools Introduction
 @chapter An Introduction to the Autotools
@@ -889,6 +904,7 @@ GNU Make Manual}).
 VPATH builds have other interesting uses.  One is to build the same
 sources with multiple configurations.  For instance:
 
address@hidden Keep in sync with amhello-cflags.test.
 @example
 ~ % @kbd{tar zxf ~/amhello-1.0.tar.gz}
 ~ % @kbd{cd amhello-1.0}
@@ -1040,6 +1056,7 @@ instance my cross-compiler for MinGW32 has its binaries 
called
 Here is how we could build @code{amhello-1.0} for
 @code{i586-mingw32msvc} on a GNU/Linux PC.
 
address@hidden Keep in sync with amhello-cross-compile.test.
 @smallexample
 ~/amhello-1.0 % @kbd{./configure --build i686-pc-linux-gnu --host 
i586-mingw32msvc}
 checking for a BSD-compatible install... /usr/bin/install -c
@@ -1154,6 +1171,7 @@ by some means.
 For instance here is how we could create a binary package containing a
 snapshot of all the files to be installed.
 
address@hidden Keep in sync with amhello-binpkg.test.
 @example
 ~/amhello-1.0 % @kbd{./configure --prefix /usr}
 @dots{}
@@ -1246,6 +1264,10 @@ source being compiled).  Later, any time @command{make} 
is run and a
 dependency appears to have changed, the dependent files will be
 rebuilt.
 
+Automake generates code for automatic dependency tracking by default,
+unless the developer chooses to override it; for more information,
address@hidden
+
 When @command{configure} is executed, you can see it probing each
 compiler for the dependency mechanism it supports (several mechanisms
 can be used):
@@ -1382,9 +1404,11 @@ instantiate the GNU Build System, while the second 
explains the
 meaning of the @file{configure.ac} and @file{Makefile.am} files read
 by the Autotools.
 
address@hidden Explained}
 @menu
 * Creating amhello::            Create @file{amhello-1.0.tar.gz} from scratch
-* amhello Explained::           @file{configure.ac} and @file{Makefile.am} 
explained
+* amhello's configure.ac Setup Explained::
+* amhello's Makefile.am Setup Explained::
 @end menu
 
 @node Creating amhello
@@ -1545,8 +1569,10 @@ creating @file{configure} from @file{configure.ac}, while
 direct you to the right manual when seeking answers.
 
 
address@hidden amhello Explained
address@hidden @file{amhello-1.0} Explained
address@hidden amhello's configure.ac Setup Explained
address@hidden @code{amhello}'s @file{configure.ac} Setup Explained
+
address@hidden @file{configure.ac}, Hello World
 
 Let us begin with the contents of @file{configure.ac}.
 
@@ -1654,6 +1680,10 @@ your package may need (@pxref{autoscan Invocation, , 
Using
 @command{autoscan} to Create @file{configure.ac}, autoconf, The
 Autoconf Manual}).
 
+
address@hidden amhello's Makefile.am Setup Explained
address@hidden @code{amhello}'s @file{Makefile.am} Setup Explained
+
 @cindex @file{Makefile.am}, Hello World
 
 We now turn to @file{src/Makefile.am}.  This file contains
@@ -1726,6 +1756,11 @@ automatically distributed is presented by @code{automake 
--help}).
 The only important effect of this second line is therefore to install
 @file{README} during @code{make install}.
 
+One thing not covered in this example is accessing the installation
+directory values (@pxref{Standard Directory Variables}) from your
+program code, that is, converting them into defined macros.  For this,
address@hidden Directories,,, autoconf, The Autoconf Manual}.
+
 
 @node Generalities
 @chapter General ideas
@@ -1737,8 +1772,8 @@ understand how Automake works.
 * General Operation::           General operation of Automake
 * Strictness::                  Standards conformance checking
 * Uniform::                     The Uniform Naming Scheme
-* Canonicalization::            How derived variables are named
 * Length Limitations::          Staying below the command line length limit
+* Canonicalization::            How derived variables are named
 * User Variables::              Variables reserved for the user
 * Auxiliary Programs::          Programs automake might require
 @end menu
@@ -1754,12 +1789,12 @@ for instance, a @code{bin_PROGRAMS} variable definition 
will cause rules
 for compiling and linking programs to be generated.
 
 @cindex Non-standard targets
address@hidden @code{cvs-dist}, non-standard example
address@hidden cvs-dist
address@hidden @code{git-dist}, non-standard example
 @trindex git-dist
 
 The variable definitions and rules in the @file{Makefile.am} are
-copied verbatim into the generated file.  This allows you to add
+copied mostly verbatim into the generated file, with all variable
+definitions preceding all rules.  This allows you to add almost
 arbitrary code into the generated @file{Makefile.in}.  For instance,
 the Automake distribution includes a non-standard rule for the
 @code{git-dist} target, which the Automake maintainer uses to make
@@ -1778,14 +1813,30 @@ supported.  This operator appends its right hand 
argument to the variable
 specified on the left.  Automake will translate the operator into
 an ordinary @samp{=} operator; @samp{+=} will thus work with any make program.
 
address@hidden indentation
-Further note that variable assignments should not be indented with
address@hidden characters, use spaces if necessary.  On the other hand,
-rule commands should be indented with a leading @key{TAB} character.
-
 Automake tries to keep comments grouped with any adjoining rules or
 variable definitions.
 
address@hidden Limitations of automake parser
address@hidden Automake parser, limitations of
address@hidden indentation in Makefile.am
+Generally, Automake is not particularly smart in the parsing of unusual
+Makefile constructs, so you're advised to avoid fancy constructs or
+``creative'' use of whitespaces.
address@hidden Keep this in sync with doc-parsing-buglets-tabs.test.
+For example, @key{TAB} characters cannot be used between a target name
+and the following address@hidden:}'' character, and variable assignments
+shouldn't be indented with @key{TAB} characters.
address@hidden Keep this in sync with doc-parsing-buglets-colneq-subst.test.
+Also, using more complex macro in target names can cause trouble:
+
address@hidden
+% @kbd{cat Makefile.am}
+$(FOO:=x): bar
+% @kbd{automake}
+Makefile.am:1: bad characters in variable name `$(FOO'
+Makefile.am:1: `:='-style assignments are not portable
address@hidden example
+
 @cindex Make targets, overriding
 @cindex Make rules, overriding
 @cindex Overriding make rules
@@ -1816,6 +1867,7 @@ When examining a variable definition, Automake will 
recursively examine
 variables referenced in the definition.  For example, if Automake is
 looking at the content of @code{foo_SOURCES} in this snippet
 
address@hidden Keep in sync with interp.test.
 @example
 xs = a.c b.c
 foo_SOURCES = c.c $(xs)
@@ -1976,7 +2028,8 @@ variable names; thus one writes @samp{bin_PROGRAMS} and 
not
 @samp{bindir_PROGRAMS}.
 
 Not every sort of object can be installed in every directory.  Automake
-will flag those attempts it finds in error.
+will flag those attempts it finds in error (but see below how to override
+the check if you really need to).
 Automake will also diagnose obvious misspellings in directory names.
 
 @cindex Extending list of installation directories
@@ -1993,11 +2046,41 @@ defined (e.g., @samp{zardir}).
 For instance, the following snippet will install @file{file.xml} into
 @samp{$(datadir)/xml}.
 
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
 @example
 xmldir = $(datadir)/xml
 xml_DATA = file.xml
 @end example
 
+This feature can also be used to override the sanity checks Automake
+performs to diagnose suspicious directory/primary couples (in the
+unlikely case these checks are undesirable, and you really know what
+you're doing).  For example, Automake would error out on this input:
+
address@hidden Should be tested in primary-prefix-invalid-couples.test.
address@hidden
+# Forbidden directory combinations, automake will error out on this.
+pkglib_PROGRAMS = foo
+doc_LIBRARIES = libquux.a
address@hidden example
+
address@hidden
+but it will succeed with this:
+
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
address@hidden
+# Work around forbidden directory combinations.  Do not use this
+# without a very good reason!
+my_execbindir = $(pkglibdir)
+my_doclibdir = $(docdir)
+my_execbin_PROGRAMS = foo
+my_doclib_LIBRARIES = libquux.a
address@hidden example
+
+The @samp{exec} substring of the @samp{my_execbindir} variable lets
+the files be installed at the right time (@pxref{The Two Parts of
+Install}).
+
 @cindex @samp{noinst_} primary prefix, definition
 @vindex noinst_
 
@@ -2014,10 +2097,12 @@ should not be built until the @samp{make check} command 
is run.  Those
 objects are not installed either.
 
 The current primary names are @samp{PROGRAMS}, @samp{LIBRARIES},
address@hidden, @samp{PYTHON}, @samp{JAVA}, @samp{SCRIPTS}, @samp{DATA},
address@hidden, @samp{MANS}, and @samp{TEXINFOS}.
address@hidden, @samp{LISP}, @samp{PYTHON}, @samp{JAVA},
address@hidden, @samp{DATA}, @samp{HEADERS}, @samp{MANS}, and
address@hidden
 @vindex PROGRAMS
 @vindex LIBRARIES
address@hidden LTLIBRARIES
 @vindex LISP
 @vindex PYTHON
 @vindex JAVA
@@ -2063,6 +2148,7 @@ data_DATA = file1 @dots{} address@hidden address@hidden 
@dots{} address@hidden
 @noindent
 may also be written as
 
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
 @example
 data_DATA = file1 @dots{} address@hidden
 data2dir = $(datadir)
@@ -2169,8 +2255,9 @@ it more POSIX-like.
 
 @item ansi2knr.c
 @itemx ansi2knr.1
-These two files are used for de-ANSI-fication support (obsolete
address@hidden).
+These two files are used for de-ANSI-fication support (they are
+deprecated now, and @emph{will be removed} in the next major Automake
+release; @pxref{ANSI}).
 
 @item compile
 This is a wrapper for compilers that do not accept options @option{-c}
@@ -2394,24 +2481,13 @@ false.o: true.c
         $(COMPILE) -DEXIT_CODE=1 -c true.c && mv true.o false.o
 @end example
 
-Also, these explicit rules do not work if the obsolete de-ANSI-fication feature
-is used (@pxref{ANSI}).  Supporting de-ANSI-fication requires a little
-more work:
-
address@hidden
-true_.o: true_.c false_.o
-        $(COMPILE) -DEXIT_CODE=0 -c true_.c
-
-false_.o: true_.c
-        $(COMPILE) -DEXIT_CODE=1 -c true_.c && mv true_.o false_.o
address@hidden example
-
 As it turns out, there is also a much easier way to do this same task.
-Some of the above techniques are useful enough that we've kept the
+Some of the above technique is useful enough that we've kept the
 example in the manual.  However if you were to build @code{true} and
 @code{false} in real life, you would probably use per-program
 compilation flags, like so:
 
address@hidden Keep in sync with specflg7.test and specflg8.test.
 @example
 bin_PROGRAMS = false true
 
@@ -2423,10 +2499,9 @@ true_CPPFLAGS = -DEXIT_CODE=0
 @end example
 
 In this case Automake will cause @file{true.c} to be compiled twice,
-with different flags.  De-ANSI-fication will work automatically.  In
-this instance, the names of the object files would be chosen by
-automake; they would be @file{false-true.o} and @file{true-true.o}.
-(The name of the object files rarely matters.)
+with different flags.  In this instance, the names of the object files
+would be chosen by automake; they would be @file{false-true.o} and
address@hidden (The name of the object files rarely matters.)
 
 
 @node Invoking Automake
@@ -2645,10 +2720,12 @@ concurrently.  This is an experimental feature.
 
 
 @node configure
address@hidden Scanning @file{configure.ac}
address@hidden Scanning @file{configure.ac}, using @command{aclocal}
 
 @cindex @file{configure.ac}, scanning
 @cindex Scanning @file{configure.ac}
address@hidden Using @command{aclocal}
address@hidden @command{aclocal}, using
 
 Automake scans the package's @file{configure.ac} to determine certain
 information about the package.  Some @command{autoconf} macros are required
@@ -2734,6 +2811,7 @@ literals.  If part of the specification uses shell 
variables,
 @command{automake} will not be able to fulfill this setup, and you will
 have to complete the missing bits by hand.  For instance, on
 
address@hidden Keep in sync with output11.test.
 @example
 file=input
 @dots{}
@@ -2749,6 +2827,7 @@ source file.)
 
 Similarly
 
address@hidden Keep in sync with output11.test.
 @example
 file=output
 file2=out:in
@@ -2873,7 +2952,7 @@ Automake will generate rules to rebuild these headers.  
Older versions
 of Automake required the use of @code{AM_CONFIG_HEADER}
 (@pxref{Macros}); this is no longer the case.
 
-As for @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
+As with @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
 specification using shell variables will be ignored as far as
 cleaning, distributing, and rebuilding is concerned.
 
@@ -2978,8 +3057,9 @@ this way, e.g., @code{AC_PATH_XTRA} defines 
@code{X_CFLAGS} and
 if @code{AC_PATH_XTRA} is called.
 
 @item AM_C_PROTOTYPES
-This is required when using the obsolete de-ANSI-fication feature; see
address@hidden
+This is required when using the deprecated de-ANSI-fication feature;
address@hidden  @emph{It will be removed} in the next major Automake
+release.
 
 @item AM_CONDITIONAL
 This introduces an Automake conditional (@pxref{Conditionals}).
@@ -3375,6 +3455,7 @@ installs this macro so that @command{aclocal} will find 
it.
 A macro file's name should end in @file{.m4}.  Such files should be
 installed in @file{$(datadir)/aclocal}.  This is as simple as writing:
 
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
 @example
 aclocaldir = $(datadir)/aclocal
 aclocal_DATA = mymacro.m4 myothermacro.m4
@@ -3410,6 +3491,7 @@ not actually needed.  Doing so should alleviate many 
problems of the
 current implementation, however it requires a stricter style from the
 macro authors.  Hopefully it is easy to revise the existing macros.
 For instance,
+
 @example
 # bad style
 AC_PREREQ(2.57)
@@ -3419,8 +3501,10 @@ AX_FOO
 AX_BAR
 ])
 @end example
+
 @noindent
 should be rewritten as
+
 @example
 AC_DEFUN([AX_FOOBAR],
 [AC_PREREQ([2.57])dnl
@@ -3952,8 +4036,10 @@ Autoconf Manual}).
 Check to see if function prototypes are understood by the compiler.  If
 so, define @samp{PROTOTYPES} and set the output variables @code{U} and
 @code{ANSI2KNR} to the empty string.  Otherwise, set @code{U} to
address@hidden and @code{ANSI2KNR} to @samp{./ansi2knr}.  Automake uses these
-values to implement the obsolete de-ANSI-fication feature.
address@hidden and @code{ANSI2KNR} to @samp{./ansi2knr}.  Automake used these
+values to implement the deprecated de-ANSI-fication feature; however,
+support for @emph{that feature will be removed} in the next major Automake
+release, and then @emph{these macros and variables will go away as well}.
 
 @item AM_CONFIG_HEADER
 @acindex AM_CONFIG_HEADER
@@ -4208,9 +4294,7 @@ does not know the possible values of these variables.  In 
this case
 @cindex @code{SUBDIRS} and @code{AM_CONDITIONAL}
 @cindex @code{AM_CONDITIONAL} and @code{SUBDIRS}
 
address@hidden The test case for the setup described here is
address@hidden     test/subdircond2.test
address@hidden Try to keep it in sync.
address@hidden Keep in sync with subcond2.test.
 
 @file{configure} should output the @file{Makefile} for each directory
 and define a condition into which @file{opt/} should be built.
@@ -4250,9 +4334,7 @@ automatically because it knows that @code{MAYBE_OPT} can 
contain
 @cindex @code{SUBDIRS} and @code{AC_SUBST}
 @cindex @code{AC_SUBST} and @code{SUBDIRS}
 
address@hidden The test case for the setup described here is
address@hidden     test/subdircond3.test
address@hidden Try to keep it in sync.
address@hidden Keep in sync with subcond3.test.
 
 Another possibility is to define @code{MAYBE_OPT} from
 @file{./configure} using @code{AC_SUBST}:
@@ -4410,6 +4492,7 @@ often be replaced by several variables, one for each 
destination
 directory (@pxref{Uniform}).  For instance, the last example could be
 rewritten as follows:
 
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
 @example
 imagesdir = $(pkgdatadir)/images
 soundsdir = $(pkgdatadir)/sounds
@@ -4553,7 +4636,7 @@ to build programs and libraries.
 * Java Support::                Compiling Java sources
 * Vala Support::                Compiling Vala sources
 * Support for Other Languages::  Compiling other languages
-* ANSI::                        Automatic de-ANSI-fication (obsolete)
+* ANSI::                        Automatic de-ANSI-fication (deprecated, soon 
to be removed)
 * Dependencies::                Automatic dependency tracking
 * EXEEXT::                      Support for executable extensions
 @end menu
@@ -4584,14 +4667,14 @@ programs.  Most of the comments about these also apply 
to libraries
 @vindex bin_PROGRAMS
 @vindex sbin_PROGRAMS
 @vindex libexec_PROGRAMS
address@hidden pkglib_PROGRAMS
address@hidden pkglibexec_PROGRAMS
 @vindex noinst_PROGRAMS
 @vindex check_PROGRAMS
 
 In a directory containing source that gets built into a program (as
 opposed to a library or a script), the @code{PROGRAMS} primary is used.
 Programs can be installed in @code{bindir}, @code{sbindir},
address@hidden, @code{pkglibdir}, @code{pkglibexecdir}, or not at all
address@hidden, @code{pkglibexecdir}, or not at all
 (@code{noinst_}).  They can also be built only for @samp{make check}, in
 which case the prefix is @samp{check_}.
 
@@ -4860,6 +4943,7 @@ You can also use Automake conditionals 
(@pxref{Conditionals}) to
 select programs to be built.  In this case you don't have to worry
 about @samp{$(EXEEXT)} or @code{EXTRA_PROGRAMS}.
 
address@hidden Keep in sync with exeext.test.
 @example
 bin_PROGRAMS = cpio pax
 if WANT_MT
@@ -4910,6 +4994,7 @@ Extra objects can be added to a library using the
 @address@hidden variable.  This should be used for objects
 determined by @command{configure}.  Again from @code{cpio}:
 
address@hidden Keep in sync with pr401c.test.
 @example
 libcpio_a_LIBADD = $(LIBOBJS) $(ALLOCA)
 @end example
@@ -5113,6 +5198,7 @@ relates to @file{libfoo.la} or @file{libbar.la} at the 
time it creates
 the link rule for these two libraries.  Therefore the @option{-rpath}
 argument must be explicitly supplied.
 
address@hidden Keep in sync with ltcond.test.
 @example
 EXTRA_LTLIBRARIES = libfoo.la libbar.la
 lib_LTLIBRARIES = $(WANTEDLIBS)
@@ -5128,6 +5214,7 @@ Automake is able to compute the @option{-rpath} setting 
itself, because
 it's clear that both libraries will end up in @samp{$(libdir)} if they
 are installed.
 
address@hidden Keep in sync with ltcond.test.
 @example
 lib_LTLIBRARIES =
 if WANT_LIBFOO
@@ -5154,6 +5241,7 @@ we could build a @file{libhello.la} library using either
 @file{hello-linux.c} or @file{hello-generic.c} with the following
 @file{Makefile.am}.
 
address@hidden Keep in sync with ltcond2.test.
 @example
 lib_LTLIBRARIES = libhello.la
 libhello_la_SOURCES = hello-common.c
@@ -5168,6 +5256,7 @@ either @file{hello-linux.lo} or @address@hidden
 
 Or we could simply use an Automake conditional as follows.
 
address@hidden Keep in sync with ltcond2.test.
 @example
 lib_LTLIBRARIES = libhello.la
 libhello_la_SOURCES = hello-common.c
@@ -5207,6 +5296,7 @@ dependency anywhere it won't be built (this is why
 Here is a sample setup merging libtool convenience libraries from
 subdirectories into one main @file{libtop.la} library.
 
address@hidden Keep in sync with ltconv.test.
 @example
 # -- Top-level Makefile.am --
 SUBDIRS = sub1 sub2 @dots{}
@@ -5373,8 +5463,8 @@ performed automatically by Autoconf (@pxref{AC_LIBOBJ vs 
LIBOBJS, ,
 @subsection Common Issues Related to Libtool's Use
 
 @menu
-* Error required file ltmain.sh not found::      The need to run libtoolize
-* Objects created both with libtool and without:: Avoid a specific build race
+* Error required file ltmain.sh not found::  The need to run libtoolize
+* Objects created both with libtool and without::  Avoid a specific build race
 @end menu
 
 @node Error required file ltmain.sh not found
@@ -5780,8 +5870,8 @@ needs to be avoided: when a target should not be built 
from sources.
 We already saw such an example in @ref{true}; this happens when all
 the constituents of a target have already been compiled and just need
 to be combined using a @code{_LDADD} variable.  Then it is necessary
-to define an empty @code{_SOURCES} variable, so that @command{automake} does 
not
-compute a default.
+to define an empty @code{_SOURCES} variable, so that @command{automake}
+does not compute a default.
 
 @example
 bin_PROGRAMS = target
@@ -5970,6 +6060,18 @@ the C preprocessor.  In particular it generates 
@samp{-I.},
 @code{AM_CONFIG_HEADER}).  You can disable the default @option{-I}
 options using the @option{nostdinc} option.
 
+When a file to be included is generated during the build and not part
+of a distribution tarball, its location is under @code{$(builddir)},
+not under @code{$(srcdir)}.  This matters especially for packages that
+use header files placed in sub-directories and want to allow builds
+outside the source tree (@pxref{VPATH Builds}). In that case we
+recommend to use a pair of @option{-I} options, such as, e.g.,
address@hidden/subdir -I$(srcdir)/some/subdir} or
address@hidden(top_builddir)/some/subdir -I$(top_srcdir)/some/subdir}.
+Note that the reference to the build tree should come before the
+reference to the source tree, so that accidentally leftover generated
+files in the source directory are ignored.
+
 @code{AM_CPPFLAGS} is ignored in preference to a per-executable (or
 per-library) @code{_CPPFLAGS} variable if it is defined.
 
@@ -6046,7 +6148,12 @@ intended for the @file{Makefile.am} author.
 @code{AM_YFLAGS} is usually used to pass the @option{-d} option to
 @command{yacc}.  Automake knows what this means and will automatically
 adjust its rules to update and distribute the header file built by
address@hidden -d}.  What Automake cannot guess, though, is where this
address@hidden address@hidden note that @command{automake} recognizes
address@hidden in @code{AM_YFLAGS} only if it is not clustered with other
+options; for example, it won't be recognized if @code{AM_YFLAGS} is
address@hidden, but it will be if @code{AM_YFLAGS} is @option{-d -t} or
address@hidden -t}}.
+What Automake cannot guess, though, is where this
 header will be used: it is up to you to ensure the header gets built
 before it is first used.  Typically this is necessary in order for
 dependency tracking to work when the header is included by another
@@ -6594,8 +6701,10 @@ is as follows:
 @cindex Java support
 @cindex Support for Java
 
-Automake includes support for compiled Java, using @command{gcj}, the Java
-front end to the GNU Compiler Collection.
+Automake includes support for natively compiled Java, using @command{gcj},
+the Java front end to the GNU Compiler Collection (preliminary support
+for compiling Java to bytecode using the @command{javac} compiler is
+also present; @pxref{Java}).
 
 Any package including Java code to be compiled must define the output
 variable @code{GCJ} in @file{configure.ac}; the variable @code{GCJFLAGS}
@@ -6697,13 +6806,14 @@ suffix rule handling (@pxref{Suffixes}).
 
 
 @node ANSI
address@hidden Automatic de-ANSI-fication
address@hidden Automatic de-ANSI-fication (deprecated, soon to be removed)
 
 @cindex de-ANSI-fication, defined
 
-The features described in this section are obsolete; you should not
-used any of them in new code, and they may be withdrawn in future
-Automake releases.
address@hidden features described in this section are deprecated; you must
+not use any of them in new code, and remove their use from older but
+still maintained code: they will be withdrawn in the next major
+Automake release.}
 
 When the C language was standardized in 1989, there was a long
 transition period where package developers needed to worry about
@@ -6757,8 +6867,9 @@ If no directory prefix is given, the files are assumed to 
be in the
 current directory.
 
 Note that automatic de-ANSI-fication will not work when the package is
-being built for a different host architecture.  That is because 
@command{automake}
-currently has no way to build @command{ansi2knr} for the build machine.
+being built for a different host architecture.  That is because
address@hidden currently has no way to build @command{ansi2knr}
+for the build machine.
 
 @c FIXME: this paragraph might be better moved to an `upgrading' section.
 @cindex @code{LTLIBOBJS} and @code{ansi2knr}
@@ -6776,7 +6887,7 @@ vs.@: @code{LIBOBJS}, autoconf, The Autoconf Manual})
 @section Automatic dependency tracking
 
 As a developer it is often painful to continually update the
address@hidden whenever the include-file dependencies change in a
address@hidden whenever the include-file dependencies change in a
 project.  Automake supplies a way to automatically track dependency
 changes (@pxref{Dependency Tracking}).
 
@@ -6852,10 +6963,10 @@ bin_PROGRAMS = liver$(EXEEXT)
 The targets Automake generates are likewise given the @samp{$(EXEEXT)}
 extension.
 
-The variables @code{TESTS} and @code{XFAIL_TESTS} (@pxref{Simple Tests}) are 
also
-rewritten if they contain filenames that have been declared as programs
-in the same @file{Makefile}.  (This is mostly useful when some programs
-from @code{check_PROGRAMS} are listed in @code{TESTS}.)
+The variables @code{TESTS} and @code{XFAIL_TESTS} (@pxref{Simple Tests})
+are also rewritten if they contain filenames that have been declared as
+programs in the same @file{Makefile}.  (This is mostly useful when some
+programs from @code{check_PROGRAMS} are listed in @code{TESTS}.)
 
 However, Automake cannot apply this rewriting to @command{configure}
 substitutions.  This means that if you are conditionally building a
@@ -7404,18 +7515,21 @@ installation less nice for everybody else.
 
 There are two ways to avoid byte-compiling.  Historically, we have
 recommended the following construct.
+
 @example
 lisp_LISP = file1.el file2.el
 ELCFILES =
 @end example
+
 @noindent
 @code{ELCFILES} is an internal Automake variable that normally lists
 all @file{.elc} files that must be byte-compiled.  Automake defines
 @code{ELCFILES} automatically from @code{lisp_LISP}.  Emptying this
 variable explicitly prevents byte-compilation.
 
-Since Automake 1.8, we now recommend using @code{lisp_DATA} instead.  As
-in
+Since Automake 1.8, we now recommend using @code{lisp_DATA} instead:
+
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
 @example
 lisp_DATA = file1.el file2.el
 @end example
@@ -7458,8 +7572,9 @@ libtool, The Libtool Manual}) with the @code{LTLIBRARIES} 
primary.
 @cindex @code{JAVA} primary, defined
 @cindex Primary variable, @code{JAVA}
 
-Automake provides some minimal support for Java compilation with the
address@hidden primary.
+Automake provides some minimal support for Java bytecode compilation with
+the @code{JAVA} primary (in addition to the support for compiling Java to
+native machine code; @pxref{Java Support}).
 
 Any @file{.java} files listed in a @code{_JAVA} variable will be
 compiled with @code{JAVAC} at build time.  By default, @file{.java}
@@ -7469,6 +7584,7 @@ files are not included in the distribution, you should 
use the
 Here is a typical setup for distributing @file{.java} files and
 installing the @file{.class} files resulting from their compilation.
 
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
 @example
 javadir = $(datadir)/java
 dist_java_JAVA = a.java b.java @dots{}
@@ -7542,12 +7658,14 @@ Automake ships with an Autoconf macro called 
@code{AM_PATH_PYTHON}
 that will determine some Python-related directory variables (see
 below).  If you have called @code{AM_PATH_PYTHON} from
 @file{configure.ac}, then you may use the variables
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
 @code{python_PYTHON} or @code{pkgpython_PYTHON} to list Python source
 files in your @file{Makefile.am}, depending on where you want your files
 installed (see the definitions of @code{pythondir} and
 @code{pkgpythondir} below).
 
address@hidden AM_PATH_PYTHON (@ovar{version}, @ovar{action-if-found}, 
@ovar{action-if-not-found})
address@hidden AM_PATH_PYTHON (@ovar{version}, @ovar{action-if-found},
+  @ovar{action-if-not-found})
 
 Search for a Python interpreter on the system.  This macro takes three
 optional arguments.  The first argument, if present, is the minimum
@@ -7573,6 +7691,9 @@ If Python >= 2.5 was only @emph{optional} to the package,
 AM_PATH_PYTHON([2.5],, [:])
 @end example
 
+If the @env{PYTHON} variable is set when @code{AM_PATH_PYTHON} is
+called, then that will be the only Python interpreter that is tried.
+
 @code{AM_PATH_PYTHON} creates the following output variables based on
 the Python installation found during configuration.
 @end defmac
@@ -7588,8 +7709,8 @@ to setup a conditional in order to disable the relevant 
part of a build
 as follows.
 
 @example
-  AM_PATH_PYTHON(,, [:])
-  AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
+AM_PATH_PYTHON(,, [:])
+AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
 @end example
 
 @item PYTHON_VERSION
@@ -7626,9 +7747,10 @@ This is the directory where Python extension modules 
(shared libraries)
 should be installed.  An extension module written in C could be declared
 as follows to Automake:
 
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
 @example
 pyexec_LTLIBRARIES = quaternion.la
-quaternion_SOURCES = quaternion.c support.c support.h
+quaternion_la_SOURCES = quaternion.c support.c support.h
 quaternion_la_LDFLAGS = -avoid-version -module
 @end example
 
@@ -7822,6 +7944,7 @@ passed to @code{makeinfo} when building @file{.info} 
files; and
 @samp{$(AM_MAKEINFOHTMLFLAGS)} is used when building @file{.html}
 files.
 
address@hidden Keep in sync with txinfo21.test.
 For instance, the following setting can be used to obtain one single
 @file{.html} file per manual, without node separators.
 @example
@@ -8047,10 +8170,11 @@ Variables using the standard directory prefixes 
@samp{bin},
 For instance, @code{data_DATA} files are installed by @code{install-data},
 while @code{bin_PROGRAMS} files are installed by @code{install-exec}.
 
-Any variable using a user-defined directory prefix with @samp{exec} in
-the name (e.g., @code{myexecbin_PROGRAMS}) is installed by
address@hidden  All other user-defined prefixes are installed by
address@hidden
+Any variable using a user-defined directory prefix with
address@hidden in the name (e.g.,
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
address@hidden) is installed by @code{install-exec}.  All
+other user-defined prefixes are installed by @code{install-data}.
 
 @node Extending Installation
 @section Extending Installation
@@ -8229,14 +8353,19 @@ is run.  The default setting is @option{--best}.
 @cmindex include
 For the most part, the files to distribute are automatically found by
 Automake: all source files are automatically included in a distribution,
-as are all @file{Makefile.am}s and @file{Makefile.in}s.  Automake also
+as are all @file{Makefile.am} and @file{Makefile.in} files.  Automake also
 has a built-in list of commonly used files that are automatically
 included if they are found in the current directory (either physically,
-or as the target of a @file{Makefile.am} rule).  This list is printed by
address@hidden --help}.  Also, files that are read by @command{configure}
+or as the target of a @file{Makefile.am} rule); this list is printed by
address@hidden --help}.  Note that some files in this list are actually
+distributed only if other certain conditions hold (for example,
address@hidden Keep in sync with autodist-config-headers.test.
+the @file{config.h.top} and @file{config.h.bot} files are automatically
+distributed only if, e.g., @samp{AC_CONFIG_HEADERS([config.h])} is used
+in @file{configure.ac}).  Also, files that are read by @command{configure}
 (i.e.@: the source files corresponding to the files specified in various
 Autoconf macros such as @code{AC_CONFIG_FILES} and siblings) are
-automatically distributed.  Files included in @file{Makefile.am}s (using
+automatically distributed.  Files included in a @file{Makefile.am} (using
 @code{include}) or in @file{configure.ac} (using @code{m4_include}), and
 helper scripts installed with @samp{automake --add-missing} are also
 distributed.
@@ -8250,8 +8379,8 @@ subdirectories in @code{EXTRA_DIST}.
 You can also mention a directory in @code{EXTRA_DIST}; in this case the
 entire directory will be recursively copied into the distribution.
 Please note that this will also copy @emph{everything} in the directory,
-including CVS/RCS version control files.  We recommend against using
-this feature.
+including, e.g., Subversion's @file{.svn} private directories or CVS/RCS
+version control files.  We recommend against using this feature.
 
 @vindex SUBDIRS
 @vindex DIST_SUBDIRS
@@ -8312,7 +8441,7 @@ recursively included by specifying a directory in 
EXTRA_DIST:
 EXTRA_DIST = doc
 
 dist-hook:
-        rm -rf `find $(distdir)/doc -name CVS`
+        rm -rf `find $(distdir)/doc -type d -name .svn`
 @end example
 
 @vindex distdir
@@ -8355,11 +8484,29 @@ makes a distribution, then tries to do a @code{VPATH} 
build
 (@pxref{VPATH Builds}), run the test suite, and finally make another
 tarball to ensure the distribution is self-contained.
 
address@hidden AM_DISTCHECK_CONFIGURE_FLAGS
 @vindex DISTCHECK_CONFIGURE_FLAGS
 Building the package involves running @samp{./configure}.  If you need
 to supply additional flags to @command{configure}, define them in the
address@hidden variable, either in your top-level
address@hidden, or on the command line when invoking @command{make}.
address@hidden variable in your top-level
address@hidden  The user can still extend or override the flags
+provided there by defining the @code{DISTCHECK_CONFIGURE_FLAGS} variable,
+on the command line when invoking @command{make}.
+
+Still, developers are encouraged to strive to make their code buildable
+without requiring any special configure option; thus, in general, you
+shouldn't define @code{AM_DISTCHECK_CONFIGURE_FLAGS}. However, there
+might be few scenarios in which the use of this variable is justified.
+GNU @command{m4} offers an example.  GNU @command{m4} configures by
+default with its experimental and seldom used "changeword" feature
+disabled; so in its case it is useful to have @command{make distcheck}
+run configure with the @option{--with-changeword} option, to ensure that
+the code for changeword support still compiles correctly.
+GNU @command{m4} also employs the @code{AM_DISTCHECK_CONFIGURE_FLAGS}
+variable to stress-test the use of @option{--program-prefix=g}, since at
+one point the @command{m4} build system had a bug where @command{make
+installcheck} was wrongly assuming it could blindly test "@command{m4}",
+rather than the just-installed "@command{gm4}".
 
 @trindex distcheck-hook
 If the @code{distcheck-hook} rule is defined in your top-level
@@ -8369,9 +8516,10 @@ is configured and built.  Your @code{distcheck-hook} can 
do almost
 anything, though as always caution is advised.  Generally this hook is
 used to check for potential distribution errors not caught by the
 standard mechanism.  Note that @code{distcheck-hook} as well as
address@hidden are not honored in a subpackage
address@hidden, but the @code{DISTCHECK_CONFIGURE_FLAGS} are
-passed down to the @command{configure} script of the subpackage.
address@hidden and @code{DISTCHECK_CONFIGURE_FLAGS}
+are not honored in a subpackage @file{Makefile.am}, but the flags from
address@hidden and @code{DISTCHECK_CONFIGURE_FLAGS}
+are passed down to the @command{configure} script of the subpackage.
 
 @trindex distcleancheck
 @vindex DISTCLEANFILES
@@ -8401,6 +8549,7 @@ If you want @code{distcleancheck} to ignore built files 
that have not
 been cleaned because they are also part of the distribution, add the
 following definition instead:
 
address@hidden Keep in sync with distcleancheck.test.
 @example
 distcleancheck_listfiles = \
   find . -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \
@@ -8533,6 +8682,12 @@ colored output by setting the @command{make} variable
 @samp{AM_COLOR_TESTS=no}, or force colored output even without a connecting
 terminal with @samp{AM_COLOR_TESTS=always}.
 
+Note that the semantics of some @command{make} implementations when used
+in parallel mode (@pxref{Parallel make,,, autoconf, The Autoconf Manual})
+can cause the automatic detection of a connection to a capable terminal
+to fail.  In that case, you can still resort to the use of
address@hidden
+
 @vindex TESTS
 @vindex TESTS_ENVIRONMENT
 The variable @code{TESTS_ENVIRONMENT} can be used to set environment
@@ -8540,21 +8695,28 @@ variables for the test run; the environment variable 
@env{srcdir} is
 set in the rule.  If all your test programs are scripts, you can also
 set @code{TESTS_ENVIRONMENT} to an invocation of the shell (e.g.
 @samp{$(SHELL) -x} can be useful for debugging the tests), or any other
-interpreter.  For instance the following setup is used by the Automake
-package to run four tests in Perl.
+interpreter.  For instance, the following setup may be used to run tests
+with Perl:
+
address@hidden Keep in sync with tests-environment-backcompat.test.
 @example
-TESTS_ENVIRONMENT = $(PERL) -Mstrict -I $(top_srcdir)/lib -w
-TESTS = Condition.pl DisjConditions.pl Version.pl Wrap.pl
+TESTS_ENVIRONMENT = $(PERL) -Mstrict -w
+TESTS = foo.pl bar.pl baz.pl
 @end example
 
+Note that the @option{parallel-tests} driver provides a more elegant
+way to achieve the same effect, freeing the @code{TESTS_ENVIRONMENT}
+variable for the user to override (@pxref{Simple Tests using
+parallel-tests}).
+
 
 @cindex Tests, expected failure
 @cindex Expected test failure
 
address@hidden XFAIL_TESTS
 You may define the variable @code{XFAIL_TESTS} to a list of tests
 (usually a subset of @code{TESTS}) that are expected to fail.  This will
 reverse the result of those tests.
address@hidden XFAIL_TESTS
 
 Automake ensures that each file listed in @code{TESTS} is built before
 any tests are run; you can list both source and derived programs (or
@@ -8632,6 +8794,7 @@ this extension to be called with this driver.  For all 
tests without a
 registered extension, the variables @code{LOG_COMPILER},
 @code{AM_LOG_FLAGS}, and @code{LOG_FLAGS} may be used.  For example,
 
address@hidden Keep in sync with parallel-tests-log-compiler-example.test.
 @example
 TESTS = foo.pl bar.py baz
 TEST_EXTENSIONS = .pl .py
@@ -8698,6 +8861,21 @@ use a command like this to run only a subset of the 
tests:
 env TESTS="foo.test bar.test" make -e check
 @end example
 
+Note however that the command above will unconditionally overwrite the
address@hidden file, thus clobbering the recorded results
+of any previous testsuite run.  This might be undesirable for packages
+whose testsuite takes long time to execute.  Luckily, this problem can
+easily be avoided by overriding also @code{TEST_SUITE_LOG} at runtime;
+for example,
+
address@hidden Keep in sync with parallel-tests-log-override-2.test.
address@hidden
+env TEST_SUITE_LOG=partial.log TESTS="..." make -e check
address@hidden example
+
+will write the result of the partial testsuite runs to the
address@hidden, without touching @file{test-suite.log}.
+
 @item
 You can set the @code{TEST_LOGS} variable.  By default, this variable is
 computed at @command{make} run time from the value of @code{TESTS} as
@@ -8708,6 +8886,9 @@ set x subset*.log; shift
 env TEST_LOGS="foo.log $*" make -e check
 @end example
 
+The comments made above about @code{TEST_SUITE_LOG} overriding applies
+here too.
+
 @item
 @vindex RECHECK_LOGS
 @cindex lazy test execution
@@ -8874,9 +9055,11 @@ output in all them), so it is safer and easier to 
@code{AC_SUBST} them
 from @file{configure.ac}.  For instance, the following statement will
 cause @file{configure} to be rerun each time @file{version.sh} is
 changed.
+
 @example
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
 @end example
+
 @noindent
 Note the @samp{$(top_srcdir)/} in the file name.  Since this variable
 is to be used in all @file{Makefile}s, its value must be sensible at
@@ -8902,12 +9085,14 @@ Speaking of @file{version.sh} scripts, we recommend 
against them
 today.  They are mainly used when the version of a package is updated
 automatically by a script (e.g., in daily builds).  Here is what some
 old-style @file{configure.ac}s may look like:
+
 @example
 AC_INIT
 . $srcdir/version.sh
 AM_INIT_AUTOMAKE([name], $VERSION_NUMBER)
 @dots{}
 @end example
+
 @noindent
 Here, @file{version.sh} is a shell fragment that sets
 @code{VERSION_NUMBER}.  The problem with this example is that
@@ -8918,12 +9103,14 @@ to the user), and that it uses the obsolete form of 
@code{AC_INIT} and
 straightforward, because shell variables are not allowed in
 @code{AC_INIT}'s arguments.  We recommend that @file{version.sh} be
 replaced by an M4 file that is included by @file{configure.ac}:
+
 @example
 m4_include([version.m4])
 AC_INIT([name], VERSION_NUMBER)
 AM_INIT_AUTOMAKE
 @dots{}
 @end example
+
 @noindent
 Here @file{version.m4} could contain something like
 @samp{m4_define([VERSION_NUMBER], [1.2])}.  The advantage of this
@@ -8972,11 +9159,15 @@ implies options @option{readme-alpha} and 
@option{check-news}.
 @itemx @address@hidden/ansi2knr}
 @cindex Option, @option{ansi2knr}
 @opindex ansi2knr
-Turn on the obsolete de-ANSI-fication feature.  @xref{ANSI}.  If preceded by a
+Turn on the deprecated de-ANSI-fication feature (@pxref{ANSI}).  Note
+that that feature and this option @emph{will be removed} in the next
+major Automake release.
+
+If preceded by a
 path, the generated @file{Makefile.in} will look in the specified
 directory to find the @file{ansi2knr} program.  The path should be a
 relative path to another directory in the same distribution (Automake
-currently does not check this).
+does not check this).
 
 @item @option{check-news}
 @cindex Option, @option{check-news}
@@ -9129,90 +9320,18 @@ letter; it should be omitted for non-alpha releases.
 @cindex Option, @option{silent-rules}
 @opindex silent-rules
 Enable less verbose build rules.  This can be used to let build rules
-output a status line of the form
-
+output status lines of the form:
 @example
-  GEN @var{output-file}
+GEN @var{output-file}
+ CC @var{object-file}
 @end example
-
 @noindent
 instead of printing the command that will be executed to update
address@hidden  It can also silence @command{libtool} output.
-
-To enable less verbose build rules, both the developer and the user
-of the package have to take a number of steps.  The developer needs
-to do either of the following:
-
address@hidden @bullet
address@hidden
-Add the @option{silent-rules} option as argument to @code{AM_INIT_AUTOMAKE}.
address@hidden
-Call the @code{AM_SILENT_RULES} macro from within the @file{configure.ac}
-file.
address@hidden itemize
-
-It is not possible to instead specify @option{silent-rules} in a
address@hidden file.
-
address@hidden default verbosity for silent-rules
-If the developer has done either of the above, then the user of the
-package may influence the verbosity at @command{configure} run time as
-well as at @command{make} run time:
-
address@hidden @bullet
address@hidden
address@hidden --enable-silent-rules
address@hidden --disable-silent-rules
-Passing @option{--enable-silent-rules} to @command{configure} will cause
-build rules to be less verbose; the option @option{--disable-silent-rules}
-is the default and will cause normal verbose output.
address@hidden
address@hidden @code{V}
-At @command{make} run time, the default chosen at @command{configure}
-time may be overridden: @code{make V=1} will produce verbose output,
address@hidden V=0} less verbose output.
address@hidden itemize
-
-For portability to different @command{make} implementations, package authors
-are advised to not set the variable @code{V} inside the @file{Makefile.am}
-file, to allow the user to override the value for subdirectories as well.
-
-The current implementation of this feature relies on a non-POSIX, but in
-practice rather widely supported @file{Makefile} construct of nested
-variable expansion @samp{$(@var{var1}$(V))}.  Do not use the
address@hidden option if your package needs to build with
address@hidden implementations that do not support it.  The
address@hidden option turns off warnings about recursive variable
-expansion, which are in turn enabled by @option{-Wportability}
-(@pxref{Invoking Automake}).
-
address@hidden @code{AM_V_GEN}
address@hidden @code{AM_V_at}
address@hidden @code{AM_DEFAULT_VERBOSITY}
-To extend the silent mode to your own rules, you have two choices:
-
address@hidden @bullet
address@hidden
-You can use the predefined variable @code{AM_V_GEN} as a prefix to
-commands that should output a status line in silent mode, and
address@hidden as a prefix to commands that should not output anything
-in silent mode.  When output is to be verbose, both of these variables
-will expand to the empty string.
address@hidden
-You can add your own variables, so strings of your own choice are shown.
-The following snippet shows how you would define your own equivalent of
address@hidden:
-
address@hidden
-pkg_verbose = $(pkg_verbose_$(V))
-pkg_verbose_ = $(pkg_verbose_$(AM_DEFAULT_VERBOSITY))
-pkg_verbose_0 = @@echo GEN $@@;
-
-foo: foo.in
-        $(pkg_verbose)cp $(srcdir)/foo.in $@@
address@hidden example
address@hidden itemize
address@hidden or to compile @var{object-file}.  It can also
+silence @command{libtool} output.
 
+For more information about how to use, enable, or disable silent
+rules, @pxref{Automake silent-rules Option}.
 
 @item @option{std-options}
 @cindex Options, @option{std-options}
@@ -9453,6 +9572,7 @@ For instance, the following definition prevents Automake 
from misinterpreting
 the @samp{.idlC.cpp:} rule as an attempt to transform @file{.idlC} files into
 @file{.cpp} files.
 
address@hidden Keep in sync with suffix7.test.
 @example
 SUFFIXES = .idl C.cpp
 .idlC.cpp:
@@ -9687,6 +9807,293 @@ Subdirectories}, @pxref{Conditional Sources}, 
@pxref{Conditional
 Programs}, @pxref{Conditional Libtool Libraries}, @pxref{Conditional
 Libtool Sources}).
 
address@hidden Silencing Make
address@hidden Silencing @command{make}
+
address@hidden Silent @command{make}
address@hidden Silencing @command{make}
address@hidden Silent rules
address@hidden Silent @command{make} rules
+
address@hidden
+* Make verbosity::               Make is verbose by default
+* Tricks For Silencing Make::    Standard and generic ways to silence make
+* Automake silent-rules Option:: How Automake can help in silencing make
address@hidden menu
+
address@hidden Make verbosity
address@hidden Make is verbose by default
+
+Normally, when executing the set of rules associated with a target,
address@hidden prints each rule before it is executed.  This behaviour,
+while having been in place for a long time, and being even mandated by
+the POSIX standard, starkly violates the ``silence is golden'' UNIX
address@hidden also
address@hidden://catb.org/~esr/writings/taoup/html/ch11s09.html}.}:
+
address@hidden
+When a program has nothing interesting or surprising to say, it should
+say nothing.  Well-behaved Unix programs do their jobs unobtrusively,
+with a minimum of fuss and bother.  Silence is golden.
address@hidden quotation
+
+In fact, while such verbosity of @command{make} can theoretically be
+useful to track bugs and understand reasons of failures right away, it
+can also hide warning and error messages from @command{make}-invoked
+tools, drowning them in a flood of uninteresting and seldom useful
+messages, and thus allowing them to go easily undetected.
+
+This problem can be very annoying, especially for developers, who usually
+know quite well what's going on behind the scenes, and for whom the
+verbose output from @command{make} ends up being mostly noise that hampers
+the easy detection of potentially important warning messages.
+
address@hidden Tricks For Silencing Make
address@hidden Standard and generic ways to silence make
+
+Here we describe some common idioms/tricks to obtain a quieter make
+output, with their relative advantages and drawbacks.  In the next
+section (@ref{Automake silent-rules Option}) we'll see how Automake
+can help in this respect.
+
address@hidden @bullet
+
address@hidden @command{make -s}
+
+This simply causes @command{make} not to print @emph{any} rule before
+executing it.
+
+The @option{-s} flag is mandated by POSIX, universally supported, and
+its purpose and function are easy to understand.
+
+But it also has its serious limitations too.  First of all, it embodies
+an ``all or nothing'' strategy, i.e., either everything is silenced, or
+nothing is; this lack of granularity can sometimes be a fatal flaw.
+Moreover, when the @option{-s} flag is used, the @command{make} output
+might turn out to be too much terse; in case of errors, the user won't
+be able to easily see what rule or command have caused them, or even,
+in case of tools with poor error reporting, what the errors were!
+
address@hidden @command{make >/dev/null || make}
+
+Apparently, this perfectly obeys the ``silence is golden'' rule: warnings
+from stderr are passed through, output reporting is done only in case of
+error, and in that case it should provide a verbose-enough report to allow
+an easy determination of the error location and causes.
+
+However, calling @command{make} two times in a row might hide errors
+(especially intermittent ones), or subtly change the expected semantic
+of the @command{make} calls --- things these which can clearly make
+debugging and error assessment very difficult.
+
address@hidden @command{make --no-print-directory}
+
+This is GNU @command{make} specific.  When called with the
address@hidden option, GNU @command{make} will disable
+printing of the working directory by invoked address@hidden (the
+well-known address@hidden/Leaving directory ...}'' messages).  This helps
+to decrease the verbosity of the output, but experience has shown that
+it can also often render debugging considerably harder in projects using
+deeply-nested @command{make} recursion.
+
+As an aside, notice that the @option{--no-print-directory} option is
+automatically activated if the @option{-s} flag is used.
+
address@hidden TODO: Other tricks?
address@hidden TODO: Maybe speak about the @code{.SILENT} target?
address@hidden TODO:  - Pros: More granularity on what to silence.
address@hidden TODO:  - Cons: No easy way to temporarily override.
+
address@hidden itemize
+
address@hidden Automake silent-rules Option
address@hidden How Automake can help in silencing make
+
+The tricks and idioms for silencing @command{make} described in the
+previous section can be useful from time to time, but we've seen that
+they all have their serious drawbacks and limitations.  That's why
+automake provides support for a more advanced and flexible way of
+obtaining quieter output from @command{make}: the @option{silent-rules}
+mode.
+
address@hidden TODO: Maybe describe in brief the precedent set by the build 
system
address@hidden of the Linux Kernel, from which Automake took inspiration ... 
Links?
+
+To give the gist of what @option{silent-rules} can do, here is a simple
+comparison between a typical @command{make} output (where silent rules
+are disabled) and one with silent rules enabled:
+
address@hidden
+% @kbd{cat Makefile.am}
+bin_PROGRAMS = foo
+foo_SOURCES = main.c func.c
+% @kbd{cat main.c}
+int main (void) @{ return func (); @}  /* func used undeclared */
+% @kbd{cat func.c}
+int func (void) @{ int i; return i; @} /* i used uninitialized */
+
address@hidden make output is by default very verbose.  This causes warnings
+from the compiler to be somewhat hidden, and not immediate to spot.}
+% @kbd{make CFLAGS=-Wall}
+gcc -DPACKAGE_NAME=\"foo\" -DPACKAGE_TARNAME=\"foo\" ...
+-DPACKAGE_STRING=\"foo\ 1.0\" -DPACKAGE_BUGREPORT=\"\" ...
+-DPACKAGE=\"foo\" -DVERSION=\"1.0\" -I. -Wall -MT main.o
+-MD -MP -MF .deps/main.Tpo -c -o main.o main.c
+main.c: In function ‘main’:
+main.c:3:3: warning: implicit declaration of function ‘func’
+mv -f .deps/main.Tpo .deps/main.Po
+gcc -DPACKAGE_NAME=\"foo\" -DPACKAGE_TARNAME=\"foo\" ...
+-DPACKAGE_STRING=\"foo\ 1.0\" -DPACKAGE_BUGREPORT=\"\" ...
+-DPACKAGE=\"foo\" -DVERSION=\"1.0\" -I. -Wall -MT func.o
+-MD -MP -MF .deps/func.Tpo -c -o func.o func.c
+func.c: In function ‘func’:
+func.c:4:3: warning: ‘i’ used uninitialized in this function
+mv -f .deps/func.Tpo .deps/func.Po
+gcc -Wall -o foo main.o func.o
+
address@hidden up, so that we we can rebuild everything from scratch.}
+% @kbd{make clean}
+test -z "foo" || rm -f foo
+rm -f *.o
+
address@hidden rules enabled: the output is minimal but informative.  In
+particular, the warnings from the compiler stick out very clearly.}
+% @kbd{make V=0 CFLAGS=-Wall}
+  CC     main.o
+main.c: In function ‘main’:
+main.c:3:3: warning: implicit declaration of function ‘func’
+  CC     func.o
+func.c: In function ‘func’:
+func.c:4:3: warning: ‘i’ used uninitialized in this function
+  CCLD   foo
address@hidden example
+
address@hidden silent-rules and libtool
+Also, in projects using @command{libtool}, the use of silent rules can
+automatically enable the @command{libtool}'s @option{--silent} option:
+
address@hidden
+% @kbd{cat Makefile.am}
+lib_LTLIBRARIES = libx.la
+
+% @kbd{make # Both make and libtool are verbose by default.}
+...
+libtool: compile: gcc -DPACKAGE_NAME=\"foo\" ... -DLT_OBJDIR=\".libs/\"
+  -I. -g -O2 -MT libx.lo -MD -MP -MF .deps/libx.Tpo -c libx.c -fPIC
+  -DPIC -o .libs/libx.o
+mv -f .deps/libx.Tpo .deps/libx.Plo
+/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -o libx.la -rpath
+  /usr/local/lib libx.lo
+libtool: link: gcc -shared .libs/libx.o -Wl,-soname -Wl,libx.so.0
+  -o .libs/libx.so.0.0.0
+libtool: link: cd .libs && rm -f libx.so && ln -s libx.so.0.0.0 libx.so
+...
+
+% @kbd{make V=0}
+  CC     libx.lo
+  CCLD   libx.la
address@hidden example
+
+Let's now see how the @option{silent-rules} mode interfaces with the
+package developer and the package user.
+
+To enable the use of @option{silent-rules} in his package, a developer
+needs to do either of the following:
+
address@hidden @bullet
address@hidden
+Add the @option{silent-rules} option as argument to @code{AM_INIT_AUTOMAKE}.
address@hidden
+Call the @code{AM_SILENT_RULES} macro from within the @file{configure.ac}
+file.
address@hidden itemize
+
+It is not possible to instead specify @option{silent-rules} in a
address@hidden file.
+
+If the developer has done either of the above, then the user of the
+package may influence the verbosity at @command{configure} run time as
+well as at @command{make} run time:
+
address@hidden @bullet
address@hidden
address@hidden --enable-silent-rules
address@hidden --disable-silent-rules
+Passing @option{--enable-silent-rules} to @command{configure} will cause
+build rules to be less verbose; the option @option{--disable-silent-rules}
+will cause normal verbose output.
address@hidden
address@hidden @code{V}
+At @command{make} run time, the default chosen at @command{configure}
+time may be overridden: @code{make V=1} will produce verbose output,
address@hidden V=0} less verbose output.
address@hidden itemize
+
address@hidden default verbosity for silent-rules
+Note that silent rules are @emph{disabled} by default; the user must
+enable them explicitly at either @command{configure} run time or at
address@hidden run time.  We think that this is a good policy, since
+it provides the casual user with enough information to prepare a good
+bug report in case anything breaks.
+
+Still, notwithstanding the rationales above, a developer who wants to
+make silent rules enabled by default in his own package can do so by
+adding a @samp{yes} argument to the @code{AM_SILENT_RULES} call in
address@hidden  We advise against this approach, though.
+
address@hidden Keep in sync with silent-configsite.test
+Users who prefer to have silent rules enabled by default can edit their
address@hidden file to make the variable @code{enable_silent_rules}
+default to @samp{yes}.  This should still allow disabling silent rules
+at @command{configure} time and at @command{make} time.
+
address@hidden FIXME: there's really a need to specify this explicitly?
+For portability to different @command{make} implementations, package authors
+are advised to not set the variable @code{V} inside the @file{Makefile.am}
+file, to allow the user to override the value for subdirectories as well.
+
+The current implementation of this feature relies on a non-POSIX, but in
+practice rather widely supported @file{Makefile} construct of nested
+variable expansion @samp{$(@var{var1}$(V))}.  Do not use the
address@hidden option if your package needs to build with
address@hidden implementations that do not support it.  The
address@hidden option turns off warnings about recursive variable
+expansion, which are in turn enabled by @option{-Wportability}
+(@pxref{Invoking Automake}).
+
address@hidden @code{AM_V_GEN}
address@hidden @code{AM_V_at}
address@hidden @code{AM_DEFAULT_VERBOSITY}
+To extend the silent mode to your own rules, you have two choices:
+
address@hidden @bullet
address@hidden
+You can use the predefined variable @code{AM_V_GEN} as a prefix to
+commands that should output a status line in silent mode, and
address@hidden as a prefix to commands that should not output anything
+in silent mode.  When output is to be verbose, both of these variables
+will expand to the empty string.
address@hidden
+You can add your own variables, so strings of your own choice are shown.
+The following snippet shows how you would define your own equivalent of
address@hidden:
+
address@hidden
+pkg_verbose = $(pkg_verbose_$(V))
+pkg_verbose_ = $(pkg_verbose_$(AM_DEFAULT_VERBOSITY))
+pkg_verbose_0 = @@echo PKG-GEN $@@;
+
+foo: foo.in
+        $(pkg_verbose)cp $(srcdir)/foo.in $@@
address@hidden example
+
address@hidden itemize
+
+As a final note, observe that, even when silent rules are enabled,
+the @option{--no-print-directory} option is still required with GNU
address@hidden if the address@hidden/Leaving directory ...}'' messages
+are to be disabled.
+
 @node Gnits
 @chapter The effect of @option{--gnu} and @option{--gnits}
 
@@ -9803,8 +10210,7 @@ The options @option{no-installinfo} and 
@option{no-dependencies} are
 implied.
 
 @item
-The macros @code{AM_MAINTAINER_MODE} and @code{AM_CYGWIN32} are
-required.
+The macro @code{AM_MAINTAINER_MODE} is required.
 
 @item
 The @code{check} target doesn't depend on @code{all}.
@@ -9996,6 +10402,7 @@ Checks, autoconf, The Autoconf Manual}) and use 
@samp{$(LN_S)} in
 For instance, here is how you could install a versioned copy of a
 program using @samp{$(LN_S)}:
 
address@hidden Keep in sync with insthook.test
 @example
 install-exec-hook:
         cd $(DESTDIR)$(bindir) && \
@@ -10010,7 +10417,9 @@ destination directory in order to create relative links.
 When writing @code{install-exec-hook} or @code{install-data-hook},
 please bear in mind that the exec/data distinction is based on the
 installation directory, not on the primary used (@pxref{The Two Parts of
-Install}).  So a @code{foo_SCRIPTS} will be installed by
+Install}).
address@hidden Keep in sync with primary-prefix-couples-documented-valid.test.
+So a @code{foo_SCRIPTS} will be installed by
 @code{install-data}, and a @code{barexec_SCRIPTS} will be installed by
 @code{install-exec}.  You should define your hooks consequently.
 
@@ -10250,12 +10659,14 @@ older releases will not be used.  For instance, use 
this in your
 @example
   AM_INIT_AUTOMAKE([1.6.1])    dnl Require Automake 1.6.1 or better.
 @end example
+
 @noindent
 or, in a particular @file{Makefile.am}:
 
 @example
   AUTOMAKE_OPTIONS = 1.6.1   # Require Automake 1.6.1 or better.
 @end example
+
 @noindent
 Automake will print an error message if its version is
 older than the requested version.
@@ -10354,6 +10765,7 @@ lists.
 * Multiple Outputs::            Writing rules for tools with many output files
 * Hard-Coded Install Paths::    Installing to hard-coded locations
 * Debugging Make Rules::        Strategies when things don't work as expected
+* Reporting Bugs::              Feedback on bugs and feature requests
 @end menu
 
 @node CVS
@@ -10538,9 +10950,10 @@ Besides the warning, when a tool is missing, 
@command{missing} will
 attempt to fix timestamps in a way that allows the build to continue.
 For instance, @command{missing} will touch @file{configure} if
 @command{autoconf} is not installed.  When all distributed files are
-kept under CVS, this feature of @command{missing} allows a user
address@hidden no maintainer tools} to build a package off CVS, bypassing
-any timestamp inconsistency implied by @samp{cvs update}.
+kept under version control, this feature of @command{missing} allows a
+user @emph{with no maintainer tools} to build a package off its version
+control repository, bypassing any timestamp inconsistency (implied by
+e.g.@: @samp{cvs update} or @samp{git clone}).
 
 If the required tool is installed, @command{missing} will run it and
 won't attempt to continue after failures.  This is correct during
@@ -10595,9 +11008,9 @@ swayed by Fran@,{c}ois's arguments, and got rid of
 @code{AM_MAINTAINER_MODE} in all of his packages.
 
 Still many people continue to use @code{AM_MAINTAINER_MODE}, because
-it helps them working on projects where all files are kept under CVS,
-and because @command{missing} isn't enough if you have the wrong
-version of the tools.
+it helps them working on projects where all files are kept under version
+control, and because @command{missing} isn't enough if you have the
+wrong version of the tools.
 
 
 @node Wildcards
@@ -11140,6 +11553,7 @@ true_CPPFLAGS = -DEXIT_CODE=0
 false_SOURCES = generic.c
 false_CPPFLAGS = -DEXIT_CODE=1
 @end example
+
 @noindent
 Obviously the two programs are built from the same source, but it
 would be bad if they shared the same object, because @file{generic.o}
@@ -11309,6 +11723,7 @@ data.c: data.foo
 data.h: data.foo data.c
         foo data.foo
 @end example
+
 @noindent
 therefore a parallel @command{make} will have to serialize the builds
 of @file{data.c} and @file{data.h}, and will detect that the second is
@@ -11373,11 +11788,15 @@ data.h data.w data.x: data.c
         fi
 @end example
 
-However there are now two minor problems in this setup.  One is related
+However there are now three minor problems in this setup.  One is related
 to the timestamp ordering of @file{data.h}, @file{data.w},
address@hidden, and @file{data.c}.  The other one is a race condition
address@hidden, and @file{data.c}.  Another one is a race condition
 if a parallel @command{make} attempts to run multiple instances of the
-recover block at once.
+recover block at once.  Finally, the recursive rule breaks @samp{make -n}
+when run with GNU @command{make} (as well as some other @command{make}
+implementations), as it may remove @file{data.h} even when it should not
+(@pxref{MAKE Variable, , How the @code{MAKE} Variable Works, make,
+The GNU Make Manual}).
 
 Let us deal with the first problem.  @command{foo} outputs four files,
 but we do not know in which order these files are created.  Suppose
@@ -11485,8 +11904,8 @@ elc-stamp: $(ELFILES)
         @@mv -f elc-temp $@@
 
 $(ELCFILES): elc-stamp
-## Recover from the removal of $@@
         @@if test -f $@@; then :; else \
+## Recover from the removal of $@@
           trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
           if mkdir elc-lock 2>/dev/null; then \
 ## This code is being executed by the first process.
@@ -11499,10 +11918,58 @@ $(ELCFILES): elc-stamp
             while test -d elc-lock; do sleep 1; done; \
 ## Succeed if and only if the first process succeeded.
             test -f elc-stamp; exit $$?; \
address@hidden $$
           fi; \
         fi
 @end example
+
+These solutions all still suffer from the third problem, namely that
+they break the promise that @samp{make -n} should not cause any actual
+changes to the tree.  For those solutions that do not create lock files,
+it is possible to split the recover rules into two separate recipe
+commands, one of which does all work but the recursion, and the
+other invokes the recursive @samp{$(MAKE)}.  The solutions involving
+locking could act upon the contents of the @samp{MAKEFLAGS} variable,
+but parsing that portably is not easy (@pxref{The Make Macro MAKEFLAGS,,,
+autoconf, The Autoconf Manual}).  Here is an example:
+
address@hidden
+ELFILES = one.el two.el three.el @dots{}
+ELCFILES = $(ELFILES:=c)
+
+elc-stamp: $(ELFILES)
+        @@rm -f elc-temp
+        @@touch elc-temp
+        $(elisp_comp) $(ELFILES)
+        @@mv -f elc-temp $@@
+
+$(ELCFILES): elc-stamp
+## Recover from the removal of $@@
+        @@dry=; for f in x $$MAKEFLAGS; do \
+          case $$f in \
+            *=*|--*);; \
+            *n*) dry=:;; \
+          esac; \
+        done; \
+        if test -f $@@; then :; else \
+          $$dry trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
+          if $$dry mkdir elc-lock 2>/dev/null; then \
+## This code is being executed by the first process.
+            $$dry rm -f elc-stamp; \
+            $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
+            $$dry rmdir elc-lock; \
+          else \
+## This code is being executed by the follower processes.
+## Wait until the first process is done.
+            while test -d elc-lock && test -z "$$dry"; do \
 @c $$
+              sleep 1; \
+            done; \
+## Succeed if and only if the first process succeeded.
+            $$dry test -f elc-stamp; exit $$?; \
+          fi; \
+        fi
address@hidden example
 
 For completeness it should be noted that GNU @command{make} is able to
 express rules with multiple output files using pattern rules
@@ -11693,6 +12160,45 @@ a debugger.
 @end itemize
 
 
address@hidden Reporting Bugs
address@hidden Reporting Bugs
+
+Most nontrivial software has bugs.  Automake is no exception.  Although
+we cannot promise we can or will fix a bug, and we might not even agree
+that it is a bug, we want to hear about problems you encounter. Often we
+agree they are bugs and want to fix them.
+
+To make it possible for us to fix a bug, please report it. In order to
+do so effectively, it helps to know when and how to do it.
+
+Before reporting a bug, it is a good idea to see if it is already known.
+You can look at the @uref{http://debbugs.gnu.org/, GNU Bug Tracker}
+and the @uref{http://lists.gnu.org/@/archive/@/html/@/bug-automake/,
+bug-automake mailing list archives} for previous bug reports.  We
+previously used a
address@hidden://sourceware.org/@/cgi-bin/@/gnatsweb.pl?database=automake,
+Gnats database} for bug tracking, so some bugs might have been reported
+there already.  Please do not use it for new bug reports, however.
+
+If the bug is not already known, it should be reported.  It is very
+important to report bugs in a way that is useful and efficient.  For
+this, please familiarize yourself with
address@hidden://www.chiark.greenend.org.uk/@/~sgtatham/@/bugs.html, How to
+Report Bugs Effectively} and
address@hidden://catb.org/@/~esr/@/faqs/@/smart-questions.html, How to Ask
+Questions the Smart Way}.  This helps you and developers to save time
+which can then be spent on fixing more bugs and implementing more
+features.
+
+For a bug report, a feature request or other suggestions, please send
+email to @address@hidden  This will then open a new
+bug in the @uref{http://debbugs.gnu.org/@/automake, bug tracker}.  Be
+sure to include the versions of Autoconf and Automake that you use.
+Ideally, post a minimal @file{Makefile.am} and @file{configure.ac} that
+reproduces the problem you encounter.  If you have encountered test
+suite failures, please attach the @file{tests/test-suite.log} file.
+
+
 @node History
 @chapter History of Automake
 
@@ -12468,7 +12974,7 @@ for dependency tracking work in Automake.
 * First Take on Dependencies::  Precomputed dependency tracking
 * Dependencies As Side Effects::  Update at developer compile time
 * Dependencies for the User::   Update at user compile time
-* Techniques for Dependencies:: Alternative approaches
+* Techniques for Dependencies::  Alternative approaches
 * Recommendations for Tool Writers::  What tool writers can do to help
 * Future Directions for Dependencies::  Languages Automake does not know
 @end menu
@@ -12867,8 +13373,6 @@ parentheses is the number of generated test cases.
 @printindex cp
 
 
address@hidden
address@hidden
 @bye
 
 @c  LocalWords:  texinfo setfilename settitle setchapternewpage texi direntry
diff --git a/lib/.cvsignore b/lib/.cvsignore
deleted file mode 100644
index f3c7a7c..0000000
--- a/lib/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/lib/Automake/.cvsignore b/lib/Automake/.cvsignore
deleted file mode 100644
index bbad8cb..0000000
--- a/lib/Automake/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Config.pm
diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm
index eb208c3..aaca979 100644
--- a/lib/Automake/ChannelDefs.pm
+++ b/lib/Automake/ChannelDefs.pm
@@ -80,7 +80,7 @@ Fatal errors.  Use C<&fatal> to send messages over this 
channel.
 
 =item C<error>
 
-Common errors.   Use C<&error> to send messages over this channel.
+Common errors.  Use C<&error> to send messages over this channel.
 
 =item C<error-gnu>
 
diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm
index b4908c0..9a2732c 100644
--- a/lib/Automake/Channels.pm
+++ b/lib/Automake/Channels.pm
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to address@hidden         #
 ###############################################################
 
@@ -500,7 +500,7 @@ sub _print_message ($$%)
   my $msg = _format_message ($location, $message, %opts);
   if ($opts{'partial'})
     {
-      # Incomplete message.   Store, don't print.
+      # Incomplete message.  Store, don't print.
       $partial .= $msg;
       return;
     }
diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in
index 7e87044..b6674dc 100644
--- a/lib/Automake/Config.in
+++ b/lib/Automake/Config.in
@@ -34,7 +34,7 @@ our $VERSION = '@VERSION@';
 our $libdir = '@datadir@/@address@hidden@APIVERSION@';
 our $perl_threads = @PERL_THREADS@;
 
-1;;
+1;
 
 ### Setup "GNU" style for perl-mode and cperl-mode.
 ## Local Variables:
diff --git a/lib/Automake/Configure_ac.pm b/lib/Automake/Configure_ac.pm
index 646fad3..e2bebef 100644
--- a/lib/Automake/Configure_ac.pm
+++ b/lib/Automake/Configure_ac.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2006, 2010 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to address@hidden         #
 ###############################################################
 
diff --git a/lib/Automake/FileUtils.pm b/lib/Automake/FileUtils.pm
index e39750d..ba7afc0 100644
--- a/lib/Automake/FileUtils.pm
+++ b/lib/Automake/FileUtils.pm
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to address@hidden         #
 ###############################################################
 
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index e068ab8..baccf7d 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -181,6 +181,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -548,10 +551,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 9543aa5..b7ff3d1 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -252,6 +252,10 @@ sub _process_option_list (\%$@)
        }
       elsif (/^(.*\/)?ansi2knr$/)
        {
+          # This feature is deprecated, will be removed in the next
+          # Automake major release.
+          msg 'obsolete', $where,
+              "automatic de-ANSI-fication support is deprecated\n";
          # An option like "../lib/ansi2knr" is allowed.  With no
          # path prefix, we assume the required programs are in this
          # directory.  We save the actual option for later.
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index 68b3ea5..3184b24 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -1,4 +1,5 @@
-# Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2010, 2011 Free Software
+# Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -126,7 +127,7 @@ use vars '%actions';
 
 =item <$suffix_rules>
 
-This maps the source extension for all suffix rule seen to
+This maps the source extension for all suffix rules seen to
 a C<hash> whose keys are the possible output extensions.
 
 Note that this is transitively closed by construction:
@@ -258,7 +259,7 @@ sub reject_rule ($$)
 =item C<accept_extensions (@exts)>
 
 Update C<$KNOWN_EXTENSIONS_PATTERN> to recognize the extensions
-listed C<@exts>.  Extensions should contain a dot if needed.
+listed in C<@exts>.  Extensions should contain a dot if needed.
 
 =cut
 
@@ -306,7 +307,7 @@ sub register_action ($$)
 
 =item C<Automake::Rule::reset>
 
-The I<forget all> function.  Clears all know rules and reset some
+The I<forget all> function.  Clears all known rules and resets some
 other internal data.
 
 =cut
@@ -374,7 +375,7 @@ sub reset()
      # Tarballing.
      'dist-all'             => [],
 
-     # Phoning.
+     # Phonying.
      '.PHONY'               => [],
      # Recursive install targets (so `make -n install' works for BSD Make).
      '.MAKE'               => [],
@@ -384,7 +385,7 @@ sub reset()
 
 =item C<register_suffix_rule ($where, $src, $dest)>
 
-Register a suffix rules defined on C<$where> that transform
+Register a suffix rule defined on C<$where> that transforms
 files ending in C<$src> into files ending in C<$dest>.
 
 This upgrades the C<$suffix_rules> variables.
@@ -406,11 +407,11 @@ sub register_suffix_rule ($$$)
   # CANNOT rewrite the target (i.e., automagically replace `.o'
   # and `.obj' by `.$(OBJEXT)' in the output), or warn the user
   # that (s)he'd better use `.$(OBJEXT)', because Automake itself
-  # output suffix rules for `.o' or `.obj'...
+  # output suffix rules for `.o' or `.obj' ...
   $dest = '.$(OBJEXT)' if ($dest eq '.o' || $dest eq '.obj');
 
   # Reading the comments near the declaration of $suffix_rules might
-  # help to understand the update of $suffix_rules that follows...
+  # help to understand the update of $suffix_rules that follows ...
 
   # Register $dest as a possible destination from $src.
   # We might have the create the \hash.
@@ -488,7 +489,7 @@ sub suffixes ()
 =item C<rule ($rulename)>
 
 Return the C<Automake::Rule> object for the rule
-named C<$rulename> if defined.   Return 0 otherwise.
+named C<$rulename> if defined.  Return 0 otherwise.
 
 =cut
 
@@ -788,7 +789,7 @@ sub define ($$$$$)
     }
 
   # We honor inference rules with multiple targets because many
-  # make support this and people use it.  However this is disallowed
+  # makes support this and people use it.  However this is disallowed
   # by POSIX.  We'll print a warning later.
   my $target_count = 0;
   my $inference_rule_count = 0;
diff --git a/lib/Automake/Struct.pm b/lib/Automake/Struct.pm
index 9745779..ae42db2 100644
--- a/lib/Automake/Struct.pm
+++ b/lib/Automake/Struct.pm
@@ -1,5 +1,5 @@
 # autoconf -- create `configure' using m4 macros
-# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2006, 2010 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 # we would have two packages defining the same symbols.  Boom.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to address@hidden         #
 ###############################################################
 
diff --git a/lib/Automake/VarDef.pm b/lib/Automake/VarDef.pm
index d7ba155..568c82a 100644
--- a/lib/Automake/VarDef.pm
+++ b/lib/Automake/VarDef.pm
@@ -185,17 +185,8 @@ sub append ($$$)
   # Furthermore keeping `#' would not be portable if the variable is
   # output on multiple lines.
   $val =~ s/ ?#.*//;
-
-  if (chomp $val)
-    {
-      # Insert a backslash before a trailing newline.
-      $val .= "\\\n";
-    }
-  elsif ($val)
-    {
-      # Insert a separator.
-      $val .= ' ';
-    }
+  # Insert a separator, if required.
+  $val .= ' ' if $val;
   $self->{'value'} = $val . $value;
   # Turn ASIS appended variables into PRETTY variables.  This is to
   # cope with `make' implementation that cannot read very long lines.
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 3261360..686847d 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -162,7 +162,7 @@ my %_am_macro_for_var =
    EMACS => 'AM_PATH_LISPDIR',
    GCJ => 'AM_PROG_GCJ',
    LEX => 'AM_PROG_LEX',
-   LIBTOOL => 'AC_PROG_LIBTOOL',
+   LIBTOOL => 'LT_INIT',
    lispdir => 'AM_PATH_LISPDIR',
    pkgpyexecdir => 'AM_PATH_PYTHON',
    pkgpythondir => 'AM_PATH_PYTHON',
@@ -354,7 +354,7 @@ sub reset ()
 =item C<var ($varname)>
 
 Return the C<Automake::Variable> object for the variable
-named C<$varname> if defined.   Return 0 otherwise.
+named C<$varname> if defined.  Return 0 otherwise.
 
 =cut
 
diff --git a/lib/Automake/Version.pm b/lib/Automake/Version.pm
index 8b2a7bc..347f8f6 100644
--- a/lib/Automake/Version.pm
+++ b/lib/Automake/Version.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ C<MICRO> are digits, C<ALPHA> is a character, and C<FORK> any
 alphanumeric word.
 
 Usually, C<ALPHA> is used to label alpha releases or intermediate
-snapshots, C<FORK> is used for CVS branches or patched releases, and
+snapshots, C<FORK> is used for git branches or patched releases, and
 C<MICRO> is used for bug fixes releases on the C<MAJOR.MINOR> branch.
 
 For the purpose of ordering, C<1.4> is the same as C<1.4.0>, but
diff --git a/lib/Automake/XFile.pm b/lib/Automake/XFile.pm
index 7c8f5eb..46483e6 100644
--- a/lib/Automake/XFile.pm
+++ b/lib/Automake/XFile.pm
@@ -17,7 +17,7 @@
 # Written by Akim Demaille <address@hidden>.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to address@hidden         #
 ###############################################################
 
diff --git a/lib/Automake/tests/.cvsignore b/lib/Automake/tests/.cvsignore
deleted file mode 100644
index f3c7a7c..0000000
--- a/lib/Automake/tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 1401eb9..17a2002 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,18 +105,24 @@ am__base_list = \
 am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
 am__rst_section = sed 'p;s/./=/g;p;g'
 # Put stdin (possibly several lines separated by ".  ") in a box.
-am__text_box = $(AWK) '{                               \
-  n = split($$0, lines, "\\.  "); max = 0;             \
-  for (i = 1; i <= n; ++i)                             \
-    if (max < length(lines[i]))                                \
-      max = length(lines[i]);                          \
-  for (i = 0; i < max; ++i) line = line "=";           \
-  print line;                                          \
-  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
-  print line;                                          \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{                       \
+  n = split($$0, lines, "\\.  "); max = 0;     \
+  for (i = 1; i <= n; ++i)                     \
+    if (max < length(lines[i]))                        \
+      max = length(lines[i]);                  \
+  for (i = 0; i < max; ++i)                    \
+    line = line "=";                           \
+  print col line std;                          \
+  for (i = 1; i <= n; ++i)                     \
+    if (lines[i])                              \
+      print col lines[i] std;                  \
+  print col line std;                          \
 }'
 # Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
 # by disabling -e (using the XSI extension "set +e") if it's set.
 am__sh_e_setup = case $$- in *e*) set +e;; esac
 # To be inserted before the command running the test.  Creates the
@@ -139,6 +145,35 @@ elif test -f "$$f"; then dir=;                             
\
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
+# To be appended to the command running the test.  Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>address@hidden 2>&1;                                          \
+estatus=$$?;                                           \
+if test -n '$(DISABLE_HARD_ERRORS)'                    \
+   && test $$estatus -eq 99; then                      \
+  estatus=1;                                           \
+fi;                                                    \
+TERM=$$__SAVED_TERM; export TERM;                      \
+$(am__tty_colors);                                     \
+xfailed=PASS;                                          \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    xfailed=XFAIL;;                                    \
+esac;                                                  \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
+esac;                                                  \
+echo "$${col}$$res$${std}: $$f";                       \
+echo "$$res: $$f (exit: $$estatus)" |                  \
+  $(am__rst_section) >$@;                              \
+cat address@hidden >>$@;                                               \
+rm -f address@hidden
 RECHECK_LOGS = $(TEST_LOGS)
 AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 TEST_SUITE_LOG = test-suite.log
@@ -197,6 +232,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -291,41 +329,12 @@ ctags: CTAGS
 CTAGS:
 
 
-# To be appended to the command running the test.  Handle the stdout
-# and stderr redirection, and catch the exit status.
-am__check_post =                                       \
->address@hidden 2>&1;                                          \
-estatus=$$?;                                           \
-if test -n '$(DISABLE_HARD_ERRORS)'                    \
-   && test $$estatus -eq 99; then                      \
-  estatus=1;                                           \
-fi;                                                    \
-TERM=$$__SAVED_TERM; export TERM;                      \
-$(am__tty_colors);                                     \
-xfailed=PASS;                                          \
-case " $(XFAIL_TESTS) " in                             \
-  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
-    xfailed=XFAIL;;                                    \
-esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
-esac;                                                  \
-echo "$${col}$$res$${std}: $$f";                       \
-echo "$$res: $$f (exit: $$estatus)" |                  \
-  $(am__rst_section) >$@;                              \
-cat address@hidden >>$@;                                               \
-rm -f address@hidden
-
 $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__sh_e_setup);                                             \
        list='$(TEST_LOGS)';                                            \
        results=`for f in $$list; do                                    \
-                  read line < $$f && echo "$$line" || echo FAIL;       \
+                  test -r $$f && read line < $$f && echo "$$line"      \
+                    || echo FAIL;                                      \
                 done`;                                                 \
        all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[      
]*//'`; \
        fail=`echo "$$results" | grep -c '^FAIL'`;                      \
@@ -374,7 +383,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
          for f in $$list; do                                           \
-           read line < $$f;                                            \
+           test -r $$f && read line < $$f || line=;                    \
            case $$line in                                              \
              PASS:*|XFAIL:*);;                                         \
              *) echo; cat $$f;;                                        \
@@ -391,13 +400,12 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
        $(am__tty_colors);                                              \
        if $$exit; then                                                 \
-         echo $(ECHO_N) "$$grn$(ECHO_C)";                              \
+         col="$$grn";                                                  \
         else                                                           \
-         echo $(ECHO_N) "$$red$(ECHO_C)";                              \
+         col="$$red";                                                  \
        fi;                                                             \
-       echo "$$msg" | $(am__text_box);                                 \
-       echo $(ECHO_N) "$$std$(ECHO_C)";                                \
-       $$exit
+       echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";         \
+       $$exit || exit 1
 
 # Run all the tests.
 check-TESTS:
@@ -438,10 +446,11 @@ recheck recheck-html:
        list='$(TEST_LOGS)';                                            \
        list=`for f in $$list; do                                       \
                test -f $$f || continue;                                \
-               if read line < $$f; then                                \
+               if test -r $$f && read line < $$f; then                 \
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) 
TEST_LOGS="'"$$list"'"'
 .pl.log:
        @p='$<'; $(am__check_pre) $(PL_LOG_COMPILE) "$$tst" $(am__check_post)
@@ -491,10 +500,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
        -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
        -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
diff --git a/lib/INSTALL b/lib/INSTALL
index 81fd332..a1e89e1 100644
--- a/lib/INSTALL
+++ b/lib/INSTALL
@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
 
    Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -226,6 +226,11 @@ order to use an ANSI C compiler:
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
    On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
 parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
 a workaround.  If GNU CC is not installed, it is therefore recommended
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 9307cab..3b05946 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -184,6 +184,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -520,10 +523,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/lib/am/.cvsignore b/lib/am/.cvsignore
deleted file mode 100644
index f3c7a7c..0000000
--- a/lib/am/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 8924d17..649c1bf 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,6 +141,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -333,10 +336,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/lib/am/check.am b/lib/am/check.am
index 755bf13..3d0188d 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010 Free Software
-## Foundation, Inc.
+## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free
+## Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -75,19 +75,25 @@ am__rst_title   = sed 's/.*/   &   
/;h;s/./=/g;p;x;p;g;p;s/.*//'
 am__rst_section = sed 'p;s/./=/g;p;g'
 
 # Put stdin (possibly several lines separated by ".  ") in a box.
-am__text_box = $(AWK) '{                               \
-  n = split($$0, lines, "\\.  "); max = 0;             \
-  for (i = 1; i <= n; ++i)                             \
-    if (max < length(lines[i]))                                \
-      max = length(lines[i]);                          \
-  for (i = 0; i < max; ++i) line = line "=";           \
-  print line;                                          \
-  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
-  print line;                                          \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{                       \
+  n = split($$0, lines, "\\.  "); max = 0;     \
+  for (i = 1; i <= n; ++i)                     \
+    if (max < length(lines[i]))                        \
+      max = length(lines[i]);                  \
+  for (i = 0; i < max; ++i)                    \
+    line = line "=";                           \
+  print col line std;                          \
+  for (i = 1; i <= n; ++i)                     \
+    if (lines[i])                              \
+      print col lines[i] std;                  \
+  print col line std;                          \
 }'
 
 # Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
 # by disabling -e (using the XSI extension "set +e") if it's set.
 am__sh_e_setup = case $$- in *e*) set +e;; esac
 
@@ -128,13 +134,13 @@ case " $(XFAIL_TESTS) " in                                
\
   *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
     xfailed=XFAIL;;                                    \
 esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
 esac;                                                  \
 echo "$${col}$$res$${std}: $$f";                       \
 echo "$$res: $$f (exit: $$estatus)" |                  \
@@ -146,7 +152,8 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__sh_e_setup);                                             \
        list='$(TEST_LOGS)';                                            \
        results=`for f in $$list; do                                    \
-                  read line < $$f && echo "$$line" || echo FAIL;       \
+                  test -r $$f && read line < $$f && echo "$$line"      \
+                    || echo FAIL;                                      \
                 done`;                                                 \
        all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[      
]*//'`; \
        fail=`echo "$$results" | grep -c '^FAIL'`;                      \
@@ -195,7 +202,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
          for f in $$list; do                                           \
-           read line < $$f;                                            \
+           test -r $$f && read line < $$f || line=;                    \
            case $$line in                                              \
              PASS:*|XFAIL:*);;                                         \
              *) echo; cat $$f;;                                        \
@@ -212,13 +219,17 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
        $(am__tty_colors);                                              \
        if $$exit; then                                                 \
-         echo $(ECHO_N) "$$grn$(ECHO_C)";                              \
+         col="$$grn";                                                  \
         else                                                           \
-         echo $(ECHO_N) "$$red$(ECHO_C)";                              \
+         col="$$red";                                                  \
        fi;                                                             \
-       echo "$$msg" | $(am__text_box);                                 \
-       echo $(ECHO_N) "$$std$(ECHO_C)";                                \
-       $$exit
+       echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";         \
+## The use of "exit 1" below is required to work around a FreeBSD make bug
+## (present only when running in concurrent mode).  See automake bug#9245:
+##  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
+## and FreeBSD PR bin/159730:
+##  <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>.
+       $$exit || exit 1
 
 RECHECK_LOGS = $(TEST_LOGS)
 
@@ -234,6 +245,10 @@ check-TESTS:
 ## OTOH, this means that, in the rule for `$(TEST_SUITE_LOG)', we
 ## cannot use `$?' to compute the set of lazily rerun tests, lest
 ## we rely on .PHONY to work portably.
+##
+## Trailing whitespace in `TESTS = foo.test $(empty)' causes GNU make
+## 3.80 to erroneously expand $(TESTS_LOGS) to `foo.log .log'.
+## Work around this bug.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
        @list='$(TEST_LOGS)';                                           \
        list=`for f in $$list; do                                       \
@@ -287,10 +302,13 @@ recheck recheck-html:
        list='$(TEST_LOGS)';                                            \
        list=`for f in $$list; do                                       \
                test -f $$f || continue;                                \
-               if read line < $$f; then                                \
+               if test -r $$f && read line < $$f; then                 \
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+## This apparently useless munging helps to avoid a nasty bug (a
+## segmentation fault!) on Solaris XPG4 make.
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) 
TEST_LOGS="'"$$list"'"'
 
 .PHONY: recheck recheck-html
@@ -390,14 +408,17 @@ check-TESTS: $(TESTS)
          fi; \
          dashes=`echo "$$dashes" | sed s/./=/g`; \
          if test "$$failed" -eq 0; then \
-           echo "$$grn$$dashes"; \
+           col="$$grn"; \
          else \
-           echo "$$red$$dashes"; \
+           col="$$red"; \
          fi; \
-         echo "$$banner"; \
-         test -z "$$skipped" || echo "$$skipped"; \
-         test -z "$$report" || echo "$$report"; \
-         echo "$$dashes$$std"; \
+## Multi line coloring is problematic with "less -R", so we really need
+## to color each line individually.
+         echo "$${col}$$dashes$${std}"; \
+         echo "$${col}$$banner$${std}"; \
+         test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+         test -z "$$report" || echo "$${col}$$report$${std}"; \
+         echo "$${col}$$dashes$${std}"; \
          test "$$failed" -eq 0; \
        else :; fi
 
diff --git a/lib/am/configure.am b/lib/am/configure.am
index e9299d6..594ec67 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -17,12 +17,13 @@
 
 
 ## This dummy rule is called from subdirectories whenever one of the
-## top-level Makefile's dependencies must be updated.  It does not
-## need to depend on %MAKEFILE% because GNU make will always make sure
-## %MAKEFILE% is updated before considering the am--refresh target.
+## top-level Makefile's dependencies must be updated.  It does depend
+## on %MAKEFILE% for the benefit of non-GNU make implementations (GNU
+## make will always make sure %MAKEFILE% is updated before considering
+## the am--refresh target anyway).
 if %?TOPDIR_P%
 .PHONY: am--refresh
-am--refresh:
+am--refresh: %MAKEFILE%
        @:
 endif %?TOPDIR_P%
 
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index d88656c..c2dd7c5 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -140,7 +140,7 @@ endif %?TOPDIR_P%
 ## we are not stripping a legitimate filename that starts with the
 ## same pattern as $(srcdir)?
 ## Well, it can't happen without the Makefile author distributing
-## something out of the distribution (which is bad).   As an example,
+## something out of the distribution (which is bad).  As an example,
 ## consider `EXTRA_DIST = ../bar'.  This is an issue if $srcdir is `..',
 ## however getting this value for srcdir is impossible: `EXTRA_DIST = ../bar'
 ## implies we are in a subdirectory (so `../bar' is within the package),
@@ -468,7 +468,9 @@ distcheck: dist
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 ?GETTEXT?          --with-included-gettext \
 ## Additional flags for configure.  Keep this last in the configure
-## invocation so the user can override previous options.
+## invocation so the developer and user can override previous options,
+## and let the user's flags take precedence over the developer's ones.
+           $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
diff --git a/lib/am/install.am b/lib/am/install.am
index d261070..01ae49a 100644
--- a/lib/am/install.am
+++ b/lib/am/install.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009  Free Software
+## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 Free Software
 ## Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -90,9 +90,17 @@ install-strip:
 ## It's OK to override both with INSTALL_STRIP_PROGRAM, because
 ## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale).
 ##
-## Use double quotes here because we might need to interpolate some
-## backquotes at runtime.
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+## Use double quotes for the *_PROGRAM settings because we might need to
+## interpolate some backquotes at runtime.
+##
+## The case for empty $(STRIP) is separate so that it is quoted correctly for
+## multiple words, but does not expand to an empty words if STRIP is empty.
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
diff --git a/lib/am/java.am b/lib/am/java.am
index d6eb455..604df22 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -21,7 +21,7 @@
 ## ---------- ##
 
 JAVAC = javac
-CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
+CLASSPATH_ENV = 
CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT)$${CLASSPATH:+":$$CLASSPATH"}
 JAVAROOT = $(top_builddir)
 
 class%DIR%.stamp: $(%DIR%_JAVA)
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 3449d18..ab45b30 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-## 2007, 2008, 2009 Free Software Foundation, Inc.
+## 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -49,7 +49,16 @@ $(am__ELCFILES): elc-stamp
 ##
 ## Do not call `make elc-stamp' if emacs is not available, because it would
 ## be useless.
-       @if test "$(EMACS)" != no && test ! -f $@; then \
+##
+## If `make -n' is called, do not execute any command in the recipe that
+## changes the tree; however, invoke the recursive make for debuggability.
+       @dry=; for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=*|--*);; \
+           *n*) dry=:;; \
+         esac; \
+       done; \
+       if test "$(EMACS)" != no && test ! -f $@; then \
 ## If `make -j' is used and more than one file has been erased, several
 ## processes can execute this block.  We have to make sure that only
 ## the first one will run `$(MAKE) $(AM_MAKEFLAGS) elc-stamp', and the
@@ -58,18 +67,18 @@ $(am__ELCFILES): elc-stamp
 ## There is a race here if only one child of make receive a signal.
 ## In that case the build may fail.  We remove elc-stamp when we receive
 ## a signal so we are sure the build will succeed the next time.
-         trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
-         if mkdir elc-lock 2>/dev/null; then \
+         $$dry trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
+         if $$dry mkdir elc-lock 2>/dev/null; then \
 ## This code is being executed by the first process.
-           rm -f elc-stamp; \
+           $$dry rm -f elc-stamp; \
            $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
-           rmdir elc-lock; \
+           $$dry rmdir elc-lock; \
          else \
 ## This code is being executed by the follower processes.
 ## Wait until the first process is done.
-           while test -d elc-lock; do sleep 1; done; \
+           while test -d elc-lock && test -z "$$dry"; do sleep 1; done; \
 ## Succeed if and only if the first process succeeded.
-           test -f elc-stamp; exit $$?; \
+           $$dry test -f elc-stamp; exit $$?; \
          fi; \
        else : ; fi
 
diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am
index 5077be2..35f4a46 100644
--- a/lib/am/remake-hdr.am
+++ b/lib/am/remake-hdr.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2005,
-## 2008, 2009 Free Software Foundation, Inc.
+## 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -20,10 +20,8 @@
 
 %CONFIG_H%: %STAMP%
 ## Recover from removal of CONFIG_HEADER
-       @if test ! -f $@; then \
-         rm -f %STAMP%; \
-         $(MAKE) $(AM_MAKEFLAGS) %STAMP%; \
-       else :; fi
+       @if test ! -f $@; then rm -f %STAMP%; else :; fi
+       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) %STAMP%; else :; fi
 
 
 %STAMP%: %CONFIG_H_DEPS% $(top_builddir)/config.status
diff --git a/lib/config-ml.in b/lib/config-ml.in
index f2497ad..1198346 100644
--- a/lib/config-ml.in
+++ b/lib/config-ml.in
@@ -2,7 +2,7 @@
 # wanting multilib support.
 #
 # Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2010, 2011  Free Software Foundation, Inc.
 #
 # 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
@@ -224,19 +224,6 @@ done
 # $host here, not $target.
 
 case "${host}" in
-arc-*-elf*)
-       if [ x$enable_biendian != xyes ]
-       then
-         old_multidirs=${multidirs}
-         multidirs=""
-         for x in ${old_multidirs}; do
-           case "${x}" in
-             *be*) : ;;
-             *) multidirs="${multidirs} ${x}" ;;
-           esac
-         done
-       fi
-       ;;
 arm-*-*)
        if [ x"$enable_fpu" = xno ]
        then
@@ -517,6 +504,7 @@ multi-do:
                                prefix="$(prefix)" \
                                exec_prefix="$(exec_prefix)" \
                                GCJFLAGS="$(GCJFLAGS) $${flags}" \
+                               GOCFLAGS="$(GOCFLAGS) $${flags}" \
                                CXXFLAGS="$(CXXFLAGS) $${flags}" \
                                LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
                                LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
@@ -750,7 +738,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
         break
       fi
     done
-    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" 
GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
+    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" 
GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags" GOC="${GOC_}$flags"'
 
     if [ "${with_target_subdir}" = "." ]; then
        CC_=$CC' '
@@ -758,6 +746,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
        F77_=$F77' '
        GCJ_=$GCJ' '
        GFORTRAN_=$GFORTRAN' '
+       GOC_=$GOC' '
     else
        # Create a regular expression that matches any string as long
        # as ML_POPDIR.
@@ -822,6 +811,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; 
then
          esac
        done
 
+       GOC_=
+       for arg in ${GOC}; do
+         case $arg in
+         -[BIL]"${ML_POPDIR}"/*)
+           GOC_="${GOC_}"`echo "X${arg}" | sed -n 
"s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n 
"s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+         "${ML_POPDIR}"/*)
+           GOC_="${GOC_}"`echo "X${arg}" | sed -n 
"s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n 
"s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+         *)
+           GOC_="${GOC_}${arg} " ;;
+         esac
+       done
+
        if test "x${LD_LIBRARY_PATH+set}" = xset; then
          LD_LIBRARY_PATH_=
          for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
diff --git a/lib/config.guess b/lib/config.guess
index c2246a4..b02565c 100755
--- a/lib/config.guess
+++ b/lib/config.guess
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2011-06-03'
 
 # 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
@@ -57,7 +57,7 @@ GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
 Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -181,7 +181,7 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                fi
                ;;
            *)
-               os=netbsd
+               os=netbsd
                ;;
        esac
        # The OS release
@@ -224,7 +224,7 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
                ;;
        *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
                ;;
        esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +270,10 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # 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 ;;
+       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+       exitcode=$?
+       trap '' 0
+       exit $exitcode ;;
     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
@@ -296,7 +299,7 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo s390-ibm-zvmoe
        exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+       echo powerpc-ibm-os400
        exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
@@ -395,23 +398,23 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # 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}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+       exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-milan-mint${UNAME_RELEASE}
+       exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-hades-mint${UNAME_RELEASE}
+       exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-unknown-mint${UNAME_RELEASE}
+       exit ;;
     m68k:machten:*:*)
        echo m68k-apple-machten${UNAME_RELEASE}
        exit ;;
@@ -481,8 +484,8 @@ EOF
        echo m88k-motorola-sysv3
        exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       # 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 ] || \
@@ -495,7 +498,7 @@ EOF
        else
            echo i586-dg-dgux${UNAME_RELEASE}
        fi
-       exit ;;
+       exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
        exit ;;
@@ -552,7 +555,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        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
@@ -595,52 +598,52 @@ EOF
            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" ;;
+                   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
+                       esac ;;
+                   esac
                fi
                if [ "${HP_ARCH}" = "" ]; then
                    eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
+                   sed 's/^            //' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+               #define _HPUX_SOURCE
+               #include <stdlib.h>
+               #include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+               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);
-              }
+                   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
@@ -731,22 +734,22 @@ EOF
        exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
-        exit ;;
+       exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-        exit ;;
+       exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
        echo c34-convex-bsd
-        exit ;;
+       exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
        echo c38-convex-bsd
-        exit ;;
+       exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
        echo c4-convex-bsd
-        exit ;;
+       exit ;;
     CRAY*Y-MP:*:*:*)
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
@@ -770,14 +773,14 @@ EOF
        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 ;;
+       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}"
+       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}
@@ -805,14 +808,14 @@ EOF
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
     i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
        exit ;;
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
     *:Interix*:*)
-       case ${UNAME_MACHINE} in
+       case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
@@ -867,7 +870,7 @@ EOF
          EV6)   UNAME_MACHINE=alphaev6 ;;
          EV67)  UNAME_MACHINE=alphaev67 ;;
          EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+       esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -879,7 +882,13 @@ EOF
        then
            echo ${UNAME_MACHINE}-unknown-linux-gnu
        else
-           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+               | grep -q __ARM_PCS_VFP
+           then
+               echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+           else
+               echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+           fi
        fi
        exit ;;
     avr32*:Linux:*:*)
@@ -892,7 +901,7 @@ EOF
        echo crisv32-axis-linux-gnu
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
+       echo frv-unknown-linux-gnu
        exit ;;
     i*86:Linux:*:*)
        LIBC=gnu
@@ -960,7 +969,7 @@ EOF
        echo ${UNAME_MACHINE}-ibm-linux
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     sh*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -968,6 +977,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
@@ -975,7 +987,7 @@ EOF
        echo x86_64-unknown-linux-gnu
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +996,11 @@ EOF
        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,
+       # 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.
+       # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
        exit ;;
     i*86:OS/2:*:*)
@@ -1020,7 +1032,7 @@ EOF
        fi
        exit ;;
     i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
        case `/bin/uname -X | grep "^Machine"` in
            *486*)           UNAME_MACHINE=i486 ;;
            *Pentium)        UNAME_MACHINE=i586 ;;
@@ -1048,13 +1060,13 @@ EOF
        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 i586.
+       # uname -m prints for DJGPP always 'pc', but it prints nothing about
+       # the processor, so we play safe by assuming i586.
        # Note: whatever this is, it MUST be the same as what config.sub
        # prints for the "djgpp" host, or else GDB configury will decide that
        # this is a cross-build.
        echo i586-pc-msdosdjgpp
-        exit ;;
+       exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
        exit ;;
@@ -1089,8 +1101,8 @@ EOF
        /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; } ;;
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
        OS_REL='.3'
        test -r /etc/.relid \
@@ -1133,10 +1145,10 @@ EOF
                echo ns32k-sni-sysv
        fi
        exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <address@hidden>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <address@hidden>
+       echo i586-unisys-sysv4
+       exit ;;
     *:UNIX_System_V:4*:FTX*)
        # From Gerald Hewes <address@hidden>.
        # How about differentiating between stratus architectures? -djm
@@ -1162,11 +1174,11 @@ EOF
        exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
+               echo mips-nec-sysv${UNAME_RELEASE}
        else
-               echo mips-unknown-sysv${UNAME_RELEASE}
+               echo mips-unknown-sysv${UNAME_RELEASE}
        fi
-        exit ;;
+       exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
        exit ;;
@@ -1231,6 +1243,9 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk${UNAME_RELEASE}
+       exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
@@ -1276,13 +1291,13 @@ EOF
        echo pdp10-unknown-its
        exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+       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`
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
        case "${UNAME_MACHINE}" in
            A*) echo alpha-dec-vms ; exit ;;
            I*) echo ia64-dec-vms ; exit ;;
@@ -1322,11 +1337,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+       "4"
 #else
-         ""
+       ""
 #endif
-         ); exit (0);
+       ); exit (0);
 #endif
 #endif
 
diff --git a/lib/config.sub b/lib/config.sub
index 8518609..f9fcdc8 100755
--- a/lib/config.sub
+++ b/lib/config.sub
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
-timestamp='2009-12-31'
+timestamp='2011-06-03'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -76,7 +76,7 @@ version="\
 GNU config.sub ($timestamp)
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
 Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -124,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | 
netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -157,8 +158,8 @@ case $os in
                os=
                basic_machine=$1
                ;;
-        -bluegene*)
-               os=-cnk
+       -bluegene*)
+               os=-cnk
                ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
@@ -174,10 +175,10 @@ case $os in
                os=-chorusos
                basic_machine=$1
                ;;
-       -chorusrdb)
-               os=-chorusrdb
+       -chorusrdb)
+               os=-chorusrdb
                basic_machine=$1
-               ;;
+               ;;
        -hiux*)
                os=-hiuxwe2
                ;;
@@ -282,11 +283,13 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
+       | open8 \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
        | rx \
        | score \
@@ -294,15 +297,24 @@ case $basic_machine in
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | 
sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | spu \
+       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
-       | v850 | v850e \
+       | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
        | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
@@ -314,6 +326,18 @@ case $basic_machine in
                basic_machine=mt-unknown
                ;;
 
+       strongarm | thumb | xscale)
+               basic_machine=arm-unknown
+               ;;
+
+       xscaleeb)
+               basic_machine=armeb-unknown
+               ;;
+
+       xscaleel)
+               basic_machine=armel-unknown
+               ;;
+
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
@@ -334,7 +358,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -368,25 +392,29 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
+       | open8-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
        | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* 
| sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | 
sparclet-* \
        | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* 
| sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | tahoe-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile*-* \
        | tron-* \
        | ubicom32-* \
-       | v850-* | v850e-* | vax-* \
+       | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+       | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
        | z8k-* | z80-*)
@@ -411,7 +439,7 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
-       abacus)
+       abacus)
                basic_machine=abacus-unknown
                ;;
        adobe68k)
@@ -481,11 +509,20 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
-        cegcc)
+       cegcc)
                basic_machine=arm-unknown
                os=-cegcc
                ;;
@@ -517,7 +554,7 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16)
+       cr16 | cr16-*)
                basic_machine=cr16-unknown
                os=-elf
                ;;
@@ -733,7 +770,7 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
-        microblaze)
+       microblaze)
                basic_machine=microblaze-xilinx
                ;;
        mingw32)
@@ -840,6 +877,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+       neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+       nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -922,9 +965,10 @@ case $basic_machine in
                ;;
        power)  basic_machine=power-ibm
                ;;
-       ppc)    basic_machine=powerpc-unknown
+       ppc | ppcbe)    basic_machine=powerpc-unknown
                ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+       ppc-* | ppcbe-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        ppcle | powerpclittle | ppc-le | powerpc-little)
                basic_machine=powerpcle-unknown
@@ -1018,6 +1062,9 @@ case $basic_machine in
                basic_machine=i860-stratus
                os=-sysv4
                ;;
+       strongarm-* | thumb-*)
+               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        sun2)
                basic_machine=m68000-sun
                ;;
@@ -1074,20 +1121,8 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
        tile*)
-               basic_machine=tile-unknown
+               basic_machine=$basic_machine-unknown
                os=-linux-gnu
                ;;
        tx39)
@@ -1157,6 +1192,9 @@ case $basic_machine in
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
+       xscale-* | xscalee[bl]-*)
+               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+               ;;
        ymp)
                basic_machine=ymp-cray
                os=-unicos
@@ -1254,11 +1292,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+       # First match some system type aliases
+       # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
-        -auroraux)
-               os=-auroraux
+       -auroraux)
+               os=-auroraux
                ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1295,7 +1333,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1342,7 +1381,7 @@ case $os in
        -opened*)
                os=-openedition
                ;;
-        -os400*)
+       -os400*)
                os=-os400
                ;;
        -wince*)
@@ -1391,7 +1430,7 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
-        -tpf*)
+       -tpf*)
                os=-tpf
                ;;
        -triton*)
@@ -1436,8 +1475,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
-        -nacl*)
-               ;;
+       -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1460,10 +1499,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+       score-*)
                os=-elf
                ;;
-        spu-*)
+       spu-*)
                os=-elf
                ;;
        *-acorn)
@@ -1475,8 +1514,17 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
-        c4x-* | tic4x-*)
-               os=-coff
+       c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
                ;;
        # This must come before the *-dec entry.
        pdp10-*)
@@ -1503,7 +1551,7 @@ case $basic_machine in
        m68*-cisco)
                os=-aout
                ;;
-        mep-*)
+       mep-*)
                os=-elf
                ;;
        mips*-cisco)
@@ -1530,7 +1578,7 @@ case $basic_machine in
        *-ibm)
                os=-aix
                ;;
-       *-knuth)
+       *-knuth)
                os=-mmixware
                ;;
        *-wec)
diff --git a/lib/depcomp b/lib/depcomp
index c3163be..9825d56 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2010-10-07.20; # UTC
+scriptversion=2011-04-16.09; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -166,10 +166,12 @@ gcc)
 ' < "$tmpdepfile" |
 ## Some versions of gcc put a space before the `:'.  On the theory
 ## that the space means something, we add a space to the output as
-## well.
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+      | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -557,7 +559,9 @@ makedepend)
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
   sed '1,2d' "$tmpdepfile" | tr ' ' '
 ' | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
diff --git a/lib/install-sh b/lib/install-sh
index 3f83ce9..a9244eb 100755
--- a/lib/install-sh
+++ b/lib/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-01-19.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,6 +156,10 @@ while test $# -ne 0; do
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
+       # Protect names problematic for `test' and other utilities.
+       case $dst_arg in
+         -* | [=\(\)!]) dst_arg=./$dst_arg;;
+       esac
        shift;;
 
     -T) no_target_directory=true;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -232,9 +240,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for `test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -256,12 +264,7 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
@@ -389,7 +392,7 @@ do
 
       case $dstdir in
        /*) prefix='/';;
-       -*) prefix='./';;
+       [-=\(\)!]*) prefix='./';;
        *)  prefix='';;
       esac
 
@@ -407,7 +410,7 @@ do
 
       for d
       do
-       test -z "$d" && continue
+       test X"$d" = X && continue
 
        prefix=$prefix$d
        if test -d "$prefix"; then
diff --git a/lib/mdate-sh b/lib/mdate-sh
index c477512..60dc485 100755
--- a/lib/mdate-sh
+++ b/lib/mdate-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2010-02-22.21; # UTC
+scriptversion=2010-08-21.06; # UTC
 
 # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010
 # Free Software Foundation, Inc.
@@ -29,6 +29,15 @@ scriptversion=2010-02-22.21; # UTC
 # bugs to <address@hidden> or send patches to
 # <address@hidden>.
 
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+fi
+
 case $1 in
   '')
      echo "$0: No file.  Try \`$0 --help' for more information." 1>&2
@@ -51,6 +60,13 @@ EOF
     ;;
 esac
 
+error ()
+{
+  echo "$0: $1" >&2
+  exit 1
+}
+
+
 # Prevent date giving response in another language.
 LANG=C
 export LANG
@@ -100,6 +116,7 @@ month=
 command=
 until test $month
 do
+  test $# -gt 0 || error "failed parsing \`$ls_command /' output"
   shift
   # Add another shift to the command.
   command="$command shift;"
@@ -119,8 +136,10 @@ do
   esac
 done
 
+test -n "$month" || error "failed parsing \`$ls_command /' output"
+
 # Get the extended ls output of the file or directory.
-set dummy x`eval "$ls_command \"\$save_arg1\""`
+set dummy x`eval "$ls_command \"\\\$save_arg1\""`
 
 # Remove all preceding arguments
 eval $command
diff --git a/lib/texinfo.tex b/lib/texinfo.tex
index 9140826..fd22fd6 100644
--- a/lib/texinfo.tex
+++ b/lib/texinfo.tex
@@ -3,11 +3,11 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2009-08-14.15}
+\def\texinfoversion{2011-05-23.16}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -65,7 +65,6 @@
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
-
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
@@ -93,14 +92,13 @@
 \let\ptexnewwrite\newwrite
 \let\ptexnoindent=\noindent
 \let\ptexplus=+
+\let\ptexraggedright=\raggedright
 \let\ptexrbrace=\}
 \let\ptexslash=\/
 \let\ptexstar=\*
 \let\ptext=\t
 \let\ptextop=\top
-{\catcode`\'=\active
-\global\let\ptexquoteright'}% Math-mode def from plain.tex.
-\let\ptexraggedright=\raggedright
+{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
 
 % If this character appears in an error message or help string, it
 % starts a new line in the output.
@@ -120,8 +118,8 @@
 \ifx\putwordChapter\undefined   \gdef\putwordChapter{Chapter}\fi
 \ifx\putwordfile\undefined      \gdef\putwordfile{file}\fi
 \ifx\putwordin\undefined        \gdef\putwordin{in}\fi
-\ifx\putwordIndexIsEmpty\undefined     \gdef\putwordIndexIsEmpty{(Index is 
empty)}\fi
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is 
nonexistent)}\fi
+\ifx\putwordIndexIsEmpty\undefined       \gdef\putwordIndexIsEmpty{(Index is 
empty)}\fi
+\ifx\putwordIndexNonexistent\undefined   \gdef\putwordIndexNonexistent{(Index 
is nonexistent)}\fi
 \ifx\putwordInfo\undefined      \gdef\putwordInfo{Info}\fi
 \ifx\putwordInstanceVariableof\undefined 
\gdef\putwordInstanceVariableof{Instance Variable of}\fi
 \ifx\putwordMethodon\undefined  \gdef\putwordMethodon{Method on}\fi
@@ -160,15 +158,18 @@
 \def\spaceisspace{\catcode`\ =\spacecat}
 
 % sometimes characters are active, so we need control sequences.
+\chardef\ampChar   = `\&
 \chardef\colonChar = `\:
 \chardef\commaChar = `\,
 \chardef\dashChar  = `\-
 \chardef\dotChar   = `\.
 \chardef\exclamChar= `\!
+\chardef\hashChar  = `\#
 \chardef\lquoteChar= `\`
 \chardef\questChar = `\?
 \chardef\rquoteChar= `\'
 \chardef\semiChar  = `\;
+\chardef\slashChar = `\/
 \chardef\underChar = `\_
 
 % Ignore a token.
@@ -199,36 +200,7 @@
 % that mark overfull boxes (in case you have decided
 % that the text looks ok even though it passes the margin).
 %
-\def\finalout{\overfullrule=0pt}
-
-% @| inserts a changebar to the left of the current line.  It should
-% surround any changed text.  This approach does *not* work if the
-% change spans more than two lines of output.  To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change).
-%
-\def\|{%
-  % \vadjust can only be used in horizontal mode.
-  \leavevmode
-  %
-  % Append this vertical mode material after the current line in the output.
-  \vadjust{%
-    % We want to insert a rule with the height and depth of the current
-    % leading; that is exactly what \strutbox is supposed to record.
-    \vskip-\baselineskip
-    %
-    % \vadjust-items are inserted at the left edge of the type.  So
-    % the \llap here moves out into the left-hand margin.
-    \llap{%
-      %
-      % For a thicker or thinner bar, change the `1pt'.
-      \vrule height\baselineskip width1pt
-      %
-      % This is the space between the bar and the text.
-      \hskip 12pt
-    }%
-  }%
-}
+\def\finalout{\overfullrule=0pt }
 
 % Sometimes it is convenient to have everything in the transcript file
 % and nothing on the terminal.  We don't just call \tracingall here,
@@ -246,7 +218,7 @@
   \tracingmacros2
   \tracingrestores1
   \showboxbreadth\maxdimen \showboxdepth\maxdimen
-  \ifx\eTeXversion\undefined\else % etex gives us more logging
+  \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
     \tracingscantokens1
     \tracingifs1
     \tracinggroups1
@@ -267,7 +239,6 @@
 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
   \removelastskip\penalty-200\bigskip\fi\fi}
 
-% For @cropmarks command.
 % Do @cropmarks to get crop marks.
 %
 \newif\ifcropmarks
@@ -577,7 +548,7 @@
 }
 \def\inenvironment#1{%
   \ifx#1\empty
-    out of any environment%
+    outside of any environment%
   \else
     in environment \expandafter\string#1%
   \fi
@@ -589,7 +560,7 @@
 \parseargdef\end{%
   \if 1\csname iscond.#1\endcsname
   \else
-    % The general wording of \badenverr may not be ideal, but... --kasal, 
06nov03
+    % The general wording of \badenverr may not be ideal.
     \expandafter\checkenv\csname#1\endcsname
     \csname E#1\endcsname
     \endgroup
@@ -599,85 +570,6 @@
 \newhelp\EMsimple{Press RETURN to continue.}
 
 
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
address@hidden
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-\def\mylbrace {{\tt\char123}}
-\def\myrbrace {{\tt\char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-\begingroup
-  % Definitions to produce \{ and \} commands for indices,
-  % and @{ and @} for the aux/toc files.
-  \catcode`\{ = \other \catcode`\} = \other
-  \catcode`\[ = 1 \catcode`\] = 2
-  \catcode`\! = 0 \catcode`\\ = \other
-  !gdef!lbracecmd[\{]%
-  !gdef!rbracecmd[\}]%
-  address@hidden
-  address@hidden
-!endgroup
-
-% @comma{} to avoid , parsing problems.
-\let\comma = ,
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
-\let\, = \c
-\let\dotaccent = \.
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \t
-\let\ubaraccent = \b
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown @ordf @ordm
-% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
-\def\questiondown{?`}
-\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
-  \def\temp{#1}%
-  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
-  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
-  \else address@hidden can be used only with i or j}%
-  \fi\fi
-}
-
-% The \TeX{} logo, as in plain, but resetting the spacing so that a
-% period following counts as ending a sentence.  (Idea found in latex.)
-%
-\edef\TeX{\TeX \spacefactor=1000 }
-
-% @LaTeX{} logo.  Not quite the same results as the definition in
-% latex.ltx, since we use a different font for the raised A; it's most
-% convenient for us to use an explicitly smaller font, rather than using
-% the \scriptstyle font (since we don't reset \scriptstyle and
-% \scriptscriptstyle).
-%
-\def\LaTeX{%
-  L\kern-.36em
-  {\setbox0=\hbox{T}%
-   \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
-  \kern-.15em
-  \TeX
-}
-
 % Be sure we're in horizontal mode when doing a tie, since we make space
 % equivalent to this in @example-like environments. Otherwise, a space
 % at the beginning of a line will start with \penalty -- and
@@ -719,7 +611,7 @@
   \else\ifx\temp\offword \plainnonfrenchspacing
   \else
     \errhelp = \EMsimple
-    \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
   \fi\fi
 }
 
@@ -801,15 +693,6 @@ where each line of input produces a line of output.}
 
 \newdimen\mil  \mil=0.001in
 
-% Old definition--didn't work.
-%\parseargdef\need{\par %
-%% This method tries to make TeX break the page naturally
-%% if the depth of the box does not fit.
-%{\baselineskip=0pt%
-%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
-%\prevdepth=-1000pt
-%}}
-
 \parseargdef\need{%
   % Ensure vertical mode, so we don't make a big box in the middle of a
   % paragraph.
@@ -873,7 +756,7 @@ where each line of input produces a line of output.}
 
 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
 % paragraph.  For more general purposes, use the \margin insertion
-% class.  WHICH is `l' or `r'.
+% class.  WHICH is `l' or `r'.  Not documented, written for gawk manual.
 %
 \newskip\inmarginspacing \inmarginspacing=1cm
 \def\strutdepth{\dp\strutbox}
@@ -920,6 +803,36 @@ where each line of input produces a line of output.}
   \temp
 }
 
+% @| inserts a changebar to the left of the current line.  It should
+% surround any changed text.  This approach does *not* work if the
+% change spans more than two lines of output.  To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).  This command
+% is not documented, not supported, and doesn't work.
+%
+\def\|{%
+  % \vadjust can only be used in horizontal mode.
+  \leavevmode
+  %
+  % Append this vertical mode material after the current line in the output.
+  \vadjust{%
+    % We want to insert a rule with the height and depth of the current
+    % leading; that is exactly what \strutbox is supposed to record.
+    \vskip-\baselineskip
+    %
+    % \vadjust-items are inserted at the left edge of the type.  So
+    % the \llap here moves out into the left-hand margin.
+    \llap{%
+      %
+      % For a thicker or thinner bar, change the `1pt'.
+      \vrule height\baselineskip width1pt
+      %
+      % This is the space between the bar and the text.
+      \hskip 12pt
+    }%
+  }%
+}
+
 % @include FILE -- \input text of FILE.
 %
 \def\include{\parseargusing\filenamecatcodes\includezzz}
@@ -930,6 +843,7 @@ where each line of input produces a line of output.}
     \makevalueexpandable  % we want to expand any @value in FILE.
     \turnoffactive        % and allow special characters in the expansion
     \indexnofonts         % Allow `@@' and other weird things in file names.
+    \wlog{texinfo.tex: doing @include of #1^^J}%
     \edef\temp{\noexpand\input #1 }%
     %
     % This trickery is to read FILE outside of a group, in case it makes
@@ -1095,109 +1009,6 @@ where each line of input produces a line of output.}
 }
 
 
-% @asis just yields its argument.  Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math outputs its argument in math mode.
-%
-% One complication: _ usually means subscripts, but it could also mean
-% an actual _ character, as in @address@hidden + 1}.  So make
-% _ active, and distinguish by seeing if the current family is \slfam,
-% which is what @var uses.
-{
-  \catcode`\_ = \active
-  \gdef\mathunderscore{%
-    \catcode`\_=\active
-    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
-  }
-}
-% Another complication: we want \\ (and @\) to output a \ character.
-% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
-% this is not advertised and we don't care.  Texinfo does not
-% otherwise define @\.
-%
-% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
-\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
-%
-\def\math{%
-  \tex
-  \mathunderscore
-  \let\\ = \mathbackslash
-  \mathactive
-  % make the texinfo accent commands work in math mode
-  \let\"=\ddot
-  \let\'=\acute
-  \let\==\bar
-  \let\^=\hat
-  \let\`=\grave
-  \let\u=\breve
-  \let\v=\check
-  \let\~=\tilde
-  \let\dotaccent=\dot
-  $\finishmath
-}
-\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
-
-% Some active characters (such as <) are spaced differently in math.
-% We have to reset their definitions in case the @math was an argument
-% to a command which sets the catcodes (such as @item or @section).
-%
-{
-  \catcode`^ = \active
-  \catcode`< = \active
-  \catcode`> = \active
-  \catcode`+ = \active
-  \catcode`' = \active
-  \gdef\mathactive{%
-    \let^ = \ptexhat
-    \let< = \ptexless
-    \let> = \ptexgtr
-    \let+ = \ptexplus
-    \let' = \ptexquoteright
-  }
-}
-
-% Some math mode symbols.
-\def\bullet{$\ptexbullet$}
-\def\geq{\ifmmode \ge\else $\ge$\fi}
-\def\leq{\ifmmode \le\else $\le$\fi}
-\def\minus{\ifmmode -\else $-$\fi}
-
-% @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in the cm
-% typewriter fonts as three actual period characters; on the other hand,
-% in other typewriter fonts three periods are wider than 1.5em.  So do
-% whichever is larger.
-%
-\def\dots{%
-  \leavevmode
-  \setbox0=\hbox{...}% get width of three periods
-  \ifdim\wd0 > 1.5em
-    \dimen0 = \wd0
-  \else
-    \dimen0 = 1.5em
-  \fi
-  \hbox to \dimen0{%
-    \hskip 0pt plus.25fil
-    .\hskip 0pt plus1fil
-    .\hskip 0pt plus1fil
-    .\hskip 0pt plus.5fil
-  }%
-}
-
-% @enddots{} is an end-of-sentence ellipsis.
-%
-\def\enddots{%
-  \dots
-  \spacefactor=\endofsentencespacefactor
-}
-
-% @comma{} is so commas can be inserted into text without messing up
-% Texinfo's parsing.
-%
-\let\comma = ,
-
 % @refill is a no-op.
 \let\refill=\relax
 
@@ -1262,9 +1073,8 @@ where each line of input produces a line of output.}
 \newif\ifpdfmakepagedest
 
 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set).  So we test for \relax and 0 as well as \undefined,
-% borrowed from ifpdf.sty.
-\ifx\pdfoutput\undefined
+% can be set).  So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
 \else
   \ifx\pdfoutput\relax
   \else
@@ -1492,6 +1302,7 @@ output) for that.)}
       \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
       %
       % Read toc silently, to get counts of subentries for \pdfoutline.
+      \def\partentry##1##2##3##4{}% ignore parts in the outlines
       \def\numchapentry##1##2##3##4{%
        \def\thischapnum{##2}%
        \def\thissecnum{0}%
@@ -1695,7 +1506,7 @@ output) for that.)}
 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
 % (\pdffontattr was introduced many years ago, but people still run
 % older pdftex's; it's easy to conditionalize, so we do.)
-\ifpdf \ifx\pdffontattr\undefined \else
+\ifpdf \ifx\pdffontattr\thisisundefined \else
   \begingroup
     \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
     \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
@@ -1962,7 +1773,7 @@ end
 % Use cm as the default font prefix.
 % To specify the font prefix, you must define \fontprefix
 % before you read in texinfo.tex.
-\ifx\fontprefix\undefined
+\ifx\fontprefix\thisisundefined
 \def\fontprefix{cm}
 \fi
 % Support font families that don't use the same naming scheme as CM.
@@ -2105,8 +1916,8 @@ end
 \font\reducedsy=cmsy10
 \def\reducedecsize{1000}
 
-% reset the current fonts
-\textfonts
+\textleading = 13.2pt % line spacing for 11pt CM
+\textfonts            % reset the current fonts
 \rm
 } % end of 11pt text font size definitions
 
@@ -2236,11 +2047,9 @@ end
 \font\reducedsy=cmsy9
 \def\reducedecsize{0900}
 
-% reduce space between paragraphs
-\divide\parskip by 2
-
-% reset the current fonts
-\textfonts
+\divide\parskip by 2  % reduce space between paragraphs
+\textleading = 12pt   % line spacing for 10pt CM
+\textfonts            % reset the current fonts
 \rm
 } % end of 10pt text font size definitions
 
@@ -2249,12 +2058,13 @@ end
 %   @fonttextsize 10
 % (or 11) to redefine the text font size.  pt is assumed.
 %
-\def\xword{10}
 \def\xiword{11}
+\def\xword{10}
+\def\xwordpt{10pt}
 %
 \parseargdef\fonttextsize{%
   \def\textsizearg{#1}%
-  \wlog{doing @fonttextsize \textsizearg}%
+  %\wlog{doing @fonttextsize \textsizearg}%
   %
   % Set \globaldefs so that documents can use this inside @tex, since
   % makeinfo 4.8 does not support it, but we need it nonetheless.
@@ -2308,7 +2118,7 @@ end
   \let\tenttsl=\titlettsl
   \def\curfontsize{title}%
   \def\lsize{chap}\def\lllsize{subsec}%
-  \resetmathfonts \setleading{25pt}}
+  \resetmathfonts \setleading{27pt}}
 \def\titlefont#1{{\titlefonts\rmisbold #1}}
 \def\chapfonts{%
   \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
@@ -2436,12 +2246,14 @@ end
 
 % Markup style setup for left and right quotes.
 \defmarkupstylesetup\markupsetuplq{%
-  \expandafter\let\expandafter \temp \csname 
markupsetuplq\currentmarkupstyle\endcsname
+  \expandafter\let\expandafter \temp
+    \csname markupsetuplq\currentmarkupstyle\endcsname
   \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
 }
 
 \defmarkupstylesetup\markupsetuprq{%
-  \expandafter\let\expandafter \temp \csname 
markupsetuprq\currentmarkupstyle\endcsname
+  \expandafter\let\expandafter \temp
+    \csname markupsetuprq\currentmarkupstyle\endcsname
   \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
 }
 
@@ -2460,22 +2272,26 @@ end
 
 \let\markupsetuplqcode \markupsetcodequoteleft
 \let\markupsetuprqcode \markupsetcodequoteright
+%
 \let\markupsetuplqexample \markupsetcodequoteleft
 \let\markupsetuprqexample \markupsetcodequoteright
+%
+\let\markupsetuplqsamp \markupsetcodequoteleft
+\let\markupsetuprqsamp \markupsetcodequoteright
+%
 \let\markupsetuplqverb \markupsetcodequoteleft
 \let\markupsetuprqverb \markupsetcodequoteright
+%
 \let\markupsetuplqverbatim \markupsetcodequoteleft
 \let\markupsetuprqverbatim \markupsetcodequoteright
 
-\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
 \let\markupsetuplqkbd \markupsetnoligaturesquoteleft
 
-% Allow an option to not replace quotes with a regular directed right
-% quote/apostrophe (char 0x27), but instead use the undirected quote
-% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
-% the default, but it works for pasting with more pdf viewers (at least
-% evince), the lilypond developers report.  xpdf does work with the
-% regular 0x27.
+% Allow an option to not use regular directed right quote/apostrophe
+% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
+% The undirected quote is ugly, so don't make it the default, but it
+% works for pasting with more pdf viewers (at least evince), the
+% lilypond developers report.  xpdf does work with the regular 0x27.
 %
 \def\codequoteright{%
   \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
@@ -2499,33 +2315,76 @@ end
   \else \char'22 \fi
 }
 
+% Commands to set the quote options.
+% 
+\parseargdef\codequoteundirected{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETtxicodequoteundirected\endcsname
+      = t%
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETtxicodequoteundirected\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
+  \fi\fi
+}
+%
+\parseargdef\codequotebacktick{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETtxicodequotebacktick\endcsname
+      = t%
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETtxicodequotebacktick\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
+  \fi\fi
+}
+
 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
 \def\noligaturesquoteleft{\relax\lq}
 
 % Count depth in font-changes, for error checks
 \newcount\fontdepth \fontdepth=0
 
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
+% Font commands.
+
+% #1 is the font command (\sl or \it), #2 is the text to slant.
+% If we are in a monospaced environment, however, 1) always use \ttsl,
+% and 2) do not add an italic correction.
+\def\dosmartslant#1#2{%
+  \ifusingtt 
+    {{\ttsl #2}\let\next=\relax}%
+    {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+  \next
+}
+\def\smartslanted{\dosmartslant\sl}
+\def\smartitalic{\dosmartslant\it}
 
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
-                    \ptexslash\fi\fi\fi}
-\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+% Output an italic correction unless \next (presumed to be the following
+% character) is such as not to need one.
+\def\smartitaliccorrection{%
+  \ifx\next,%
+  \else\ifx\next-%
+  \else\ifx\next.%
+  \else\ptexslash
+  \fi\fi\fi}
 
-% like \smartslanted except unconditionally uses \ttsl.
+% like \smartslanted except unconditionally uses \ttsl, and no ic.
 % @var is set to this for defun arguments.
-\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+\def\ttslanted#1{{\ttsl #1}}
 
 % @cite is like \smartslanted except unconditionally use \sl.  We never want
 % ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
 
 \let\i=\smartitalic
 \let\slanted=\smartslanted
-\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
+\def\var#1{\smartslanted{#1}}
 \let\dfn=\smartslanted
 \let\emph=\smartitalic
 
@@ -2653,6 +2512,8 @@ end
   }
 }
 
+\def\codex #1{\tclose{#1}\endgroup}
+
 \def\realdash{-}
 \def\codedash{-\discretionary{}{}{}}
 \def\codeunder{%
@@ -2666,7 +2527,6 @@ end
              \discretionary{}{}{}}%
             {\_}%
 }
-\def\codex #1{\tclose{#1}\endgroup}
 
 % An additional complication: the above will allow breaks after, e.g.,
 % each of the four underscores in __typeof__.  This is undesirable in
@@ -2686,10 +2546,156 @@ end
     \allowcodebreaksfalse
   \else
     \errhelp = \EMsimple
-    \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+    \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
   \fi\fi
 }
 
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself.  First (mandatory) arg is the url.
+% (This \urefnobreak definition isn't used now, leaving it for a while
+% for comparison.)
+\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
+\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
+  \unsepspaces
+  \pdfurl{#1}%
+  \setbox0 = \hbox{\ignorespaces #3}%
+  \ifdim\wd0 > 0pt
+    \unhbox0 % third arg given, show only that
+  \else
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0 > 0pt
+      \ifpdf
+        \unhbox0             % PDF: 2nd arg given, show only it
+      \else
+        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+      \fi
+    \else
+      \code{#1}% only url given, so show it
+    \fi
+  \fi
+  \endlink
+\endgroup}
+
+% This \urefbreak definition is the active one.
+\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
+\let\uref=\urefbreak
+\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
+\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
+  \unsepspaces
+  \pdfurl{#1}%
+  \setbox0 = \hbox{\ignorespaces #3}%
+  \ifdim\wd0 > 0pt
+    \unhbox0 % third arg given, show only that
+  \else
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0 > 0pt
+      \ifpdf
+        \unhbox0             % PDF: 2nd arg given, show only it
+      \else
+        \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+      \fi
+    \else
+      \urefcode{#1}% only url given, so show it
+    \fi
+  \fi
+  \endlink
+\endgroup}
+
+% Allow line breaks around only a few characters (only).
+\def\urefcatcodes{%
+  \catcode\ampChar=\active   \catcode\dotChar=\active
+  \catcode\hashChar=\active  \catcode\questChar=\active
+  \catcode\slashChar=\active
+}
+{
+  \urefcatcodes
+  %
+  \global\def\urefcode{\begingroup
+    \setupmarkupstyle{code}%
+    \urefcatcodes
+    \let&\urefcodeamp
+    \let.\urefcodedot
+    \let#\urefcodehash
+    \let?\urefcodequest
+    \let/\urefcodeslash
+    \codex
+  }
+  %
+  % By default, they are just regular characters.
+  \global\def&{\normalamp}
+  \global\def.{\normaldot}
+  \global\def#{\normalhash}
+  \global\def?{\normalquest}
+  \global\def/{\normalslash}
+}
+
+% we put a little stretch before and after the breakable chars, to help
+% line breaking of long url's.  The unequal skips make look better in
+% cmtt at least, especially for dots.
+\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+%
+\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodequest{\urefprestretch ?\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+  \catcode`\/=\active
+  \global\def\urefcodeslashfinish{%
+    \urefprestretch \slashChar
+    % Allow line break only after the final / in a sequence of
+    % slashes, to avoid line break between the slashes in http://.
+    \ifx\next/\else \urefpoststretch \fi
+  }
+}
+
+% One more complication: by default we'll break after the special
+% characters, but some people like to break before the special chars, so
+% allow that.  Also allow no breaking at all, for manual control.
+% 
+\parseargdef\urefbreakstyle{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\wordnone
+    \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
+  \else\ifx\txiarg\wordbefore
+    \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
+  \else\ifx\txiarg\wordafter
+    \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
+  \fi\fi\fi
+}
+\def\wordafter{after}
+\def\wordbefore{before}
+\def\wordnone{none}
+
+\urefbreakstyle after
+
+% @url synonym for @uref, since that's how everyone uses it.
+%
+\let\url=\uref
+
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\ifpdf
+  \def\email#1{\doemail#1,,\finish}
+  \def\doemail#1,#2,#3\finish{\begingroup
+    \unsepspaces
+    \pdfurl{mailto:#1}%
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+    \endlink
+  \endgroup}
+\else
+  \let\email=\uref
+\fi
+
 % @kbd is like @code, except that if the argument is just one @key command,
 % then @kbd has no effect.
 \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
@@ -2707,7 +2713,7 @@ end
     \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
   \else
     \errhelp = \EMsimple
-    \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
+    \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
   \fi\fi\fi
 }
 \def\worddistinct{distinct}
@@ -2728,100 +2734,231 @@ end
 \let\env=\code
 \let\command=\code
 
-% @clicksequence{File @click{} Open ...}
-\def\clicksequence#1{\begingroup #1\endgroup}
+% @clicksequence{File @click{} Open ...}
+\def\clicksequence#1{\begingroup #1\endgroup}
+
+% @clickstyle @arrow   (by default)
+\parseargdef\clickstyle{\def\click{#1}}
+\def\click{\arrow}
+
+% Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
+% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
+%
+\def\dmn#1{\thinspace #1}
+
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find.  We need it for
+% Polish suppressed-l.  --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
+
+% @acronym for "FBI", "NATO", and the like.
+% We print this one point size smaller, since it's intended for
+% all-uppercase.
+%
+\def\acronym#1{\doacronym #1,,\finish}
+\def\doacronym#1,#2,#3\finish{%
+  {\selectfonts\lsize #1}%
+  \def\temp{#2}%
+  \ifx\temp\empty \else
+    \space ({\unsepspaces \ignorespaces \temp \unskip})%
+  \fi
+}
+
+% @abbr for "Comput. J." and the like.
+% No font change, but don't do end-of-sentence spacing.
+%
+\def\abbr#1{\doabbr #1,,\finish}
+\def\doabbr#1,#2,#3\finish{%
+  {\plainfrenchspacing #1}%
+  \def\temp{#2}%
+  \ifx\temp\empty \else
+    \space ({\unsepspaces \ignorespaces \temp \unskip})%
+  \fi
+}
+
+% @asis just yields its argument.  Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @address@hidden + 1}.  So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+  \catcode`\_ = \active
+  \gdef\mathunderscore{%
+    \catcode`\_=\active
+    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+  }
+}
+% Another complication: we want \\ (and @\) to output a math (or tt) \.
+% FYI, plain.tex uses \\ as a temporary control sequence (for no
+% particular reason), but this is not advertised and we don't care.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+  \tex
+  \mathunderscore
+  \let\\ = \mathbackslash
+  \mathactive
+  % make the texinfo accent commands work in math mode
+  \let\"=\ddot
+  \let\'=\acute
+  \let\==\bar
+  \let\^=\hat
+  \let\`=\grave
+  \let\u=\breve
+  \let\v=\check
+  \let\~=\tilde
+  \let\dotaccent=\dot
+  $\finishmath
+}
+\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+  \catcode`^ = \active
+  \catcode`< = \active
+  \catcode`> = \active
+  \catcode`+ = \active
+  \catcode`' = \active
+  \gdef\mathactive{%
+    \let^ = \ptexhat
+    \let< = \ptexless
+    \let> = \ptexgtr
+    \let+ = \ptexplus
+    \let' = \ptexquoteright
+  }
+}
+
+
+\message{glyphs,}
+% and logos.
+
+% @@ prints an @.
address@hidden }
+
+% Used to generate quoted braces.  Unless we're in typewriter, use
+% \ecfont because the CM text fonts do not have braces, and we don't
+% want to switch into math.
+\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
+\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+  % Definitions to produce \{ and \} commands for indices,
+  % and @{ and @} for the aux/toc files.
+  \catcode`\{ = \other \catcode`\} = \other
+  \catcode`\[ = 1 \catcode`\] = 2
+  \catcode`\! = 0 \catcode`\\ = \other
+  !gdef!lbracecmd[\{]%
+  !gdef!rbracecmd[\}]%
+  address@hidden
+  address@hidden
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
 
-% @clickstyle @arrow   (by default)
-\parseargdef\clickstyle{\def\click{#1}}
-\def\click{\arrow}
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \ptexc
+\let\dotaccent = \ptexdot
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \ptext
+\let\ubaraccent = \ptexb
+\let\udotaccent = \d
 
-% @uref (abbreviation for `urlref') takes an optional (comma-separated)
-% second argument specifying the text to display and an optional third
-% arg as text to display instead of (rather than in addition to) the url
-% itself.  First (mandatory) arg is the url.  Perhaps eventually put in
-% a hypertex \special here.
-%
-\def\uref#1{\douref #1,,,\finish}
-\def\douref#1,#2,#3,#4\finish{\begingroup
-  \unsepspaces
-  \pdfurl{#1}%
-  \setbox0 = \hbox{\ignorespaces #3}%
-  \ifdim\wd0 > 0pt
-    \unhbox0 % third arg given, show only that
-  \else
-    \setbox0 = \hbox{\ignorespaces #2}%
-    \ifdim\wd0 > 0pt
-      \ifpdf
-        \unhbox0             % PDF: 2nd arg given, show only it
-      \else
-        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
-      \fi
-    \else
-      \code{#1}% only url given, so show it
-    \fi
-  \fi
-  \endlink
-\endgroup}
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
 
-% @url synonym for @uref, since that's how everyone uses it.
-%
-\let\url=\uref
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+  \def\temp{#1}%
+  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+  \else address@hidden can be used only with i or j}%
+  \fi\fi
+}
 
-% rms does not like angle brackets --karl, 17may97.
-% So now @email is just like @uref, unless we are pdf.
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence.  (Idea found in latex.)
 %
-%\def\email#1{\angleleft{\tt #1}\angleright}
-\ifpdf
-  \def\email#1{\doemail#1,,\finish}
-  \def\doemail#1,#2,#3\finish{\begingroup
-    \unsepspaces
-    \pdfurl{mailto:#1}%
-    \setbox0 = \hbox{\ignorespaces #2}%
-    \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
-    \endlink
-  \endgroup}
-\else
-  \let\email=\uref
-\fi
+\edef\TeX{\TeX \spacefactor=1000 }
 
-% Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
-% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
+% @LaTeX{} logo.  Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
 %
-\def\dmn#1{\thinspace #1}
+\def\LaTeX{%
+  L\kern-.36em
+  {\setbox0=\hbox{T}%
+   \vbox to \ht0{\hbox{%
+     \ifx\textnominalsize\xwordpt
+       % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+       % Revert to plain's \scriptsize, which is 7pt.
+       \count255=\the\fam $\fam\count255 \scriptstyle A$%
+     \else
+       % For 11pt, we can use our lllsize.
+       \selectfonts\lllsize A%
+     \fi
+     }%
+     \vss
+  }}%
+  \kern-.15em
+  \TeX
+}
 
-% @l was never documented to mean ``switch to the Lisp font'',
-% and it is not used as such in any manual I can find.  We need it for
-% Polish suppressed-l.  --karl, 22sep96.
-%\def\l#1{{\li #1}\null}
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
 
-% @acronym for "FBI", "NATO", and the like.
-% We print this one point size smaller, since it's intended for
-% all-uppercase.
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em.  So do
+% whichever is larger.
 %
-\def\acronym#1{\doacronym #1,,\finish}
-\def\doacronym#1,#2,#3\finish{%
-  {\selectfonts\lsize #1}%
-  \def\temp{#2}%
-  \ifx\temp\empty \else
-    \space ({\unsepspaces \ignorespaces \temp \unskip})%
+\def\dots{%
+  \leavevmode
+  \setbox0=\hbox{...}% get width of three periods
+  \ifdim\wd0 > 1.5em
+    \dimen0 = \wd0
+  \else
+    \dimen0 = 1.5em
   \fi
+  \hbox to \dimen0{%
+    \hskip 0pt plus.25fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus.5fil
+  }%
 }
 
-% @abbr for "Comput. J." and the like.
-% No font change, but don't do end-of-sentence spacing.
+% @enddots{} is an end-of-sentence ellipsis.
 %
-\def\abbr#1{\doabbr #1,,\finish}
-\def\doabbr#1,#2,#3\finish{%
-  {\plainfrenchspacing #1}%
-  \def\temp{#2}%
-  \ifx\temp\empty \else
-    \space ({\unsepspaces \ignorespaces \temp \unskip})%
-  \fi
+\def\enddots{%
+  \dots
+  \spacefactor=\endofsentencespacefactor
 }
 
-
-\message{glyphs,}
-
 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
 %
 % Since these characters are used in examples, they should be an even number of
@@ -2991,7 +3128,7 @@ end
 %  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
 % so we'll define it if necessary.
 %
-\ifx\Orb\undefined
+\ifx\Orb\thisisundefined
 \def\Orb{\mathhexbox20D}
 \fi
 
@@ -3019,8 +3156,9 @@ end
 \newif\ifsetshortcontentsaftertitlepage
  \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
 
-\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm 
\centerline{#1}%
-        \endgroup\page\hbox{}\page}
+\parseargdef\shorttitlepage{%
+  \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+  \endgroup\page\hbox{}\page}
 
 \envdef\titlepage{%
   % Open one extra group, as we want to close it in the middle of \Etitlepage.
@@ -3080,7 +3218,7 @@ end
   \finishedtitlepagetrue
 }
 
-%%% Macros to be used within @titlepage:
+% Macros to be used within @titlepage:
 
 \let\subtitlerm=\tenrm
 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
@@ -3113,7 +3251,7 @@ end
 }
 
 
-%%% Set up page headings and footings.
+% Set up page headings and footings.
 
 \let\thispage=\folio
 
@@ -3207,10 +3345,14 @@ end
 
 \def\headings #1 {\csname HEADINGS#1\endcsname}
 
-\def\HEADINGSoff{%
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
+\def\headingsoff{% non-global headings elimination
+  \evenheadline={\hfil}\evenfootline={\hfil}%
+   \oddheadline={\hfil}\oddfootline={\hfil}%
+}
+
+\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
+\HEADINGSoff  % it's the default
+
 % When we turn headings on, set the page number to 1.
 % For double-sided printing, put current file name in lower left corner,
 % chapter name on inside top of right hand pages, document
@@ -3261,7 +3403,7 @@ end
 % This produces Day Month Year style of output.
 % Only define if not already defined, in case a txi-??.tex file has set
 % up a different format (e.g., txi-cs.tex does this).
-\ifx\today\undefined
+\ifx\today\thisisundefined
 \def\today{%
   \number\day\space
   \ifcase\month
@@ -3322,7 +3464,7 @@ end
     \begingroup
       \advance\leftskip by-\tableindent
       \advance\hsize by\tableindent
-      \advance\rightskip by0pt plus1fil
+      \advance\rightskip by0pt plus1fil\relax
       \leavevmode\unhbox0\par
     \endgroup
     %
@@ -3808,9 +3950,9 @@ end
 \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
 \global\advance\multitablelinespace by-\ht0
 \fi
-%% Test to see if parskip is larger than space between lines of
-%% table. If not, do nothing.
-%%        If so, set to same dimension as multitablelinespace.
+% Test to see if parskip is larger than space between lines of
+% table. If not, do nothing.
+%        If so, set to same dimension as multitablelinespace.
 \ifdim\multitableparskip>\multitablelinespace
 \global\multitableparskip=\multitablelinespace
 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
@@ -4134,11 +4276,14 @@ end
   address@hidden@}% change to @@ when we switch to @ as escape char in index 
files.
   \def\ {\realbackslash\space }%
   %
-  % Need these in case \tex is in effect and \{ is a \delimiter again.
-  % But can't use \lbracecmd and \rbracecmd because texindex assumes
-  % braces and backslashes are used only as delimiters.
-  \let\{ = \mylbrace
-  \let\} = \myrbrace
+  % Need these unexpandable (because we define \tt as a dummy)
+  % definitions when @{ or @} appear in index entry text.  Also, more
+  % complicated, when \tex is in effect and \{ is a \delimiter again.
+  % We can't use \lbracecmd and \rbracecmd because texindex assumes
+  % braces and backslashes are used only as delimiters.  Perhaps we
+  % should define @lbrace and @rbrace commands a la @comma.
+  \def\{{{\tt\char123}}%
+  \def\}{{\tt\char125}}%
   %
   % I don't entirely understand this, but when an index entry is
   % generated from a macro call, the \endinput which \scanmacro inserts
@@ -4191,7 +4336,7 @@ end
 \def\commondummies{%
   %
   % \definedummyword defines \#1 as \string\#1\space, thus effectively
-  % preventing its expansion.  This is used only for control% words,
+  % preventing its expansion.  This is used only for control words,
   % not control letters, because the \space would be incorrect for
   % control characters, but is needed to separate the control word
   % from whatever follows.
@@ -4210,6 +4355,7 @@ end
   \commondummiesnofonts
   %
   \definedummyletter\_%
+  \definedummyletter\-%
   %
   % Non-English letters.
   \definedummyword\AA
@@ -4246,20 +4392,24 @@ end
   \definedummyword\TeX
   %
   % Assorted special characters.
+  \definedummyword\arrow
   \definedummyword\bullet
   \definedummyword\comma
   \definedummyword\copyright
   \definedummyword\registeredsymbol
   \definedummyword\dots
   \definedummyword\enddots
+  \definedummyword\entrybreak
   \definedummyword\equiv
   \definedummyword\error
   \definedummyword\euro
+  \definedummyword\expansion
+  \definedummyword\geq
   \definedummyword\guillemetleft
   \definedummyword\guillemetright
   \definedummyword\guilsinglleft
   \definedummyword\guilsinglright
-  \definedummyword\expansion
+  \definedummyword\leq
   \definedummyword\minus
   \definedummyword\ogonek
   \definedummyword\pounds
@@ -4316,7 +4466,9 @@ end
   \definedummyword\b
   \definedummyword\i
   \definedummyword\r
+  \definedummyword\sansserif
   \definedummyword\sc
+  \definedummyword\slanted
   \definedummyword\t
   %
   % Commands that take arguments.
@@ -4325,10 +4477,12 @@ end
   \definedummyword\code
   \definedummyword\command
   \definedummyword\dfn
+  \definedummyword\dmn
   \definedummyword\email
   \definedummyword\emph
   \definedummyword\env
   \definedummyword\file
+  \definedummyword\indicateurl
   \definedummyword\kbd
   \definedummyword\key
   \definedummyword\math
@@ -4356,7 +4510,7 @@ end
   \def\definedummyaccent##1{\let##1\asis}%
   % We can just ignore other control letters.
   \def\definedummyletter##1{\let##1\empty}%
-  % Hopefully, all control words can become @asis.
+  % All control words become @asis by default; overrides below.
   \let\definedummyword\definedummyaccent
   %
   \commondummiesnofonts
@@ -4368,8 +4522,14 @@ end
   %
   \def\ { }%
   address@hidden@}%
-  % how to handle braces?
   \def\_{\normalunderscore}%
+  \def\-{}% @- shouldn't affect sorting
+  %
+  % Unfortunately, texindex is not prepared to handle braces in the
+  % content at all.  So for index sorting, we map @{ and @} to strings
+  % starting with |, since that ASCII character is between ASCII { and }.
+  \def\{{|a}%
+  \def\}{|b}%
   %
   % Non-English letters.
   \def\AA{AA}%
@@ -4397,6 +4557,7 @@ end
   %
   % Assorted special characters.
   % (The following {} will end up in the sort string, but that's ok.)
+  \def\arrow{->}%
   \def\bullet{bullet}%
   \def\comma{,}%
   \def\copyright{copyright}%
@@ -4406,10 +4567,12 @@ end
   \def\error{error}%
   \def\euro{euro}%
   \def\expansion{==>}%
+  \def\geq{>=}%
   \def\guillemetleft{<<}%
   \def\guillemetright{>>}%
   \def\guilsinglleft{<}%
   \def\guilsinglright{>}%
+  \def\leq{<=}%
   \def\minus{-}%
   \def\point{.}%
   \def\pounds{pounds}%
@@ -4424,6 +4587,9 @@ end
   \def\result{=>}%
   \def\textdegree{o}%
   %
+  \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
+  \else \indexlquoteignore \fi
+  %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
   % makeinfo does not expand macros in the argument to @deffn, which ends up
@@ -4437,6 +4603,11 @@ end
   \macrolist
 }
 
+% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
+% ignore left quotes in the sort term.
+{\catcode`\`=\active
+ \gdef\indexlquoteignore{\let`=\empty}}
+
 \let\indexbackslash=0  %overridden during \printindex.
 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
 
@@ -4694,7 +4865,6 @@ end
 % But this freezes the catcodes in the argument, and can cause problems to
 % @code, which sets - active.  This problem was fixed by a kludge---
 % ``-'' was active throughout whole index, but this isn't really right.
-%
 % The right solution is to prevent \entry from swallowing the whole text.
 %                                 --kasal, 21nov03
 \def\entry{%
@@ -4731,10 +4901,17 @@ end
     % columns.
     \vskip 0pt plus1pt
     %
+    % When reading the text of entry, convert explicit line breaks
+    % from @* into spaces.  The user might give these in long section
+    % titles, for instance.
+    \def\*{\unskip\space\ignorespaces}%
+    \def\entrybreak{\hfil\break}%
+    %
     % Swallow the left brace of the text (first parameter):
     \afterassignment\doentry
     \let\temp =
 }
+\def\entrybreak{\unskip\space\ignorespaces}%
 \def\doentry{%
     \bgroup % Instead of the swallowed brace.
       \noindent
@@ -4967,7 +5144,22 @@ end
 \message{sectioning,}
 % Chapters, sections, etc.
 
-% \unnumberedno is an oxymoron, of course.  But we count the unnumbered
+% Let's start with @part.
+\outer\parseargdef\part{\partzzz{#1}}
+\def\partzzz#1{%
+  \chapoddpage
+  \null
+  \vskip.3\vsize  % move it down on the page a bit
+  \begingroup
+    \noindent \titlefonts\rmisbold #1\par % the text
+    \let\lastnode=\empty      % no node to associate with
+    \writetocentry{part}{#1}{}% but put it in the toc
+    \headingsoff              % no headline or footline on the part page
+    \chapoddpage
+  \endgroup
+}
+
+% \unnumberedno is an oxymoron.  But we count the unnumbered
 % sections so that we can refer to them unambiguously in the pdf
 % outlines by their "section number".  We avoid collisions with chapter
 % numbers by starting them at 10000.  (If a document ever has 10000
@@ -5046,8 +5238,8 @@ end
 \chardef\maxseclevel = 3
 %
 % A numbered section within an unnumbered changes to unnumbered too.
-% To achive this, remember the "biggest" unnum. sec. we are currently in:
-\chardef\unmlevel = \maxseclevel
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unnlevel = \maxseclevel
 %
 % Trace whether the current chapter is an appendix or not:
 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
@@ -5072,8 +5264,8 @@ end
   % The heading type:
   \def\headtype{#1}%
   \if \headtype U%
-    \ifnum \absseclevel < \unmlevel
-      \chardef\unmlevel = \absseclevel
+    \ifnum \absseclevel < \unnlevel
+      \chardef\unnlevel = \absseclevel
     \fi
   \else
     % Check for appendix sections:
@@ -5085,10 +5277,10 @@ end
       \fi\fi
     \fi
     % Check for numbered within unnumbered:
-    \ifnum \absseclevel > \unmlevel
+    \ifnum \absseclevel > \unnlevel
       \def\headtype{U}%
     \else
-      \chardef\unmlevel = 3
+      \chardef\unnlevel = 3
     \fi
   \fi
   % Now print the heading:
@@ -5174,7 +5366,8 @@ end
   \global\let\subsubsection = \appendixsubsubsec
 }
 
-\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls 
unnumberedzzz
+% normally unnmhead0 calls unnumberedzzz:
+\outer\parseargdef\unnumbered{\unnmhead0{#1}}
 \def\unnumberedzzz#1{%
   \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
     \global\advance\unnumberedno by 1
@@ -5218,40 +5411,47 @@ end
 \let\top\unnumbered
 
 % Sections.
+% 
 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
 \def\seczzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
 }
 
-\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls 
appendixsectionzzz
+% normally calls appendixsectionzzz:
+\outer\parseargdef\appendixsection{\apphead1{#1}}
 \def\appendixsectionzzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
 }
 \let\appendixsec\appendixsection
 
-\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls 
unnumberedseczzz
+% normally calls unnumberedseczzz:
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
 \def\unnumberedseczzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
 }
 
 % Subsections.
-\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls 
numberedsubseczzz
+% 
+% normally calls numberedsubseczzz:
+\outer\parseargdef\numberedsubsec{\numhead2{#1}}
 \def\numberedsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
 }
 
-\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls 
appendixsubseczzz
+% normally calls appendixsubseczzz:
+\outer\parseargdef\appendixsubsec{\apphead2{#1}}
 \def\appendixsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Yappendix}%
                  {\appendixletter.\the\secno.\the\subsecno}%
 }
 
-\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls 
unnumberedsubseczzz
+% normally calls unnumberedsubseczzz:
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
 \def\unnumberedsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Ynothing}%
@@ -5259,21 +5459,25 @@ end
 }
 
 % Subsubsections.
-\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally 
numberedsubsubseczzz
+% 
+% normally numberedsubsubseczzz:
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
 \def\numberedsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Ynumbered}%
                  {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
 }
 
-\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally 
appendixsubsubseczzz
+% normally appendixsubsubseczzz:
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
 \def\appendixsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Yappendix}%
                  {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
 }
 
-\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally 
unnumberedsubsubseczzz
+% normally unnumberedsubsubseczzz:
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
 \def\unnumberedsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Ynothing}%
@@ -5323,14 +5527,13 @@ end
 % (including whitespace, linebreaking, etc. around it),
 % given all the information in convenient, parsed form.
 
-%%% Args are the skip and penalty (usually negative)
+% Args are the skip and penalty (usually negative)
 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
 
-%%% Define plain chapter starts, and page on/off switching for it
 % Parameter controlling skip before chapter headings (if needed)
-
 \newskip\chapheadingskip
 
+% Define plain chapter starts, and page on/off switching for it.
 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
 \def\chappager{\par\vfill\supereject}
 % Because \domark is called before \chapoddpage, the filler page will
@@ -5340,9 +5543,8 @@ end
   \chappager
   \ifodd\pageno \else
     \begingroup
-      \evenheadline={\hfil}\evenfootline={\hfil}%
-      \oddheadline={\hfil}\oddfootline={\hfil}%
-      \hbox to 0pt{}%
+      \headingsoff
+      \null
       \chappager
     \endgroup
   \fi
@@ -5534,6 +5736,8 @@ end
 %
 \def\sectionheading#1#2#3#4{%
   {%
+    \checkenv{}% should not be in an environment.
+    %
     % Switch to the right set of fonts.
     \csname #2fonts\endcsname \rmisbold
     %
@@ -5785,6 +5989,7 @@ end
 \def\summarycontents{%
   \startcontents{\putwordShortTOC}%
     %
+    \let\partentry = \shortpartentry
     \let\numchapentry = \shortchapentry
     \let\appentry = \shortchapentry
     \let\unnchapentry = \shortunnchapentry
@@ -5840,6 +6045,19 @@ end
 % The last argument is the page number.
 % The arguments in between are the chapter number, section number, ...
 
+% Parts, in the main contents.  Replace the part number, which doesn't
+% exist, with an empty box.  Let's hope all the numbers have the same width.
+% Also ignore the page number, which is conventionally not printed.
+\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
+%
+% Parts, in the short toc.
+\def\shortpartentry#1#2#3#4{%
+  \penalty-300
+  \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
+  \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+}
+
 % Chapters, in the main contents.
 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
 %
@@ -5929,9 +6147,9 @@ end
 \message{environments,}
 % @foo ... @end foo.
 
-% @tex ... @end tex    escapes into raw Tex temporarily.
+% @tex ... @end tex    escapes into raw TeX temporarily.
 % One exception: @ is still an escape character, so that @end tex works.
-% But \@ or @@ will get a plain tex @ character.
+% But \@ or @@ will get a plain @ character.
 
 \envdef\tex{%
   \setupmarkupstyle{tex}%
@@ -5948,6 +6166,10 @@ end
   \catcode`\'=\other
   \escapechar=`\\
   %
+  % ' is active in math mode (mathcode"8000).  So reset it, and all our
+  % other math active characters (just in case), to plain's definitions.
+  \mathactive
+  %
   \let\b=\ptexb
   \let\bullet=\ptexbullet
   \let\c=\ptexc
@@ -6150,41 +6372,42 @@ end
 }
 
 % We often define two environments, @foo and @smallfoo.
-% Let's do it by one command:
-\def\makedispenv #1#2{
-  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
-  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+% Let's do it in one command.  #1 is the env name, #2 the definition.
+\def\makedispenvdef#1#2{%
+  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
+  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
   \expandafter\let\csname E#1\endcsname \afterenvbreak
   \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
 }
 
-% Define two synonyms:
-\def\maketwodispenvs #1#2#3{
-  \makedispenv{#1}{#3}
-  \makedispenv{#2}{#3}
+% Define two environment synonyms (#1 and #2) for an environment.
+\def\maketwodispenvdef#1#2#3{%
+  \makedispenvdef{#1}{#3}%
+  \makedispenvdef{#2}{#3}%
 }
-
-% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @lisp: indented, narrowed, typewriter font;
+% @example: same as @lisp.
 %
 % @smallexample and @smalllisp: use smaller fonts.
 % Originally contributed by address@hidden
 %
-\maketwodispenvs {lisp}{example}{%
+\maketwodispenvdef{lisp}{example}{%
   \nonfillstart
   \tt\setupmarkupstyle{example}%
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
-  \gobble       % eat return
+  \gobble % eat return
 }
 % @display/@smalldisplay: same as @lisp except keep current font.
 %
-\makedispenv {display}{%
+\makedispenvdef{display}{%
   \nonfillstart
   \gobble
 }
 
 % @format/@smallformat: same as @display except don't narrow margins.
 %
-\makedispenv{format}{%
+\makedispenvdef{format}{%
   \let\nonarrowing = t%
   \nonfillstart
   \gobble
@@ -6203,7 +6426,7 @@ end
 \envdef\flushright{%
   \let\nonarrowing = t%
   \nonfillstart
-  \advance\leftskip by 0pt plus 1fill
+  \advance\leftskip by 0pt plus 1fill\relax
   \gobble
 }
 \let\Eflushright = \afterenvbreak
@@ -6238,6 +6461,8 @@ end
 % we're doing normal filling.  So, when using \aboveenvbreak and
 % \afterenvbreak, temporarily make \parskip 0.
 %
+\makedispenvdef{quotation}{\quotationstart}
+%
 \def\quotationstart{%
   {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
   \parindent=0pt
@@ -6253,28 +6478,18 @@ end
   \parsearg\quotationlabel
 }
 
-\envdef\quotation{%
-  \setnormaldispenv
-  \quotationstart
-}
-
-\envdef\smallquotation{%
-  \setsmalldispenv
-  \quotationstart
-}
-\let\Esmallquotation = \Equotation
-
 % We have retained a nonzero parskip for the environment, since we're
 % doing normal filling.
 %
 \def\Equotation{%
   \par
-  \ifx\quotationauthor\undefined\else
+  \ifx\quotationauthor\thisisundefined\else
     % indent a bit.
     \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
   \fi
   {\parskip=0pt \afterenvbreak}%
 }
+\def\Esmallquotation{\Equotation}
 
 % If we're given an argument, typeset it in bold with a colon after.
 \def\quotationlabel#1{%
@@ -6331,21 +6546,28 @@ end
 
 % Setup for the @verbatim environment
 %
-% Real tab expansion
+% Real tab expansion.
 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
 %
-\def\starttabbox{\setbox0=\hbox\bgroup}
+% We typeset each line of the verbatim in an \hbox, so we can handle
+% tabs.  The \global is in case the verbatim line starts with an accent,
+% or some other command that starts with a begin-group.  Otherwise, the
+% entire \verbbox would disappear at the corresponding end-group, before
+% it is typeset.  Meanwhile, we can't have nested verbatim commands
+% (can we?), so the \global won't be overwriting itself.
+\newbox\verbbox
+\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
 %
 \begingroup
   \catcode`\^^I=\active
   \gdef\tabexpand{%
     \catcode`\^^I=\active
     \def^^I{\leavevmode\egroup
-      \dimen0=\wd0 % the width so far, or since the previous tab
-      \divide\dimen0 by\tabw
-      \multiply\dimen0 by\tabw % compute previous multiple of \tabw
-      \advance\dimen0 by\tabw  % advance to next multiple of \tabw
-      \wd0=\dimen0 \box0 \starttabbox
+      \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
+      \divide\dimen\verbbox by\tabw
+      \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
+      \advance\dimen\verbbox by\tabw  % advance to next multiple of \tabw
+      \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
     }%
   }
 \endgroup
@@ -6354,15 +6576,16 @@ end
 \def\setupverbatim{%
   \let\nonarrowing = t%
   \nonfillstart
-  % Easiest (and conventionally used) font for verbatim
-  \tt
-  \def\par{\leavevmode\egroup\box0\endgraf}%
+  \tt % easiest (and conventionally used) font for verbatim
+  % The \leavevmode here is for blank lines.  Otherwise, we would
+  % never \starttabox and the \egroup would end verbatim mode.
+  \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
   \tabexpand
   \setupmarkupstyle{verbatim}%
   % Respect line breaks,
   % print special symbols as themselves, and
-  % make each space count
-  % must do in this order:
+  % make each space count.
+  % Must do in this order:
   \obeylines \uncatcodespecials \sepspaces
   \everypar{\starttabbox}%
 }
@@ -6419,6 +6642,7 @@ end
     \makevalueexpandable
     \setupverbatim
     \indexnofonts       % Allow `@@' and other weird things in file names.
+    \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
     \input #1
     \afterenvbreak
   }%
@@ -6468,7 +6692,7 @@ end
     % commands also insert a nobreak penalty, and we don't want to allow
     % a break between a section heading and a defun.
     %
-    % As a minor refinement, we avoid "club" headers by signalling
+    % As a further refinement, we avoid "club" headers by signalling
     % with penalty of 10003 after the very first @deffn in the
     % sequence (see above), and penalty of 10002 after any following
     % @def command.
@@ -6505,7 +6729,7 @@ end
     #1#2 \endheader
     % common ending:
     \interlinepenalty = 10000
-    \advance\rightskip by 0pt plus 1fil
+    \advance\rightskip by 0pt plus 1fil\relax
     \endgraf
     \nobreak\vskip -\parskip
     \penalty\defunpenalty  % signal to \startdefun and \dodefunx
@@ -6535,13 +6759,36 @@ end
 \def\domakedefun#1#2#3{%
   \envdef#1{%
     \startdefun
+    \doingtypefnfalse    % distinguish typed functions from all else
     \parseargusing\activeparens{\printdefunline#3}%
   }%
   \def#2{\dodefunx#1}%
   \def#3%
 }
 
-%%% Untyped functions:
+\newif\ifdoingtypefn       % doing typed function?
+\newif\ifrettypeownline    % typeset return type on its own line?
+
+% @deftypefnnewline on|off says whether the return type of typed functions
+% are printed on their own line.  This affects @deftypefn, @deftypefun,
+% @deftypeop, and @deftypemethod.
+% 
+\parseargdef\deftypefnnewline{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETtxideftypefnnl\endcsname
+      = \empty
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETtxideftypefnnl\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @txideftypefnnl value `\temp',
+                must be on|off}%
+  \fi\fi
+}
+
+% Untyped functions:
 
 % @deffn category name args
 \makedefun{deffn}{\deffngeneral{}}
@@ -6560,7 +6807,7 @@ end
   \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
 }
 
-%%% Typed functions:
+% Typed functions:
 
 % @deftypefn category type name args
 \makedefun{deftypefn}{\deftypefngeneral{}}
@@ -6575,10 +6822,11 @@ end
 %
 \def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
   \dosubind{fn}{\code{#4}}{#1}%
+  \doingtypefntrue
   \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
 }
 
-%%% Typed variables:
+% Typed variables:
 
 % @deftypevr category type var args
 \makedefun{deftypevr}{\deftypecvgeneral{}}
@@ -6596,7 +6844,7 @@ end
   \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
 }
 
-%%% Untyped variables:
+% Untyped variables:
 
 % @defvr category var args
 \makedefun{defvr}#1 {\deftypevrheader{#1} {} }
@@ -6607,7 +6855,8 @@ end
 % \defcvof {category of}class var args
 \def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
 
-%%% Type:
+% Types:
+
 % @deftp category name args
 \makedefun{deftp}#1 #2 #3\endheader{%
   \doind{tp}{\code{#2}}%
@@ -6635,25 +6884,49 @@ end
 % We are followed by (but not passed) the arguments, if any.
 %
 \def\defname#1#2#3{%
+  \par
   % Get the values of \leftskip and \rightskip as they were outside the @def...
   \advance\leftskip by -\defbodyindent
   %
-  % How we'll format the type name.  Putting it in brackets helps
+  % Determine if we are typesetting the return type of a typed function
+  % on a line by itself.
+  \rettypeownlinefalse
+  \ifdoingtypefn  % doing a typed function specifically?
+    % then check user option for putting return type on its own line:
+    \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
+      \rettypeownlinetrue
+    \fi
+  \fi
+  %
+  % How we'll format the category name.  Putting it in brackets helps
   % distinguish it from the body text that may end up on the next line
   % just below it.
   \def\temp{#1}%
   \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
   %
-  % Figure out line sizes for the paragraph shape.
+  % Figure out line sizes for the paragraph shape.  We'll always have at
+  % least two.
+  \tempnum = 2
+  %
   % The first line needs space for \box0; but if \rightskip is nonzero,
   % we need only space for the part of \box0 which exceeds it:
   \dimen0=\hsize  \advance\dimen0 by -\wd0  \advance\dimen0 by \rightskip
+  %
+  % If doing a return type on its own line, we'll have another line.
+  \ifrettypeownline
+    \advance\tempnum by 1
+    \def\maybeshapeline{0in \hsize}%
+  \else
+    \def\maybeshapeline{}%
+  \fi
+  %
   % The continuations:
   \dimen2=\hsize  \advance\dimen2 by -\defargsindent
-  % (plain.tex says that \dimen1 should be used only as global.)
-  \parshape 2 0in \dimen0 \defargsindent \dimen2
   %
-  % Put the type name to the right margin.
+  % The final paragraph shape:
+  \parshape \tempnum  0in \dimen0  \maybeshapeline  \defargsindent \dimen2
+  %
+  % Put the category name at the right margin.
   \noindent
   \hbox to 0pt{%
     \hfil\box0 \kern-\hsize
@@ -6675,8 +6948,16 @@ end
     % . this still does not fix the ?` and !` ligatures, but so far no
     %   one has made identifiers using them :).
     \df \tt
-    \def\temp{#2}% return value type
-    \ifx\temp\empty\else \tclose{\temp} \fi
+    \def\temp{#2}% text of the return type
+    \ifx\temp\empty\else
+      \tclose{\temp}% typeset the return type
+      \ifrettypeownline
+        % put return type on its own line; prohibit line break following:
+        \hfil\vadjust{\nobreak}\break  
+      \else
+        \space  % type on same line, so just followed by a space
+      \fi
+    \fi           % no return type
     #3% output function name
   }%
   {\rm\enskip}% hskip 0.5 em of \tenrm
@@ -6794,7 +7075,7 @@ end
 
 % To do this right we need a feature of e-TeX, \scantokens,
 % which we arrange to emulate with a temporary file in ordinary TeX.
-\ifx\eTeXversion\undefined
+\ifx\eTeXversion\thisisundefined
   \newwrite\macscribble
   \def\scantokens#1{%
     \toks0={#1}%
@@ -6805,25 +7086,30 @@ end
   }
 \fi
 
-\def\scanmacro#1{%
-  \begingroup
-    \newlinechar`\^^M
-    \let\xeatspaces\eatspaces
-    % Undo catcode changes of \startcontents and \doprintindex
-    % When called from @insertcopying or (short)caption, we need active
-    % backslash to get it printed correctly.  Previously, we had
-    % \catcode`\\=\other instead.  We'll see whether a problem appears
-    % with macro expansion.                            --kasal, 19aug04
-    address@hidden \catcode`\\=\active \escapechar=`\@
-    % ... and \example
-    \spaceisspace
-    %
-    % Append \endinput to make sure that TeX does not see the ending newline.
-    % I've verified that it is necessary both for e-TeX and for ordinary TeX
-    %                                                  --kasal, 29nov03
-    \scantokens{#1\endinput}%
-  \endgroup
-}
+\def\scanmacro#1{\begingroup
+  \newlinechar`\^^M
+  \let\xeatspaces\eatspaces
+  %
+  % Undo catcode changes of \startcontents and \doprintindex
+  % When called from @insertcopying or (short)caption, we need active
+  % backslash to get it printed correctly.  Previously, we had
+  % \catcode`\\=\other instead.  We'll see whether a problem appears
+  % with macro expansion.                              --kasal, 19aug04
+  address@hidden \catcode`\\=\active \escapechar=`\@
+  %
+  % ... and for \example:
+  \spaceisspace
+  %
+  % The \empty here causes a following catcode 5 newline to be eaten as
+  % part of reading whitespace after a control sequence.  It does not
+  % eat a catcode 13 newline.  There's no good way to handle the two
+  % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
+  % would then have different behavior).  See the Macro Details node in
+  % the manual for the workaround we recommend for macros and
+  % line-oriented commands.
+  % 
+  \scantokens{#1\empty}%
+\endgroup}
 
 \def\scanexp#1{%
   \edef\temp{\noexpand\scanmacro{#1}}%
@@ -6877,17 +7163,18 @@ end
 
 % Macro bodies are absorbed as an argument in a context where
 % all characters are catcode 10, 11 or 12, except \ which is active
-% (as in normal texinfo). It is necessary to change the definition of \.
-
+% (as in normal texinfo). It is necessary to change the definition of \
+% to recognize macro arguments; this is the job of \mbodybackslash.
+%
 % Non-ASCII encodings make 8-bit characters active, so un-activate
 % them to avoid their expansion.  Must do this non-globally, to
 % confine the change to the current group.
-
+%
 % It's necessary to have hard CRs when the macro is executed. This is
-% done by  making ^^M (\endlinechar) catcode 12 when reading the macro
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
 % body, and then making it the \newlinechar in \scanmacro.
-
-\def\scanctxt{%
+%
+\def\scanctxt{% used as subroutine
   \catcode`\"=\other
   \catcode`\+=\other
   \catcode`\<=\other
@@ -6900,13 +7187,13 @@ end
   \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
 }
 
-\def\scanargctxt{%
+\def\scanargctxt{% used for copying and captions, not macros.
   \scanctxt
   \catcode`\\=\other
   \catcode`\^^M=\other
 }
 
-\def\macrobodyctxt{%
+\def\macrobodyctxt{% used for @macro definitions
   \scanctxt
   \catcode`\{=\other
   \catcode`\}=\other
@@ -6914,30 +7201,48 @@ end
   \usembodybackslash
 }
 
-\def\macroargctxt{%
+\def\macroargctxt{% used when scanning invocations
   \scanctxt
-  \catcode`\\=\other
+  \catcode`\\=0
 }
+% why catcode 0 for \ in the above?  To recognize \\ \{ \} as "escapes"
+% for the single characters \ { }.  Thus, we end up with the "commands"
+% that would be written @\ @{ @} in a Texinfo document.
+% 
+% We already have @{ and @}.  For @\, we define it here, and only for
+% this purpose, to produce a typewriter backslash (so, the @\ that we
+% define for @math can't be used with @macro calls):
+%
+\def\\{\normalbackslash}%
+% 
+% We would like to do this for \, too, since that is what makeinfo does.
+% But it is not possible, because Texinfo already has a command @, for a
+% cedilla accent.  Documents must use @comma{} instead.
+%
+% \anythingelse will almost certainly be an error of some kind.
+
 
 % \mbodybackslash is the definition of \ in @macro bodies.
 % It maps \foo\ => \csname macarg.foo\endcsname => #N
 % where N is the macro parameter number.
 % We define \csname macarg.\endcsname to be \realbackslash, so
 % \\ in macro replacement text gets you a backslash.
-
+%
 address@hidden @address@hidden@active
  @address@hidden@address@hidden
  @address@hidden@csname address@hidden
 }
 \expandafter\def\csname macarg.\endcsname{\realbackslash}
 
+\def\margbackslash#1{\char`\#1 }
+
 \def\macro{\recursivefalse\parsearg\macroxxx}
 \def\rmacro{\recursivetrue\parsearg\macroxxx}
 
 \def\macroxxx#1{%
-  \getargs{#1}%           now \macname is the macname and \argl the arglist
+  \getargs{#1}% now \macname is the macname and \argl the arglist
   \ifx\argl\empty       % no arguments
-     \paramno=0%
+     \paramno=0
   \else
      \expandafter\parsemargdef \argl;%
   \fi
@@ -6986,28 +7291,32 @@ end
 % an opening brace, and that opening brace is not consumed.
 \def\getargs#1{\getargsxxx#1{}}
 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
-\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacname#1 #2\relax{\macname={#1}}
 \def\getmacargs#1{\def\argl{#1}}
 
 % Parse the optional {params} list.  Set up \paramno and \paramlist
 % so \defmacro knows what to do.  Define \macarg.blah for each blah
-% in the params list, to be ##N where N is the position in that list.
+% in the params list to be ##N where N is the position in that list.
 % That gets used by \mbodybackslash (above).
-
+%
 % We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX:  let \hash be something
+% The technique used is stolen from LaTeX: let \hash be something
 % unexpandable, insert that wherever you need a #, and then redefine
 % it to # just before using the token list produced.
 %
 % The same technique is used to protect \eatspaces till just before
 % the macro is used.
 
-\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
-        \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+\def\parsemargdef#1;{%
+  \paramno=0\def\paramlist{}%
+  \let\hash\relax
+  \let\xeatspaces\relax
+  \parsemargdefxxx#1,;,%
+}
 \def\parsemargdefxxx#1,{%
   \if#1;\let\next=\relax
   \else \let\next=\parsemargdefxxx
-    \advance\paramno by 1%
+    \advance\paramno by 1
     \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
         {\xeatspaces{\hash\the\paramno}}%
     \edef\paramlist{\paramlist\hash\the\paramno,}%
@@ -7015,7 +7324,7 @@ end
 
 % These two commands read recursive and nonrecursive macro bodies.
 % (They're different since rec and nonrec macros end differently.)
-
+%
 address@hidden macro%
 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
 address@hidden rmacro%
@@ -7026,6 +7335,7 @@ end
 % Much magic with \expandafter here.
 % \xdef is used so that macro definitions will survive the file
 % they're defined in; @include reads the file inside a group.
+%
 \def\defmacro{%
   \let\hash=##% convert placeholders to macro parameter chars
   \ifrecursive
@@ -7089,7 +7399,8 @@ end
 % \braceorline decides whether the next nonwhitespace character is a
 % {.  If so it reads up to the closing }, if not, it reads the whole
 % line.  Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg)
+% as an argument (by \parsebrace or \parsearg).
+% 
 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
   \ifx\nchar\bgroup\else
@@ -7099,7 +7410,8 @@ end
 
 % @alias.
 % We need some trickery to remove the optional spaces around the equal
-% sign.  Just make them active and then expand them all to nothing.
+% sign.  Make them active and then expand them all to nothing.
+%
 \def\alias{\parseargusing\obeyspaces\aliasxxx}
 \def\aliasxxx #1{\aliasyyy#1\relax}
 \def\aliasyyy #1=#2\relax{%
@@ -7120,7 +7432,8 @@ end
 
 % @inforef is relatively simple.
 \def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} 
\file{\ignorespaces #3{}},
+\def\inforefzzz #1,#2,#3,#4**{%
+  \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
   node \samp{\ignorespaces#1{}}}
 
 % @node's only job in TeX is to define \lastnode, which is used in
@@ -7181,11 +7494,32 @@ end
       \toks0 = \expandafter{\lastsection}%
       \immediate \writexrdef{title}{\the\toks0 }%
       \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
-      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during 
\shipout
+      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
     }%
   \fi
 }
 
+% @xrefautosectiontitle on|off says whether @section(ing) names are used
+% automatically in xrefs, if the third arg is not explicitly specified.
+% This was provided as a "secret" @set xref-automatic-section-title
+% variable, now it's official.
+% 
+\parseargdef\xrefautomaticsectiontitle{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETxref-automatic-section-title\endcsname
+      = \empty
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETxref-automatic-section-title\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
+                must be on|off}%
+  \fi\fi
+}
+
+
 % @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
 % the node name, #2 the name of the Info cross-reference, #3 the printed
 % node name, #4 the name of the Info file, #5 the name of the printed
@@ -7202,7 +7536,7 @@ end
   \setbox0=\hbox{\printedrefname\unskip}%
   \ifdim \wd0 = 0pt
     % No printed node name was explicitly given.
-    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
+    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
       % Use the node name inside the square brackets.
       \def\printedrefname{\ignorespaces #1}%
     \else
@@ -7357,7 +7691,8 @@ end
     \angleleft un\-de\-fined\angleright
     \iflinks
       \ifhavexrefs
-        \message{\linenumber Undefined cross reference `#1'.}%
+        {\toks0 = {#1}% avoid expansion of possibly-complex value
+         \message{\linenumber Undefined cross reference `\the\toks0'.}}%
       \else
         \ifwarnedxrefs\else
           \global\warnedxrefstrue
@@ -7671,7 +8006,7 @@ end
   it from ftp://tug.org/tex/epsf.tex.}
 %
 \def\image#1{%
-  \ifx\epsfbox\undefined
+  \ifx\epsfbox\thisiundefined
     \ifwarnednoepsf \else
       \errhelp = \noepsfhelp
       \errmessage{epsf.tex not found, images will be ignored}%
@@ -7687,7 +8022,7 @@ end
 % #2 is (optional) width, #3 is (optional) height.
 % #4 is (ignored optional) html alt text.
 % #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing this stuff.
+% #6 is just the usual extra ignored arg for parsing stuff.
 \newif\ifimagevmode
 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
   \catcode`\^^M = 5     % in case we're inside an example
@@ -8136,7 +8471,7 @@ directory should work if nowhere else does.}
 %
 % Latin1 (ISO-8859-1) character definitions.
 \def\latonechardefs{%
-  \gdef^^a0{~}
+  \gdef^^a0{\tie}
   \gdef^^a1{\exclamdown}
   \gdef^^a2{\missingcharmsg{CENT SIGN}}
   \gdef^^a3{{\pounds}}
@@ -8166,7 +8501,7 @@ directory should work if nowhere else does.}
   \gdef^^b9{$^1$}
   \gdef^^ba{\ordm}
   %
-  \gdef^^bb{\guilletright}
+  \gdef^^bb{\guillemetright}
   \gdef^^bc{$1\over4$}
   \gdef^^bd{$1\over2$}
   \gdef^^be{$3\over4$}
@@ -8258,7 +8593,7 @@ directory should work if nowhere else does.}
 
 % Latin2 (ISO-8859-2) character definitions.
 \def\lattwochardefs{%
-  \gdef^^a0{~}
+  \gdef^^a0{\tie}
   \gdef^^a1{\ogonek{A}}
   \gdef^^a2{\u{}}
   \gdef^^a3{\L}
@@ -8339,8 +8674,8 @@ directory should work if nowhere else does.}
   \gdef^^ea{\ogonek{e}}
   \gdef^^eb{\"e}
   \gdef^^ec{\v e}
-  \gdef^^ed{\'\i}
-  \gdef^^ee{\^\i}
+  \gdef^^ed{\'{\dotless{i}}}
+  \gdef^^ee{\^{\dotless{i}}}
   \gdef^^ef{\v d}
   %
   \gdef^^f0{\dh}
@@ -8431,7 +8766,7 @@ directory should work if nowhere else does.}
 
   \gdef\DeclareUnicodeCharacter#1#2{%
     \countUTFz = "#1\relax
-    \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+    %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
     \begingroup
       \parseXMLCharref
       \def\UTFviiiTwoOctets##1##2{%
@@ -8899,8 +9234,8 @@ directory should work if nowhere else does.}
 % Prevent underfull vbox error messages.
 \vbadness = 10000
 
-% Don't be so finicky about underfull hboxes, either.
-\hbadness = 2000
+% Don't be very finicky about underfull hboxes, either.
+\hbadness = 6666
 
 % Following George Bush, get rid of widows and orphans.
 \widowpenalty=10000
@@ -9107,28 +9442,21 @@ directory should work if nowhere else does.}
 
 \message{and turning on texinfo input format.}
 
+\def^^L{\par} % remove \outer, so ^L can appear in an @comment
+
 % DEL is a comment character, in case @c does not suffice.
 \catcode`\^^? = 14
 
 % Define macros to output various characters with catcode for normal text.
-\catcode`\"=\other
-\catcode`\~=\other
-\catcode`\^=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode`\+=\other
-\catcode`\$=\other
-\def\normaldoublequote{"}
-\def\normaltilde{~}
-\def\normalcaret{^}
-\def\normalunderscore{_}
-\def\normalverticalbar{|}
-\def\normalless{<}
-\def\normalgreater{>}
-\def\normalplus{+}
-\def\normaldollar{$}%$ font-lock fix
+\catcode`\"=\other \def\normaldoublequote{"}
+\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
+\catcode`\+=\other \def\normalplus{+}
+\catcode`\<=\other \def\normalless{<}
+\catcode`\>=\other \def\normalgreater{>}
+\catcode`\^=\other \def\normalcaret{^}
+\catcode`\_=\other \def\normalunderscore{_}
+\catcode`\|=\other \def\normalverticalbar{|}
+\catcode`\~=\other \def\normaltilde{~}
 
 % This macro is used to make a character print one way in \tt
 % (where it can probably be output as-is), and another way in other fonts,
@@ -9221,16 +9549,16 @@ directory should work if nowhere else does.}
 % the literal character `\'.
 %
 @address@hidden
-  @address@hidden
   @let"address@hidden
-  @address@hidden
+  @address@hidden %$ font-lock fix
+  @address@hidden
+  @let<address@hidden
+  @let>address@hidden
+  @address@hidden
   @address@hidden
   @address@hidden
   @let|address@hidden
-  @let<address@hidden
-  @let>address@hidden
-  @address@hidden
-  @address@hidden %$ font-lock fix
+  @address@hidden
   @markupsetuplqdefault
   @markupsetuprqdefault
   @unsepspaces
@@ -9262,10 +9590,16 @@ directory should work if nowhere else does.}
 % Say @foo, not \foo, in error messages.
 @escapechar = `@@
 
+% These (along with & and #) are made active for url-breaking, so need
+% active definitions as the normal characters.
address@hidden@normaldot{.}
address@hidden@normalquest{?}
address@hidden@normalslash{/}
+
 % These look ok in all fonts, so just make them not special.
address@hidden@& = @other
address@hidden@# = @other
address@hidden@% = @other
address@hidden@& = @other @address@hidden&}
address@hidden@# = @other @address@hidden
address@hidden@% = @other @address@hidden
 
 @c Finally, make ` and ' active, so that txicodequoteundirected and
 @c txicodequotebacktick work right in, e.g., @address@hidden'}}.  If we
diff --git a/lib/ylwrap b/lib/ylwrap
index 92b2011..9253635 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -1,10 +1,10 @@
 #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.
 
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-08-25.18; # UTC
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2007, 2009, 2010 Free Software Foundation, Inc.
+# 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
 #
 # Written by Tom Tromey <address@hidden>.
 #
@@ -137,19 +137,19 @@ if test $ret -eq 0; then
     # Handle y_tab.c and y_tab.h output by DOS
     if test $y_tab_nodot = "yes"; then
       if test $from = "y.tab.c"; then
-       from="y_tab.c"
+        from="y_tab.c"
       else
-       if test $from = "y.tab.h"; then
-         from="y_tab.h"
-       fi
+        if test $from = "y.tab.h"; then
+          from="y_tab.h"
+        fi
       fi
     fi
     if test -f "$from"; then
       # If $2 is an absolute path name, then just use that,
       # otherwise prepend `../'.
       case "$2" in
-       [\\/]* | ?:[\\/]*) target="$2";;
-       *) target="../$2";;
+        [\\/]* | ?:[\\/]*) target="$2";;
+        *) target="../$2";;
       esac
 
       # We do not want to overwrite a header file if it hasn't
@@ -159,8 +159,8 @@ if test $ret -eq 0; then
       # Makefile.  Divert the output of all other files to a temporary
       # file so we can compare them to existing versions.
       if test $first = no; then
-       realtarget="$target"
-       target="tmp-`echo $target | sed s/.*[\\/]//g`"
+        realtarget="$target"
+        target="tmp-`echo $target | sed s/.*[\\/]//g`"
       fi
       # Edit out `#line' or `#' directives.
       #
@@ -184,10 +184,10 @@ if test $ret -eq 0; then
 
       # Check whether header files must be updated.
       if test $first = no; then
-       if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
-         echo "$2" is unchanged
-         rm -f "$target"
-       else
+        if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+          echo "$2" is unchanged
+          rm -f "$target"
+        else
           echo updating "$2"
           mv -f "$target" "$realtarget"
         fi
diff --git a/m4/.cvsignore b/m4/.cvsignore
deleted file mode 100644
index f3c7a7c..0000000
--- a/m4/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 270ee91..ff4dd43 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,6 +141,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -330,10 +333,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/m4/amversion.in b/m4/amversion.in
index 0ca73cf..61a86ab 100644
--- a/m4/amversion.in
+++ b/m4/amversion.in
@@ -1,11 +1,14 @@
 ##                                                          -*- Autoconf -*-
 ## @configure_input@
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, 
Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
diff --git a/m4/amversion.m4 b/m4/amversion.m4
index aae0c28..9fd3c1e 100644
--- a/m4/amversion.m4
+++ b/m4/amversion.m4
@@ -1,11 +1,14 @@
 ##                                                          -*- Autoconf -*-
 ## Generated from amversion.in; do not edit by hand.
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, 
Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
diff --git a/m4/auxdir.m4 b/m4/auxdir.m4
index 091e3b7..4b810b0 100644
--- a/m4/auxdir.m4
+++ b/m4/auxdir.m4
@@ -1,11 +1,13 @@
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
diff --git a/m4/depend.m4 b/m4/depend.m4
index 652c4c0..359c349 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -1,12 +1,12 @@
 ##                                                          -*- Autoconf -*-
 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010  Free Software Foundation, Inc.
+# 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 11
+# serial 12
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -46,6 +46,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
diff --git a/m4/dmalloc.m4 b/m4/dmalloc.m4
index 4499015..aea5f9d 100644
--- a/m4/dmalloc.m4
+++ b/m4/dmalloc.m4
@@ -3,20 +3,19 @@
 ## From Franc,ois Pinard               ##
 ## ----------------------------------- ##
 
-# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2010
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 AC_DEFUN([AM_WITH_DMALLOC],
 [AC_MSG_CHECKING([if malloc debugging is wanted])
 AC_ARG_WITH(dmalloc,
-[  --with-dmalloc          use dmalloc, as in
-                         http://www.dmalloc.com/dmalloc.tar.gz],
+[  --with-dmalloc          use dmalloc, as in http://www.dmalloc.com],
 [if test "$withval" = yes; then
   AC_MSG_RESULT(yes)
   AC_DEFINE(WITH_DMALLOC,1,
diff --git a/m4/gcj.m4 b/m4/gcj.m4
index 9e930e0..49dbe1f 100644
--- a/m4/gcj.m4
+++ b/m4/gcj.m4
@@ -1,12 +1,15 @@
 # Check for Java compiler.                                  -*- Autoconf -*-
 # For now we only handle the GNU compiler.
 
-# Copyright (C) 1999, 2000, 2003, 2005, 2009  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2005, 2009, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 AC_DEFUN([AM_PROG_GCJ],[
 AC_CHECK_TOOLS(GCJ, gcj, gcj)
 test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
diff --git a/m4/install-sh.m4 b/m4/install-sh.m4
index b153715..20d71c6 100644
--- a/m4/install-sh.m4
+++ b/m4/install-sh.m4
@@ -1,10 +1,13 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
index be8a9de..152d7fb 100644
--- a/m4/mkdirp.m4
+++ b/m4/mkdirp.m4
@@ -1,10 +1,13 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_MKDIR_P
 # ---------------
 # Check for `mkdir -p'.
diff --git a/m4/protos.m4 b/m4/protos.m4
index 427193b..f710293 100644
--- a/m4/protos.m4
+++ b/m4/protos.m4
@@ -13,6 +13,8 @@
 
 AC_DEFUN([AM_C_PROTOTYPES],
 [AC_REQUIRE([AC_C_PROTOTYPES])
+AC_DIAGNOSE([obsolete],
+            [$0: automatic de-ANSI-fication support is deprecated])
 if test "$ac_cv_prog_cc_stdc" != no; then
   U= ANSI2KNR=
 else
diff --git a/m4/python.m4 b/m4/python.m4
index 1dc3985..89f2dfb 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -3,13 +3,15 @@
 ## From Andrew Dalke
 ## Updated by James Henstridge
 ## ------------------------
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009,
+# 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # ---------------------------------------------------------------------------
 # Adds support for distributing Python modules and packages.  To
@@ -37,8 +39,10 @@ AC_DEFUN([AM_PATH_PYTHON],
   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
   dnl supported. (2.0 was released on October 16, 2000).
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-                    [python python2 python3 python3.1 python3.0 python2.6 
python2.5 python2.4 python2.3 python2.2 dnl
-python2.1 python2.0])
+[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
+ python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
+
+  AC_ARG_VAR([PYTHON], [the Python interpreter])
 
   m4_if([$1],[],[
     dnl No version check is needed.
diff --git a/m4/runlog.m4 b/m4/runlog.m4
index c3608fb..0bfd30d 100644
--- a/m4/runlog.m4
+++ b/m4/runlog.m4
@@ -1,10 +1,12 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_RUN_LOG(COMMAND)
 # -------------------
 # Run COMMAND, save the exit status in ac_status, and log it.
diff --git a/m4/strip.m4 b/m4/strip.m4
index 43435dc..e73f607 100644
--- a/m4/strip.m4
+++ b/m4/strip.m4
@@ -1,10 +1,12 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
 # One issue with vendor `install' (even GNU) is that you can't
diff --git a/m4/upc.m4 b/m4/upc.m4
index a819ea7..23a8c0b 100644
--- a/m4/upc.m4
+++ b/m4/upc.m4
@@ -1,11 +1,13 @@
 # Find a compiler for Unified Parallel C.                  -*- Autoconf -*-
 
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 AC_DEFUN([AM_PROG_UPC],
 [dnl We need OBJEXT and EXEEXT, but Autoconf doesn't offer any public
 dnl macro to compute them.  Use AC_PROG_CC instead.
diff --git a/tests/.cvsignore b/tests/.cvsignore
deleted file mode 100644
index 69d3d43..0000000
--- a/tests/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.log
-Makefile
-aclocal
-automake
-defs
-diffs
-log
-*.dir
-aclocal-*
-automake-*
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 816405a..f1fd4ce 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,11 +16,14 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-XFAIL_TESTS =                                  \
-all.test                                       \
-auxdir2.test                                   \
-cond17.test                                    \
-gcj6.test                                      \
+XFAIL_TESTS = \
+all.test \
+auxdir2.test \
+cond17.test \
+gcj6.test \
+pr8365-remake-timing.test \
+yacc-dist-nobuild-subdir.test \
+vala-vpath.test \
 txinfo5.test
 
 include $(srcdir)/parallel-tests.am
@@ -36,7 +39,16 @@ $(parallel_tests): $(parallel_tests:-p.test=.test) 
Makefile.am
 
 MAINTAINERCLEANFILES = $(parallel_tests)
 
+# Some testsuite-influential variables should be overridable from the
+# test scripts, but not from the environment.
+TESTS_ENVIRONMENT = \
+  test x"$$me" = x || unset me; \
+  test x"$$required" = x || unset required; \
+  test x"$$parallel_tests" = x || unset parallel_tests;
+
 TESTS = \
+self-check-env-sanitize.test \
+self-check-report.test \
 aclibobj.test \
 aclocal.test \
 aclocal3.test \
@@ -69,14 +81,19 @@ acsilent.test \
 acsubst.test \
 acsubst2.test \
 all.test \
+all2.test \
 alloca.test \
 alloca2.test \
 alpha.test \
 alpha2.test \
+amhello-cflags.test \
+amhello-cross-compile.test \
+amhello-binpkg.test \
 amassign.test \
 ammissing.test \
 amopt.test \
 amsubst.test \
+ansi2knr-deprecation.test \
 ansi.test \
 ansi2.test \
 ansi3.test \
@@ -94,10 +111,20 @@ ar2.test \
 asm.test \
 asm2.test \
 asm3.test \
+autodist.test \
+autodist-subdir.test \
+autodist-acconfig.test \
+autodist-acconfig-no-subdir.test \
+autodist-aclocal-m4.test \
+autodist-config-headers.test \
+autodist-configure-no-subdir.test \
+autodist-no-duplicate.test \
+autodist-stamp-vti.test \
 autohdr.test \
 autohdr2.test \
 autohdr3.test \
 autohdr4.test \
+autohdrdry.test \
 automake.test \
 auxdir.test \
 auxdir2.test \
@@ -132,6 +159,11 @@ check8.test \
 check9.test \
 check10.test \
 check11.test \
+check-exported-srcdir.test \
+check-tests-in-builddir.test \
+check-tests_environment.test \
+check-concurrency-bug9245.test \
+tests-environment-backcompat.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -157,6 +189,7 @@ comment8.test \
 comment9.test \
 commen10.test \
 commen11.test \
+comments-in-var-def.test \
 compile.test \
 compile2.test \
 compile3.test \
@@ -211,20 +244,23 @@ cond44.test \
 cond45.test \
 condd.test \
 condhook.test \
+condhook2.test \
 condinc.test \
 condinc2.test \
 condlib.test \
 condman.test \
 condman2.test \
+condman3.test \
 configure.test \
-conf2.test \
 confdeps.test \
 conff.test \
 conff2.test \
 confh.test \
 confh4.test \
 confh5.test \
-config.test \
+confh6.test \
+confh7.test \
+confh8.test \
 confincl.test \
 conflnk.test \
 conflnk2.test \
@@ -262,6 +298,10 @@ depcomp4.test \
 depcomp5.test \
 depcomp6.test \
 depcomp7.test \
+depcomp8a.test \
+depcomp8b.test \
+depcomp9.test \
+depcomp10.test \
 depdist.test \
 depend.test \
 depend2.test \
@@ -270,10 +310,10 @@ depend4.test \
 depend5.test \
 depend6.test \
 destdir.test \
-dirforbid.test \
 dirlist.test \
 dirlist2.test \
 discover.test \
+dist-included-parent-dir.test \
 distcleancheck.test \
 distcom2.test \
 distcom3.test \
@@ -285,6 +325,14 @@ distdir.test \
 distlinks.test \
 distlinksbrk.test \
 distname.test \
+distcheck-configure-flags.test \
+distcheck-configure-flags-am.test \
+distcheck-configure-flags-subpkg.test \
+distcheck-hook.test \
+distcheck-hook2.test \
+dmalloc.test \
+doc-parsing-buglets-colneq-subst.test \
+doc-parsing-buglets-tabs.test \
 dollar.test \
 dollarvar.test \
 dollarvar2.test \
@@ -331,8 +379,6 @@ fort4.test \
 fort5.test \
 fonly.test \
 fortdep.test \
-fpinst2.test \
-fpinstall.test \
 gcj.test \
 gcj2.test \
 gcj3.test \
@@ -349,13 +395,26 @@ gnuwarn2.test \
 gnits.test \
 gnits2.test \
 gnits3.test \
+hdr-vars-defined-once.test \
 header.test \
 help.test \
+help2.test \
+help3.test \
+help4.test \
+help-depend.test \
+help-depend2.test \
+help-dmalloc.test \
+help-init.test \
+help-lispdir.test \
+help-maintainer.test \
+help-multilib.test \
+help-python.test \
+help-regex.test \
+help-silent.test \
+help-upc.test \
 hfs.test \
 hosts.test \
 implicit.test \
-include.test \
-include2.test \
 info.test \
 init.test \
 init2.test \
@@ -392,6 +451,8 @@ interp2.test \
 java.test \
 java2.test \
 java3.test \
+java-check.test \
+java-empty-classpath.test \
 javaprim.test \
 javasubst.test \
 ldadd.test \
@@ -401,6 +462,7 @@ lex2.test \
 lex3.test \
 lex4.test \
 lex5.test \
+lex-subobj-nodep.test \
 lflags.test \
 lflags2.test \
 libexec.test \
@@ -445,6 +507,7 @@ lisp5.test \
 lisp6.test \
 lisp7.test \
 lisp8.test \
+lispdry.test \
 listval.test \
 location.test \
 longline.test \
@@ -453,12 +516,15 @@ ltcond.test \
 ltcond2.test \
 ltconv.test \
 ltdeps.test \
+ltinit.test \
 ltinstloc.test \
 ltlibobjs.test \
 ltlibsrc.test \
 ltorder.test \
 lzma.test \
+m4-inclusion.test \
 maintclean.test \
+maintclean-vpath.test \
 make.test \
 makej.test \
 makej2.test \
@@ -472,12 +538,12 @@ man2.test \
 man3.test \
 man4.test \
 man5.test \
-mclean.test \
 mdate.test \
 mdate2.test \
 mdate3.test \
 mdate4.test \
 mdate5.test \
+mdate6.test \
 missing.test \
 missing2.test \
 missing3.test \
@@ -542,6 +608,13 @@ parallel-tests7.test \
 parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
+parallel-tests-harderror.test \
+parallel-tests-unreadable-log.test \
+parallel-tests-subdir.test \
+parallel-tests-log-override-1.test \
+parallel-tests-log-override-2.test \
+parallel-tests-log-override-recheck.test \
+parallel-tests-log-compiler-example.test \
 parse.test \
 percent.test \
 percent2.test \
@@ -556,6 +629,7 @@ pluseq7.test \
 pluseq8.test \
 pluseq9.test \
 pluseq10.test \
+pluseq11.test \
 postproc.test \
 ppf77.test \
 pr2.test \
@@ -583,6 +657,10 @@ prefix.test \
 primary.test \
 primary2.test \
 primary3.test \
+primary-prefix-invalid-couples.test \
+primary-prefix-valid-couples.test \
+primary-prefix-couples-force-valid.test \
+primary-prefix-couples-documented-valid.test \
 proginst.test \
 python.test \
 python2.test \
@@ -605,6 +683,12 @@ remake4.test \
 remake5.test \
 remake6.test \
 remake7.test \
+remake-subdir-from-subdir.test \
+remake-subdir-gnu.test \
+remake-subdir.test \
+remake-subdir2.test \
+remake-subdir-long-time.test \
+pr8365-remake-timing.test \
 regex.test \
 req.test \
 reqd.test \
@@ -617,16 +701,19 @@ silent.test \
 silent2.test \
 silent3.test \
 silent4.test \
-silent5.test \
 silent6.test \
 silent7.test \
 silent9.test \
 silentcxx.test \
 silentf77.test \
 silentf90.test \
-silentlex.test \
-silentyacc.test \
-sinclude.test \
+silent-many-gcc.test \
+silent-many-generic.test \
+silent-lex-gcc.test \
+silent-lex-generic.test \
+silent-yacc-gcc.test \
+silent-yacc-generic.test \
+silent-configsite.test \
 srcsub.test \
 srcsub2.test \
 space.test \
@@ -638,6 +725,7 @@ specflg7.test \
 specflg8.test \
 specflg9.test \
 specflg10.test \
+specflg-dummy.test \
 spell.test \
 spell2.test \
 spell3.test \
@@ -648,6 +736,8 @@ stamph2.test \
 stdlib.test \
 stdlib2.test \
 strip.test \
+strip2.test \
+strip3.test \
 subdir.test \
 subdir2.test \
 subdir3.test \
@@ -672,6 +762,9 @@ subobj7.test \
 subobj8.test \
 subobj9.test \
 subobj10.test \
+subobj11a.test \
+subobj11b.test \
+subobj11c.test \
 subobjname.test \
 subpkg.test \
 subpkg2.test \
@@ -712,6 +805,7 @@ txinfo2.test \
 txinfo3.test \
 txinfo4.test \
 txinfo5.test \
+txinfo5b.test \
 txinfo6.test \
 txinfo7.test \
 txinfo8.test \
@@ -748,6 +842,7 @@ vala2.test \
 vala3.test \
 vala4.test \
 vala5.test \
+vala-vpath.test \
 vars.test \
 vars3.test \
 vartar.test \
@@ -761,6 +856,8 @@ version8.test \
 vpath.test \
 vtexi.test \
 vtexi2.test \
+vtexi3.test \
+vtexi4.test \
 warnopts.test \
 werror.test \
 werror2.test \
@@ -776,8 +873,10 @@ yacc5.test \
 yacc6.test \
 yacc7.test \
 yacc8.test \
+yaccdry.test \
 yaccpp.test \
 yaccvpath.test \
+yacc-dist-nobuild-subdir.test \
 yflags.test \
 yflags2.test \
 $(parallel_tests)
@@ -794,6 +893,6 @@ clean-local-check:
         if test "$$#,$$1" = "1,*.dir"; then \
           : there is no test directory to clean; \
         else \
-          find "$$@" -type d '!' -perm -200 -exec chmod u+w {} ';'; \
+          find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
           rm -rf "$$@"; \
         fi;
diff --git a/tests/Makefile.in b/tests/Makefile.in
index e1b170a..a6e17a1 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,7 @@
 @SET_MAKE@
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -108,18 +108,24 @@ am__base_list = \
 am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
 am__rst_section = sed 'p;s/./=/g;p;g'
 # Put stdin (possibly several lines separated by ".  ") in a box.
-am__text_box = $(AWK) '{                               \
-  n = split($$0, lines, "\\.  "); max = 0;             \
-  for (i = 1; i <= n; ++i)                             \
-    if (max < length(lines[i]))                                \
-      max = length(lines[i]);                          \
-  for (i = 0; i < max; ++i) line = line "=";           \
-  print line;                                          \
-  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
-  print line;                                          \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{                       \
+  n = split($$0, lines, "\\.  "); max = 0;     \
+  for (i = 1; i <= n; ++i)                     \
+    if (max < length(lines[i]))                        \
+      max = length(lines[i]);                  \
+  for (i = 0; i < max; ++i)                    \
+    line = line "=";                           \
+  print col line std;                          \
+  for (i = 1; i <= n; ++i)                     \
+    if (lines[i])                              \
+      print col lines[i] std;                  \
+  print col line std;                          \
 }'
 # Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
 # by disabling -e (using the XSI extension "set +e") if it's set.
 am__sh_e_setup = case $$- in *e*) set +e;; esac
 # To be inserted before the command running the test.  Creates the
@@ -142,6 +148,35 @@ elif test -f "$$f"; then dir=;                             
\
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
+# To be appended to the command running the test.  Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>address@hidden 2>&1;                                          \
+estatus=$$?;                                           \
+if test -n '$(DISABLE_HARD_ERRORS)'                    \
+   && test $$estatus -eq 99; then                      \
+  estatus=1;                                           \
+fi;                                                    \
+TERM=$$__SAVED_TERM; export TERM;                      \
+$(am__tty_colors);                                     \
+xfailed=PASS;                                          \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    xfailed=XFAIL;;                                    \
+esac;                                                  \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
+esac;                                                  \
+echo "$${col}$$res$${std}: $$f";                       \
+echo "$$res: $$f (exit: $$estatus)" |                  \
+  $(am__rst_section) >$@;                              \
+cat address@hidden >>$@;                                               \
+rm -f address@hidden
 RECHECK_LOGS = $(TEST_LOGS)
 AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 TEST_SUITE_LOG = test-suite.log
@@ -202,6 +237,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -244,13 +282,20 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 XFAIL_TESTS = \
-all.test                                       \
-auxdir2.test                                   \
-cond17.test                                    \
-gcj6.test                                      \
+all.test \
+auxdir2.test \
+cond17.test \
+gcj6.test \
+pr8365-remake-timing.test \
+yacc-dist-nobuild-subdir.test \
+vala-vpath.test \
 txinfo5.test
 
 parallel_tests = \
+check-concurrency-bug9245-p.test \
+check-exported-srcdir-p.test \
+check-tests-in-builddir-p.test \
+check-tests_environment-p.test \
 check-p.test \
 check10-p.test \
 check11-p.test \
@@ -268,13 +313,20 @@ comment9-p.test \
 dejagnu-p.test \
 exeext4-p.test \
 maken3-p.test \
-maken4-p.test \
-pr401-p.test \
-pr401b-p.test \
-pr401c-p.test
+maken4-p.test
 
 MAINTAINERCLEANFILES = $(parallel_tests)
+
+# Some testsuite-influential variables should be overridable from the
+# test scripts, but not from the environment.
+TESTS_ENVIRONMENT = \
+  test x"$$me" = x || unset me; \
+  test x"$$required" = x || unset required; \
+  test x"$$parallel_tests" = x || unset parallel_tests;
+
 TESTS = \
+self-check-env-sanitize.test \
+self-check-report.test \
 aclibobj.test \
 aclocal.test \
 aclocal3.test \
@@ -307,14 +359,19 @@ acsilent.test \
 acsubst.test \
 acsubst2.test \
 all.test \
+all2.test \
 alloca.test \
 alloca2.test \
 alpha.test \
 alpha2.test \
+amhello-cflags.test \
+amhello-cross-compile.test \
+amhello-binpkg.test \
 amassign.test \
 ammissing.test \
 amopt.test \
 amsubst.test \
+ansi2knr-deprecation.test \
 ansi.test \
 ansi2.test \
 ansi3.test \
@@ -332,10 +389,20 @@ ar2.test \
 asm.test \
 asm2.test \
 asm3.test \
+autodist.test \
+autodist-subdir.test \
+autodist-acconfig.test \
+autodist-acconfig-no-subdir.test \
+autodist-aclocal-m4.test \
+autodist-config-headers.test \
+autodist-configure-no-subdir.test \
+autodist-no-duplicate.test \
+autodist-stamp-vti.test \
 autohdr.test \
 autohdr2.test \
 autohdr3.test \
 autohdr4.test \
+autohdrdry.test \
 automake.test \
 auxdir.test \
 auxdir2.test \
@@ -370,6 +437,11 @@ check8.test \
 check9.test \
 check10.test \
 check11.test \
+check-exported-srcdir.test \
+check-tests-in-builddir.test \
+check-tests_environment.test \
+check-concurrency-bug9245.test \
+tests-environment-backcompat.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -395,6 +467,7 @@ comment8.test \
 comment9.test \
 commen10.test \
 commen11.test \
+comments-in-var-def.test \
 compile.test \
 compile2.test \
 compile3.test \
@@ -449,20 +522,23 @@ cond44.test \
 cond45.test \
 condd.test \
 condhook.test \
+condhook2.test \
 condinc.test \
 condinc2.test \
 condlib.test \
 condman.test \
 condman2.test \
+condman3.test \
 configure.test \
-conf2.test \
 confdeps.test \
 conff.test \
 conff2.test \
 confh.test \
 confh4.test \
 confh5.test \
-config.test \
+confh6.test \
+confh7.test \
+confh8.test \
 confincl.test \
 conflnk.test \
 conflnk2.test \
@@ -500,6 +576,10 @@ depcomp4.test \
 depcomp5.test \
 depcomp6.test \
 depcomp7.test \
+depcomp8a.test \
+depcomp8b.test \
+depcomp9.test \
+depcomp10.test \
 depdist.test \
 depend.test \
 depend2.test \
@@ -508,10 +588,10 @@ depend4.test \
 depend5.test \
 depend6.test \
 destdir.test \
-dirforbid.test \
 dirlist.test \
 dirlist2.test \
 discover.test \
+dist-included-parent-dir.test \
 distcleancheck.test \
 distcom2.test \
 distcom3.test \
@@ -523,6 +603,14 @@ distdir.test \
 distlinks.test \
 distlinksbrk.test \
 distname.test \
+distcheck-configure-flags.test \
+distcheck-configure-flags-am.test \
+distcheck-configure-flags-subpkg.test \
+distcheck-hook.test \
+distcheck-hook2.test \
+dmalloc.test \
+doc-parsing-buglets-colneq-subst.test \
+doc-parsing-buglets-tabs.test \
 dollar.test \
 dollarvar.test \
 dollarvar2.test \
@@ -569,8 +657,6 @@ fort4.test \
 fort5.test \
 fonly.test \
 fortdep.test \
-fpinst2.test \
-fpinstall.test \
 gcj.test \
 gcj2.test \
 gcj3.test \
@@ -587,13 +673,26 @@ gnuwarn2.test \
 gnits.test \
 gnits2.test \
 gnits3.test \
+hdr-vars-defined-once.test \
 header.test \
 help.test \
+help2.test \
+help3.test \
+help4.test \
+help-depend.test \
+help-depend2.test \
+help-dmalloc.test \
+help-init.test \
+help-lispdir.test \
+help-maintainer.test \
+help-multilib.test \
+help-python.test \
+help-regex.test \
+help-silent.test \
+help-upc.test \
 hfs.test \
 hosts.test \
 implicit.test \
-include.test \
-include2.test \
 info.test \
 init.test \
 init2.test \
@@ -630,6 +729,8 @@ interp2.test \
 java.test \
 java2.test \
 java3.test \
+java-check.test \
+java-empty-classpath.test \
 javaprim.test \
 javasubst.test \
 ldadd.test \
@@ -639,6 +740,7 @@ lex2.test \
 lex3.test \
 lex4.test \
 lex5.test \
+lex-subobj-nodep.test \
 lflags.test \
 lflags2.test \
 libexec.test \
@@ -683,6 +785,7 @@ lisp5.test \
 lisp6.test \
 lisp7.test \
 lisp8.test \
+lispdry.test \
 listval.test \
 location.test \
 longline.test \
@@ -691,12 +794,15 @@ ltcond.test \
 ltcond2.test \
 ltconv.test \
 ltdeps.test \
+ltinit.test \
 ltinstloc.test \
 ltlibobjs.test \
 ltlibsrc.test \
 ltorder.test \
 lzma.test \
+m4-inclusion.test \
 maintclean.test \
+maintclean-vpath.test \
 make.test \
 makej.test \
 makej2.test \
@@ -710,12 +816,12 @@ man2.test \
 man3.test \
 man4.test \
 man5.test \
-mclean.test \
 mdate.test \
 mdate2.test \
 mdate3.test \
 mdate4.test \
 mdate5.test \
+mdate6.test \
 missing.test \
 missing2.test \
 missing3.test \
@@ -780,6 +886,13 @@ parallel-tests7.test \
 parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
+parallel-tests-harderror.test \
+parallel-tests-unreadable-log.test \
+parallel-tests-subdir.test \
+parallel-tests-log-override-1.test \
+parallel-tests-log-override-2.test \
+parallel-tests-log-override-recheck.test \
+parallel-tests-log-compiler-example.test \
 parse.test \
 percent.test \
 percent2.test \
@@ -794,6 +907,7 @@ pluseq7.test \
 pluseq8.test \
 pluseq9.test \
 pluseq10.test \
+pluseq11.test \
 postproc.test \
 ppf77.test \
 pr2.test \
@@ -821,6 +935,10 @@ prefix.test \
 primary.test \
 primary2.test \
 primary3.test \
+primary-prefix-invalid-couples.test \
+primary-prefix-valid-couples.test \
+primary-prefix-couples-force-valid.test \
+primary-prefix-couples-documented-valid.test \
 proginst.test \
 python.test \
 python2.test \
@@ -843,6 +961,12 @@ remake4.test \
 remake5.test \
 remake6.test \
 remake7.test \
+remake-subdir-from-subdir.test \
+remake-subdir-gnu.test \
+remake-subdir.test \
+remake-subdir2.test \
+remake-subdir-long-time.test \
+pr8365-remake-timing.test \
 regex.test \
 req.test \
 reqd.test \
@@ -855,16 +979,19 @@ silent.test \
 silent2.test \
 silent3.test \
 silent4.test \
-silent5.test \
 silent6.test \
 silent7.test \
 silent9.test \
 silentcxx.test \
 silentf77.test \
 silentf90.test \
-silentlex.test \
-silentyacc.test \
-sinclude.test \
+silent-many-gcc.test \
+silent-many-generic.test \
+silent-lex-gcc.test \
+silent-lex-generic.test \
+silent-yacc-gcc.test \
+silent-yacc-generic.test \
+silent-configsite.test \
 srcsub.test \
 srcsub2.test \
 space.test \
@@ -876,6 +1003,7 @@ specflg7.test \
 specflg8.test \
 specflg9.test \
 specflg10.test \
+specflg-dummy.test \
 spell.test \
 spell2.test \
 spell3.test \
@@ -886,6 +1014,8 @@ stamph2.test \
 stdlib.test \
 stdlib2.test \
 strip.test \
+strip2.test \
+strip3.test \
 subdir.test \
 subdir2.test \
 subdir3.test \
@@ -910,6 +1040,9 @@ subobj7.test \
 subobj8.test \
 subobj9.test \
 subobj10.test \
+subobj11a.test \
+subobj11b.test \
+subobj11c.test \
 subobjname.test \
 subpkg.test \
 subpkg2.test \
@@ -950,6 +1083,7 @@ txinfo2.test \
 txinfo3.test \
 txinfo4.test \
 txinfo5.test \
+txinfo5b.test \
 txinfo6.test \
 txinfo7.test \
 txinfo8.test \
@@ -986,6 +1120,7 @@ vala2.test \
 vala3.test \
 vala4.test \
 vala5.test \
+vala-vpath.test \
 vars.test \
 vars3.test \
 vartar.test \
@@ -999,6 +1134,8 @@ version8.test \
 vpath.test \
 vtexi.test \
 vtexi2.test \
+vtexi3.test \
+vtexi4.test \
 warnopts.test \
 werror.test \
 werror2.test \
@@ -1014,8 +1151,10 @@ yacc5.test \
 yacc6.test \
 yacc7.test \
 yacc8.test \
+yaccdry.test \
 yaccpp.test \
 yaccvpath.test \
+yacc-dist-nobuild-subdir.test \
 yflags.test \
 yflags2.test \
 $(parallel_tests)
@@ -1071,41 +1210,12 @@ ctags: CTAGS
 CTAGS:
 
 
-# To be appended to the command running the test.  Handle the stdout
-# and stderr redirection, and catch the exit status.
-am__check_post =                                       \
->address@hidden 2>&1;                                          \
-estatus=$$?;                                           \
-if test -n '$(DISABLE_HARD_ERRORS)'                    \
-   && test $$estatus -eq 99; then                      \
-  estatus=1;                                           \
-fi;                                                    \
-TERM=$$__SAVED_TERM; export TERM;                      \
-$(am__tty_colors);                                     \
-xfailed=PASS;                                          \
-case " $(XFAIL_TESTS) " in                             \
-  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
-    xfailed=XFAIL;;                                    \
-esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
-esac;                                                  \
-echo "$${col}$$res$${std}: $$f";                       \
-echo "$$res: $$f (exit: $$estatus)" |                  \
-  $(am__rst_section) >$@;                              \
-cat address@hidden >>$@;                                               \
-rm -f address@hidden
-
 $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__sh_e_setup);                                             \
        list='$(TEST_LOGS)';                                            \
        results=`for f in $$list; do                                    \
-                  read line < $$f && echo "$$line" || echo FAIL;       \
+                  test -r $$f && read line < $$f && echo "$$line"      \
+                    || echo FAIL;                                      \
                 done`;                                                 \
        all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[      
]*//'`; \
        fail=`echo "$$results" | grep -c '^FAIL'`;                      \
@@ -1154,7 +1264,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
          for f in $$list; do                                           \
-           read line < $$f;                                            \
+           test -r $$f && read line < $$f || line=;                    \
            case $$line in                                              \
              PASS:*|XFAIL:*);;                                         \
              *) echo; cat $$f;;                                        \
@@ -1171,13 +1281,12 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
        $(am__tty_colors);                                              \
        if $$exit; then                                                 \
-         echo $(ECHO_N) "$$grn$(ECHO_C)";                              \
+         col="$$grn";                                                  \
         else                                                           \
-         echo $(ECHO_N) "$$red$(ECHO_C)";                              \
+         col="$$red";                                                  \
        fi;                                                             \
-       echo "$$msg" | $(am__text_box);                                 \
-       echo $(ECHO_N) "$$std$(ECHO_C)";                                \
-       $$exit
+       echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";         \
+       $$exit || exit 1
 
 # Run all the tests.
 check-TESTS:
@@ -1218,10 +1327,11 @@ recheck recheck-html:
        list='$(TEST_LOGS)';                                            \
        list=`for f in $$list; do                                       \
                test -f $$f || continue;                                \
-               if read line < $$f; then                                \
+               if test -r $$f && read line < $$f; then                 \
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) 
TEST_LOGS="'"$$list"'"'
 .test.log:
        @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
@@ -1272,10 +1382,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
        -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
        -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
@@ -1389,7 +1504,7 @@ clean-local-check:
         if test "$$#,$$1" = "1,*.dir"; then \
           : there is no test directory to clean; \
         else \
-          find "$$@" -type d '!' -perm -200 -exec chmod u+w {} ';'; \
+          find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
           rm -rf "$$@"; \
         fi;
 
diff --git a/tests/README b/tests/README
index 7d74083..ca17c4f 100644
--- a/tests/README
+++ b/tests/README
@@ -93,15 +93,34 @@ Do
   Cite the PR number (if any), and the original reporter (if any), so
   we can find or ask for information if needed.
 
-  Use `required=...' for required tools.
+  If a test checks examples or idioms given in the documentation, make
+  sure the documentation reference them appropriately in comments, as in:
+    @c Keep in sync with autodist-config-headers.test.
+    @example
+    ...
+    @end example
+
+  Use `required=...' for required tools.  Do not explicitly require
+  tools which can be taken for granted because they're listed in the
+  GNU Coding Standards (for example, `gzip').
 
   Include ./defs in every test script (see existing tests for examples
   of how to do this).
 
+  Use the `skip_' function to skip tests, with a meaningful message if
+  possible.  Where convenient, use the `warn_' function to print generic
+  warnings, the `fail_' function for test failures, and the `fatal_'
+  function for hard errors.  In case a hard error is due to a failed
+  set-up of a test scenario, you can use the `framework_fail_' function
+  instead.
+
   For tests that use the `parallel-tests' Automake option, set the shell
   variable `parallel_tests' to "yes" before including ./defs.  Also,
-  use for them a name that ends in `-p.test' and does not clash with any
-  generated tests in the suite.
+  do not use for them a name that ends in `-p.test', since that would
+  risk to clash with automatically-generated tests.  For tests that are
+  *not* meant to work with the `parallel-tests' Automake option (these
+  should be very very few), set the shell variable `parallel_tests' to
+  "no" before including ./defs.
 
   ./defs sets a skeleton configure.in.  If possible, append to this
   file.  In some cases you'll have to overwrite it, but this should
@@ -134,6 +153,9 @@ Do
 
   Use `Exit' rather than `exit' to abort a test.
 
+  Use `$PATH_SEPARATOR', not hard-coded `:', as the separator of
+  PATH's entries.
+
   It's more important to make sure that a feature works, than
   make sure that Automake's output looks correct.  It might look
   correct and still fail to work.  In other words, prefer
@@ -167,12 +189,12 @@ Do not
   reason, but at least it makes sure the original error is still
   here.)
 
-  Do not override Makefile variables using make arguments, as in
-    $MAKE ANSI2KNR=./ansi2knr U=_ all
-  this is not portable for recursive targets (targets that
-  call a sub-make may not pass `ANSI2KNR=./ansi2knr U=_' along).
-  Use the following instead.
-    ANSI2KNR=./ansi2knr U=_ $MAKE -e all
+  Do not override Makefile variables using make arguments, as in e.g.:
+    $MAKE prefix=/opt install
+  This is not portable for recursive targets (targets that call a
+  sub-make may not pass `prefix=/opt' along).  Use the following
+  instead:
+    prefix=/opt $MAKE -e install
 
   Do not send a test case without signing a copyright disclaimer.
   See http://sources.redhat.com/automake/contribute.html or
diff --git a/tests/acloca10.test b/tests/acloca10.test
index 7716f2a..d7a058f 100755
--- a/tests/acloca10.test
+++ b/tests/acloca10.test
@@ -65,8 +65,7 @@ grep MACRO3 aclocal.m4
 test ! -f m4_1/macro.m4
 test ! -f m4_2/macro.m4
 
-ACLOCAL_TESTSUITE_FLAGS='-I m4_1 -I m4_2'
-$ACLOCAL --install
+$ACLOCAL -I m4_1 -I m4_2 --install
 $AUTOCONF
 ./configure
 grep macro11 foo
@@ -78,7 +77,7 @@ test ! -f m4_2/macro.m4
 cp aclocal.m4 copy.m4
 
 echo '#GREPME' >>dirlist-test/macro.m4
-$ACLOCAL --install
+$ACLOCAL -I m4_1 -I m4_2 --install
 $AUTOCONF
 ./configure
 grep macro11 foo
diff --git a/tests/acloca14.test b/tests/acloca14.test
index a4e86d7..1bdf7c7 100755
--- a/tests/acloca14.test
+++ b/tests/acloca14.test
@@ -29,6 +29,7 @@ END
 
 echo 'm4_include([a.m4])' > acinclude.m4
 echo 'm4_include([b.m4])' > a.m4
+
 cat >b.m4 <<EOF
 m4_include([c.m4])
 AC_DEFUN([AM_PROG_LIBTOOL],
@@ -38,6 +39,7 @@ AC_REQUIRE([SOMETHING_ELSE])dnl
 
 AC_DEFUN([SOMETHING])
 EOF
+
 echo 'm4_include([d.m4])' > c.m4
 echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4
 
@@ -88,26 +90,32 @@ $sleep
 cat >>c.m4 <<\EOF
 AC_DEFUN([FOO], [ANOTHER_MACRO])
 EOF
+
 $MAKE
+
 # Because c.m4 has changed, aclocal.m4 must have been rebuilt.
 test `ls -1t aclocal.m4 stamp | sed 1q` = aclocal.m4
 # However, since FOO is not used, f.m4 should not be included
 # and the contents of aclocal.m4 should remain the same
-cmp aclocal.m4 stamp
-
+diff aclocal.m4 stamp
 
 # If FOO where to be used, that would be another story, of course.
 cat >>configure.in <<EOF
 FOO
 EOF
+
 cp aclocal.m4 stamp
 $sleep
+
 $MAKE
-grep 'defs/f.m4' aclocal.m4
+
+$FGREP defs/f.m4 aclocal.m4
 $MAKE testdist2
 
 # Make sure aclocal diagnose missing included files with correct `file:line:'.
 rm -f b.m4
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep 'a.m4:1:.*b.m4.*does not exist' stderr
+grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
+
+:
diff --git a/tests/acloca18.test b/tests/acloca18.test
index c38fac4..5032a8d 100755
--- a/tests/acloca18.test
+++ b/tests/acloca18.test
@@ -53,52 +53,45 @@ cat >4/mumble.m4 <<EOF
 AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
 EOF
 
-
-ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4'
-
-$ACLOCAL
+$ACLOCAL -I 1 -I 2 -I 3 -I 4
 $AUTOCONF
 ./configure
 grep macro11 foo
 grep macro21 foo
 
 rm -f foo
-$ACLOCAL --install
+$ACLOCAL  -I 1 -I 2 -I 3 -I 4 --install
 $AUTOCONF
 ./configure
 grep macro12 foo
 grep macro23 foo
 
-ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2 -I 3'
 rm -f foo
-$ACLOCAL --install --dry-run
+$ACLOCAL -I 4 -I 1 -I 2 -I 3 --install --dry-run
 $AUTOCONF
 ./configure
 grep macro12 foo
 grep macro23 foo
 
 rm -f foo
-$ACLOCAL --install
+$ACLOCAL -I 4 -I 1 -I 2 -I 3 --install
 $AUTOCONF
 ./configure
 grep macro14 foo
 grep macro23 foo
 
-ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
 rm -f foo
-$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I 4 -I 1 -I 2 --install 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep AM_MACRO2 stderr
+grep 'macro.*AM_MACRO2.*not found' stderr
 
-ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
 rm -f foo
-$ACLOCAL --install
+$ACLOCAL -I 4 -I 1 --install
 $AUTOCONF
 ./configure
 grep macro14 foo
 grep macro21 foo
 
-
 mkdir dirlist-test
 cat >dirlist-test/m1.m4 <<EOF
 #serial 456
@@ -106,7 +99,7 @@ AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
 AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
 EOF
 rm -f foo
-$ACLOCAL --diff=diff >stdout 2>stderr || {
+$ACLOCAL -I 4 -I 1 --diff=diff >stdout 2>stderr || {
   cat stderr >&2
   cat stdout
   Exit 1
@@ -115,4 +108,6 @@ cat stderr >&2
 cat stdout
 grep '#serial 456' stdout
 test ! -f 4/m1.m4
-grep 'installing.*4/m1.m4' stderr
+grep 'installing.*4/m1\.m4' stderr
+
+:
diff --git a/tests/acloca19.test b/tests/acloca19.test
index accad81..a198d9a 100755
--- a/tests/acloca19.test
+++ b/tests/acloca19.test
@@ -41,9 +41,11 @@ END
 
 $ACLOCAL
 $AUTOCONF
-./configure >stdout
+./configure >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep GREPME stdout
 grep 'aconfig\.ac' aclocal.m4 && Exit 1
 grep 'bconfig\.ac' aclocal.m4 && Exit 1
 grep with-grepme configure
+
+:
diff --git a/tests/aclocal.in b/tests/aclocal.in
index 35b1619..f8aa1a7 100644
--- a/tests/aclocal.in
+++ b/tests/aclocal.in
@@ -14,5 +14,4 @@ 
perllibdir="@abs_top_builddir@/address@hidden@@abs_top_srcdir@/lib"
 export perllibdir
 # Most of the files are in $srcdir/../m4.  However amversion.m4 is
 # generated in ../m4, so we include that directory in the search path too.
-exec "@abs_top_builddir@/aclocal" $ACLOCAL_TESTSUITE_FLAGS \
-     -I "@abs_top_builddir@/m4" "address@hidden@/m4" ${1+"$@"}
+exec "@abs_top_builddir@/aclocal" "address@hidden@/m4" ${1+"$@"}
diff --git a/tests/aclocal.test b/tests/aclocal.test
index d3437d2..da80d08 100755
--- a/tests/aclocal.test
+++ b/tests/aclocal.test
@@ -27,18 +27,20 @@ test -f fred
 $ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'option.*--output.*an argument' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'unrecognized.*--unknown-option' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'unrecognized.*--ver' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --versi
 
 test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir"
+
+:
diff --git a/tests/aclocal5.test b/tests/aclocal5.test
index 5cd8231..b206587 100755
--- a/tests/aclocal5.test
+++ b/tests/aclocal5.test
@@ -60,7 +60,7 @@ grep GREPME sub/Makefile
 
 # Make sure configure dependencies are distributed.
 $MAKE distdir
-test -f aclocal5-1.0/m4/moredefs.m4
+test -f $me-1.0/m4/moredefs.m4
 
 # Change the definition of AM_TEST to check that its new definition is
 # used.  Check that AC_DEFUN_ONCE is caught.
@@ -68,3 +68,5 @@ echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > 
m4/moredefs.m4
 $MAKE
 grep 'm4/moredefs\.m4' aclocal.m4
 grep '__GREPME__' configure
+
+:
diff --git a/tests/aclocal6.test b/tests/aclocal6.test
index 266d64b..ddf9401 100755
--- a/tests/aclocal6.test
+++ b/tests/aclocal6.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -44,19 +44,14 @@ $ACLOCAL -I m4
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
 
-# Users can disable autom4te.cache.
-if test -d autom4te.cache; then
-  test_cache='test -d'
-else
-  test_cache=:
-fi
-
 mkdir build
 cd build
 
 ../configure
 $MAKE
 
+# Modified configure dependencies must be newer than config.status.
+$sleep
 # Update an aclocal.m4 dependency, then make sure all Makefiles
 # are updated, even from a sub-directory.
 echo 'AC_DEFUN([SOME_DEFS], [MORE_DEFS])' > ../m4/somedefs.m4
@@ -75,17 +70,8 @@ grep METOO sub/Makefile
 
 # Make sure configure dependencies are distributed.
 $MAKE distdir
-test -f aclocal6-1.0/m4/moredefs.m4
-test -f aclocal6-1.0/m4/somedefs.m4
-test -f aclocal6-1.0/acinclude.m4
+test -f $me-1.0/m4/moredefs.m4
+test -f $me-1.0/m4/somedefs.m4
+test -f $me-1.0/acinclude.m4
 
-# Make sure maintainer-clean works in VPATH builds.
-# (This is unrelated to the rest of this test.)
-$MAKE clean
-$test_cache ../autom4te.cache
-test -f Makefile
-test -f sub/Makefile
-$MAKE maintainer-clean
-test ! -d ../autom4te.cache
-test ! -f Makefile
-test ! -f sub/Makefile
+:
diff --git a/tests/aclocal8.test b/tests/aclocal8.test
index ac10aff..d935f4f 100755
--- a/tests/aclocal8.test
+++ b/tests/aclocal8.test
@@ -34,9 +34,9 @@ EOF
 echo 'AC_DEFUN([MACRO1],)' >m4/macro1.m4
 echo 'AC_DEFUN([MACRO2], [AC_REQUIRE([AM_UNUSED_MACRO])])' >m4/macro2.m4
 
-$ACLOCAL -I m4 >output 2>&1
-cat output
+$ACLOCAL -I m4 >output 2>&1 || { cat output; Exit 1; }
 test 0 = `wc -l <output`
 grep macro1.m4 aclocal.m4
 grep macro2.m4 aclocal.m4 && Exit 1
+
 :
diff --git a/tests/all.test b/tests/all.test
index 3d761f4..791d081 100755
--- a/tests/all.test
+++ b/tests/all.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2007, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,30 +15,22 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure all-local and other -local targets work correctly.
+# Test to make sure several *-local's in a single rule work.
 
 . ./defs || Exit 1
+
 set -e
 
 targets='all install-exec install-data uninstall'
-for target in $targets; do
-   echo "Doing $target"
-   echo "${target}-local:" > Makefile.am
-
-   $ACLOCAL
-   $AUTOMAKE
-
-   $FGREP "${target}-local ${target}-local" Makefile.in && Exit 1
-done
-
-# Several *-local's in a single rule.
-echo "Doing $targets"
 echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
+cat Makefile.am  # might be useful for debugging
+
 $ACLOCAL
 $AUTOMAKE
 
 for target in $targets; do
-  $EGREP "${target}-am:.*${target}-local" Makefile.in
+  grep "${target}-local" Makefile.in  # might be useful for debugging
+  grep "${target}-am:.*${target}-local" Makefile.in
 done
 
-Exit 0
+:
diff --git a/tests/all2.test b/tests/all2.test
new file mode 100755
index 0000000..38b6f8c
--- /dev/null
+++ b/tests/all2.test
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure all-local and other -local targets work correctly.
+
+. ./defs || Exit 1
+
+set -e
+
+$ACLOCAL
+
+targets='all install-exec install-data uninstall'
+for target in $targets; do
+  : Doing $target
+  echo "${target}-local:" > Makefile.am
+  $AUTOMAKE
+  grep "${target}-local ${target}-local" Makefile.in && Exit 1
+  grep "${target}-am:.*${target}-local" Makefile.in
+done
+
+:
diff --git a/tests/alloca.test b/tests/alloca.test
index 6cf51bb..8a1e06e 100755
--- a/tests/alloca.test
+++ b/tests/alloca.test
@@ -20,13 +20,21 @@
 
 set -e
 
+cat >> configure.in <<'END'
+AC_PROG_CC
+END
+
 cat > Makefile.am << 'END'
 noinst_LIBRARIES = libtu.a
 libtu_a_SOURCES =
 libtu_a_LIBADD = @ALLOCA@
 END
 
+: > alloca.c
+
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile.am:1:.*AC_PROG_RANLIB' stderr
-grep 'Makefile.am:3:.*AC_FUNC_ALLOCA' stderr
+grep '^Makefile\.am:1:.*define .*RANLIB.* add .*AC_PROG_RANLIB' stderr
+grep '^Makefile\.am:3:.*define .*ALLOCA.* add .*AC_FUNC_ALLOCA' stderr
+
+:
diff --git a/tests/alloca2.test b/tests/alloca2.test
index 4ecd229..caf11a3 100755
--- a/tests/alloca2.test
+++ b/tests/alloca2.test
@@ -20,13 +20,21 @@
 
 set -e
 
+cat >> configure.in <<'END'
+AC_PROG_CC
+END
+
 cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = libtu.la
 libtu_la_SOURCES =
 libtu_la_LIBADD = @LTALLOCA@
 END
 
+: > alloca.c
+
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile.am:1:.*AC_PROG_LIBTOOL' stderr
-grep 'Makefile.am:3:.*ALLOCA' stderr
+grep '^Makefile\.am:1:.*define.*LIBTOOL.* add .*LT_INIT' stderr
+grep '^Makefile\.am:3:.*LTALLOCA' stderr
+
+:
diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test
new file mode 100755
index 0000000..59813cc
--- /dev/null
+++ b/tests/amhello-binpkg.test
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test an example from the manual about the `amhello' package:
+# using DESTDIR to build simple, no-frills binary packages.
+
+. ./defs || Exit 1
+
+set -e
+
+cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \
+  || fatal_ "cannot get amhello tarball"
+
+gzip -dc amhello-1.0.tar.gz | tar xf -
+cd amhello-1.0
+
+./configure --prefix /usr
+$MAKE
+$MAKE DESTDIR="`pwd`/inst" install
+cd inst
+find . -type f -print > ../files.lst
+tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > tar.got 2>&1
+
+EXEEXT=`sed -n -e 's/^EXEEXT *= *//p' < ../Makefile`
+
+if tar --version </dev/null | grep GNU; then
+  LC_ALL=C sort tar.got > t
+  mv -f t tar.got
+  diff - tar.got <<END
+./usr/bin/hello$EXEEXT
+./usr/share/doc/amhello/README
+END
+else
+  : Be laxer with other tar implementations, to avoid spurious failures.
+  $EGREP '(^| )\./usr/bin/hello'$EXEEXT'( |$)' tar.got
+  $EGREP '(^| )\./usr/share/doc/amhello/README( |$)' tar.got
+fi
+
+:
diff --git a/tests/amhello-cflags.test b/tests/amhello-cflags.test
new file mode 100755
index 0000000..56f7729
--- /dev/null
+++ b/tests/amhello-cflags.test
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test an example from the manual about the `amhello' package:
+# using VPATH builds to configure the same package with different
+# options.
+
+required=gcc
+. ./defs || Exit 1
+
+set -e
+
+cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \
+  || fatal_ "cannot get amhello tarball"
+
+gzip -dc amhello-1.0.tar.gz | tar xf -
+cd amhello-1.0
+
+mkdir debug optim
+cd debug
+../configure CFLAGS='-g -O0'
+$MAKE
+ls -l . src # For debugging.
+cd ../optim
+../configure CFLAGS='-O3 -fomit-frame-pointer'
+$MAKE
+ls -l . src # For debugging.
+cd ..
+
+# Check that we have really compiled the objects with two different
+# configurations.
+for exeext in '' .exe :; do
+  test -f optim/src/hello$exeext && break
+  test "$exeext" = : && fatal_ "cannot determine extension of executables"
+done
+cmp optim/src/hello$exeext debug/src/hello$exeext && Exit 1
+
+:
diff --git a/tests/amhello-cross-compile.test b/tests/amhello-cross-compile.test
new file mode 100755
index 0000000..6db91ba
--- /dev/null
+++ b/tests/amhello-cross-compile.test
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test an example from the manual about the `amhello' package:
+# cross-compiling a package from Linux/Unix to MinGW.
+
+required=i586-mingw32msvc-gcc
+. ./defs || Exit 1
+
+set -e
+
+cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \
+  || fatal_ "cannot get amhello tarball"
+
+host=i586-mingw32msvc
+build=`"$testsrcdir"/../lib/config.guess` && test -n "$build" \
+  || fatal_ "cannot guess build platform"
+case $build in *mingw*) skip_ "build system is MinGW too";; esac
+
+gzip -dc amhello-1.0.tar.gz | tar xf -
+cd amhello-1.0
+
+./configure --build "$build" --host "$host" > stdout \
+  || { cat stdout ; Exit 1; }
+cat stdout
+grep '^checking for i586-mingw32msvc-strip\.\.\.' stdout
+grep '^checking for i586-mingw32msvc-gcc\.\.\.' stdout
+grep '^checking for suffix of executables\.\.\. \.exe *$' stdout
+grep '^checking for suffix of object files\.\.\. o *$' stdout
+grep '^checking whether i586-mingw32msvc-gcc accepts -g\.\.\. yes' stdout
+
+$MAKE
+
+cd src
+file hello.exe > whatis
+cat whatis
+$EGREP 'DOS|Win' whatis
+grep 'executable' whatis
+grep 'ELF' whatis && Exit 1
+
+:
diff --git a/tests/ansi.test b/tests/ansi.test
index c0778c6..0aa000e 100755
--- a/tests/ansi.test
+++ b/tests/ansi.test
@@ -42,13 +42,11 @@ END
 : > ansi2knr.1
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete
 
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -f Makefile.sed SHELL=$SHELL test1
-
-$AUTOCONF
 ./configure
+
 $MAKE test1
 $MAKE test2
 
diff --git a/tests/ansi10.test b/tests/ansi10.test
index 88b8618..4ff2c86 100755
--- a/tests/ansi10.test
+++ b/tests/ansi10.test
@@ -55,8 +55,8 @@ main (int argc, char **argv)
 END
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
 
 # Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
 test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi2.test b/tests/ansi2.test
index 77ca2c6..504c8c3 100755
--- a/tests/ansi2.test
+++ b/tests/ansi2.test
@@ -35,6 +35,6 @@ END
 : > ansi2knr.1
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
 
 grep '^all[-a-z]*:.*ANSI2KNR' Makefile.in
diff --git a/tests/ansi2knr-deprecation.test b/tests/ansi2knr-deprecation.test
new file mode 100755
index 0000000..543d9c6
--- /dev/null
+++ b/tests/ansi2knr-deprecation.test
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the use of automatic de-ANSI-fication feature is deprecated.
+# That feature will be removed in the next major Automake release.
+
+. ./defs || Exit 1
+
+set -e
+
+warn_rx='automatic de-ANSI-fication.*deprecated'
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AM_C_PROTOTYPES
+END
+
+$ACLOCAL
+
+$AUTOCONF -Wall -Werror -Wno-obsolete
+$AUTOCONF -Wnone -Wobsolete -Werror 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep "^configure\\.in:5:.* AM_C_PROTOTYPES:.*$warn_rx" stderr
+
+sed '/AM_C_PROTOTYPES/d' configure.in > config.stub
+diff configure.in config.stub && fatal_ "failed to edit configure.in"
+rm -f configure.in
+
+cat > Makefile.stub <<'END'
+ANSI2KNR = :
+U =
+END
+
+for opt in ansi2knr lib/ansi2knr; do
+  # ansi2knr option in Makefile.am
+  cp config.stub configure.in
+  cp Makefile.stub Makefile.am
+  echo "AUTOMAKE_OPTIONS = $opt" >> Makefile.am
+  cat Makefile.am # For debugging.
+  $AUTOMAKE -Wno-obsolete
+  AUTOMAKE_fails
+  grep "^Makefile\.am:3:.*$warn_rx" stderr
+  AUTOMAKE_fails -Wnone -Wobsolete
+  grep "^Makefile\.am:3:.*$warn_rx" stderr
+  # ansi2knr option in configure.in
+  cp Makefile.stub Makefile.am
+  sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" config.stub > configure.in
+  cat configure.in # For debugging.
+  $AUTOMAKE -Wno-obsolete
+  AUTOMAKE_fails
+  grep "^configure\.in:2:.*$warn_rx" stderr
+  AUTOMAKE_fails -Wnone -Wobsolete
+  grep "^configure\.in:2:.*$warn_rx" stderr
+done
+
+:
diff --git a/tests/ansi3.test b/tests/ansi3.test
index e1e0c42..22ef485 100755
--- a/tests/ansi3.test
+++ b/tests/ansi3.test
@@ -51,8 +51,8 @@ export CFLAGS
 # We use gcc and not gcc -traditional as the latter fails on some
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'Makefile.am:1:.*ansi2knr\.c' stderr
 CC='gcc' ./configure
diff --git a/tests/ansi3b.test b/tests/ansi3b.test
index ad222ff..0688781 100755
--- a/tests/ansi3b.test
+++ b/tests/ansi3b.test
@@ -52,8 +52,8 @@ export CFLAGS
 # We use gcc and not gcc -traditional as the latter fails on some
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'configure.in:2:.*ansi2knr\.1' stderr
 CC='gcc' ./configure
diff --git a/tests/ansi4.test b/tests/ansi4.test
index 63250a9..0c0d339 100755
--- a/tests/ansi4.test
+++ b/tests/ansi4.test
@@ -37,6 +37,6 @@ END
 : > hello.c
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
 
 $FGREP 'ansi2knr.$(' Makefile.in
diff --git a/tests/ansi5.test b/tests/ansi5.test
index 2652cb7..d152be0 100755
--- a/tests/ansi5.test
+++ b/tests/ansi5.test
@@ -66,8 +66,8 @@ END
 set -e
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
 # Ignore user CFLAGS.
 CFLAGS=
 export CFLAGS
diff --git a/tests/ansi6.test b/tests/ansi6.test
index 10196ea..691614d 100755
--- a/tests/ansi6.test
+++ b/tests/ansi6.test
@@ -61,8 +61,8 @@ END
 set -e
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
 
 # Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
 test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi7.test b/tests/ansi7.test
index e97f517..9eae26b 100755
--- a/tests/ansi7.test
+++ b/tests/ansi7.test
@@ -63,8 +63,8 @@ END
 set -e
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
 
 # Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
 test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi8.test b/tests/ansi8.test
index 33f17dc..bcf99b1 100755
--- a/tests/ansi8.test
+++ b/tests/ansi8.test
@@ -26,5 +26,5 @@ bin_PROGRAMS = hello
 END
 
 $ACLOCAL
-AUTOMAKE_fails -a
+AUTOMAKE_fails -Wno-obsolete -a
 grep AM_C_PROTOTYPES stderr
diff --git a/tests/ansi9.test b/tests/ansi9.test
index 4eb1820..ab78dda 100755
--- a/tests/ansi9.test
+++ b/tests/ansi9.test
@@ -50,8 +50,8 @@ mkdir sub
 cp loadavg.c sub/sub.c
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing -Wno-override
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE --add-missing -Wno-override -Wno-obsolete
 
 $FGREP 'loadavg-loadavg$U.o: loadavg$U.c' Makefile.in
 # The following rule should not exist, because the
diff --git a/tests/ar.test b/tests/ar.test
index d68fc54..dbdf246 100755
--- a/tests/ar.test
+++ b/tests/ar.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,3 +39,5 @@ $AUTOMAKE
 $MAKE
 grep 'it works' libfoo.a
 grep 'really works' libfoo.a
+
+:
diff --git a/tests/ar2.test b/tests/ar2.test
index f0485ce..329f804 100755
--- a/tests/ar2.test
+++ b/tests/ar2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,5 +34,7 @@ END
 
 $ACLOCAL
 $AUTOMAKE
-grep 'ARFLAGS =' Makefile.in
-grep 'AR =' Makefile.in
+grep '^ARFLAGS =' Makefile.in
+grep '^AR =' Makefile.in
+
+:
diff --git a/tests/asm.test b/tests/asm.test
index 6c0aa3d..f1bcb76 100755
--- a/tests/asm.test
+++ b/tests/asm.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,31 +14,30 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test of basic assembly functionality
+# Test of basic assembly functionality.
+# Keep this in sync with sister tests asm2.test and asm3.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.s
 END
 
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,51 +47,42 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -100,16 +90,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
diff --git a/tests/asm2.test b/tests/asm2.test
index 8afd4f9..ab141e7 100755
--- a/tests/asm2.test
+++ b/tests/asm2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2006, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,31 +15,30 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test of basic preprocessed assembly functionality
+# Test of basic preprocessed assembly functionality.
+# Keep this in sync with sister tests asm.test and asm3.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.S
 END
 
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,70 +48,58 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -119,16 +107,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
diff --git a/tests/asm3.test b/tests/asm3.test
index 0738d6a..5c42c48 100755
--- a/tests/asm3.test
+++ b/tests/asm3.test
@@ -16,30 +16,29 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test of basic preprocessed assembly functionality with extension .sx.
+# Keep this in sync with sister tests asm.test and asm2.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.sx
 END
 
-: > maude.sx
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -49,70 +48,58 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -120,16 +107,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
diff --git a/tests/autodist-acconfig-no-subdir.test 
b/tests/autodist-acconfig-no-subdir.test
new file mode 100755
index 0000000..e6bd5a9
--- /dev/null
+++ b/tests/autodist-acconfig-no-subdir.test
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that `acconfig.h' is *not* automatically distributed when
+# placed in a subdirectory.
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+sub/acconfig.h:
+       echo target $@ should not be built >&2; exit 1
+check-local: distdir
+       ls -l $(distdir)/sub
+       test ! -f $(distdir)/sub/acconfig.h
+END
+
+mkdir sub
+
+cat > sub/Makefile.am <<'END'
+acconfig.h:
+       echo target $@ should not be built >&2; exit 1
+check-local:
+       echo $(DISTFILES) | grep 'acconfig\.h' && exit 1; :
+       echo $(DIST_COMMON) | grep 'acconfig\.h' && exit 1; :
+END
+
+: > sub/acconfig.h
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE check
+
+:
diff --git a/tests/autodist-acconfig.test b/tests/autodist-acconfig.test
new file mode 100755
index 0000000..49ab2f0
--- /dev/null
+++ b/tests/autodist-acconfig.test
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that `acconfig.h' is automatically distributed if it exists
+# (at automake runtime).
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+.PHONY: test
+test: distdir
+       ls -l $(distdir)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
+       test -f $(distdir)/acconfig.h
+END
+
+: > acconfig.h
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/autodist-aclocal-m4.test b/tests/autodist-aclocal-m4.test
new file mode 100755
index 0000000..3f53d59
--- /dev/null
+++ b/tests/autodist-aclocal-m4.test
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that `aclocal.m4' is not automatically distributed if not
+# required to build `configure'.  This is *really* a corner-case
+# check, and the behaviour it checks is not documented either, so
+# if that behaviour is deliberately changed in the future, just
+# remove this test.
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+{ echo 'm4_include([defs.m4])'
+  cat configure.in
+  echo 'AC_OUTPUT'
+} > t
+mv -f t configure.in
+
+cat > Makefile.am <<'END'
+.PHONY: test
+test: distdir
+       ls -l $(distdir)
+       test ! -f $(distdir)/aclocal.m4
+       echo $(DISTFILES) | grep 'aclocal\.m4' && exit 1; :
+       echo $(DIST_COMMON) | grep 'aclocal\.m4' && exit 1; :
+check-local: test
+END
+
+: > defs.m4
+$ACLOCAL
+mv -f aclocal.m4 defs.m4
+
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE test
+$MAKE distcheck
+
+:
diff --git a/tests/autodist-config-headers.test 
b/tests/autodist-config-headers.test
new file mode 100755
index 0000000..66c9bea
--- /dev/null
+++ b/tests/autodist-config-headers.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that config.h.bot and config.h.top are automatically
+# distributed if the AC_CONFIG_HADERS macro is used and they
+# exist at automake runtime.
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_HEADERS([config.h sub/config.h cfg2.h:conf2.hin])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+.PHONY: test
+test: distdir
+       ls -l $(distdir) $(distdir)/sub
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config\.h\.bot '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config\.h\.top '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]cfg2\.h\.bot '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]cfg2\.h\.top '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]sub/config\.h\.bot '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]sub/config\.h\.top '
+       test -f $(distdir)/config.h.bot
+       test -f $(distdir)/config.h.top
+       test -f $(distdir)/cfg2.h.bot
+       test -f $(distdir)/cfg2.h.top
+       test -f $(distdir)/sub/config.h.bot
+       test -f $(distdir)/sub/config.h.top
+END
+
+mkdir sub
+touch config.h.in config.h.top config.h.bot \
+      conf2.hin cfg2.h.top cfg2.h.bot \
+      sub/config.h.in sub/config.h.top sub/config.h.bot
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/autodist-configure-no-subdir.test 
b/tests/autodist-configure-no-subdir.test
new file mode 100755
index 0000000..db640c4
--- /dev/null
+++ b/tests/autodist-configure-no-subdir.test
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that `configure', `configure.ac' and `configure.in' are *not*
+# automatically distributed when placed in a subdirectory.
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+dontbuild = echo target $@ should not be built >&2; exit 1
+sub/configure:
+       $(dontbuild)
+sub/configure.ac:
+       $(dontbuild)
+sub/configure.in:
+       $(dontbuild)
+check-local: distdir
+       ls -l $(distdir)/sub
+       test ! -f $(distdir)/sub/configure
+       test ! -f $(distdir)/sub/configure.in
+       test ! -f $(distdir)/sub/configure.ac
+END
+
+mkdir sub
+
+cat > sub/Makefile.am <<'END'
+dontbuild = echo target $@ should not be built >&2; exit 1
+configure:
+       $(dontbuild)
+configure.ac:
+       $(dontbuild)
+configure.in:
+       $(dontbuild)
+check-local:
+       echo $(DISTFILES) | grep 'configure' && exit 1; :
+       echo $(DIST_COMMON) | grep 'configure' && exit 1; :
+END
+
+: > sub/configure.ac
+: > sub/configure.in
+: > sub/configure
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE check
+
+:
diff --git a/tests/autodist-no-duplicate.test b/tests/autodist-no-duplicate.test
new file mode 100755
index 0000000..81464c0
--- /dev/null
+++ b/tests/autodist-no-duplicate.test
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that there are no duplicates in the list of files automatically
+# distributed by automake.
+
+. ./defs || Exit 1
+
+set -e
+
+re='Files .*automatically distributed.*if found'
+
+# The automake manual states that the list of automatically-distributed
+# files should be given by `automake --help'.
+
+list1=`$AUTOMAKE --help \
+        | sed -n "/^$re.*always/,/^ *$/p" \
+        | sed 1d`
+list1=`echo $list1`
+
+list2=`$AUTOMAKE --help \
+        | sed -n "/^$re.*under certain conditions/,/^ *$/p" \
+        | sed 1d`
+list2=`echo $list2`
+
+test -n "$list1"
+test -n "$list2"
+
+st=0
+for i in 1 2; do
+  eval list=\${list$i}
+  for f in $list; do echo $f; done | sort > files$i.lst
+  uniq files$i.lst > files$i.uniq
+  cat files$i.lst
+  cat files$i.uniq
+  diff files$i.lst files$i.uniq || st=1
+done
+
+Exit $st
diff --git a/tests/autodist-stamp-vti.test b/tests/autodist-stamp-vti.test
new file mode 100755
index 0000000..4f37e14
--- /dev/null
+++ b/tests/autodist-stamp-vti.test
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that `stamp-vti' is automatically distributed when info_TEXINFOS
+# and version.texi are involved.
+# Related to automake bug#7819.
+
+required=makeinfo
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << END
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foo.texi
+.PHONY: test
+test: all distdir
+       ls -l $(distdir)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]stamp-vti '
+       test -f $(distdir)/stamp-vti
+END
+
+cat > foo.texi << 'END'
+\input texinfo
address@hidden foo.info
address@hidden Zardoz
address@hidden Top
address@hidden version.texi
+bar baz quux
address@hidden
+END
+
+# Required when using Texinfo.
+: > texinfo.tex
+cp "$testsrcdir/../lib/mdate-sh" .
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/autodist-subdir.test b/tests/autodist-subdir.test
new file mode 100755
index 0000000..83b293e
--- /dev/null
+++ b/tests/autodist-subdir.test
@@ -0,0 +1,122 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake really automatically distributes all the files
+# it advertises to do, even when in subdirectories.
+#
+# This behavior might be suboptimal, but it has been in place for quite
+# a long time, and it would be risky to change it now.  See also the
+# discussion of automake bug#7819:
+#  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7819>
+#
+# Keep this test in sync with sister test `autodist.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+
+# The automake manual states that the list of automatically-distributed
+# files should be given by `automake --help'.
+list=`$AUTOMAKE --help \
+        | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ 
*$/p' \
+        | sed 1d`
+# Normalize whitespace, just in case.
+list=`echo $list`
+
+test -n "$list"
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+check-local:
+## For debugging.
+       @echo DIST_COMMON:
+       @for f in $(DIST_COMMON); do echo "  $$f"; done
+       @echo DISTDIR:
+       @ls -l $(distdir) | sed 's/^/  /'
+## Now the checks.
+       @for f in $(autodist_list); do \
+         echo "file: sub/$$f"; \
+         test -f $(distdir)/sub/$$f \
+           || { echo $$f: distdir fail >&2; exit 1; }; \
+       done
+END
+
+mkdir sub
+
+cat > sub/Makefile.am <<'END'
+include distfiles.am
+check-local:
+## For debugging.
+       @echo DIST_COMMON:
+       @for f in $(DIST_COMMON); do echo "  $$f"; done
+       @echo DISTDIR:
+       @ls -l $(distdir) | sed 's/^/  /'
+## Now the checks.
+       @for f in $(autodist_list); do \
+         echo "file: $$f"; \
+         ## Some filenames might contain dots, but this won't cause spurious
+         ## failures, and "spurious successes" are so unlikely that they're
+         ## not worth worrying about.
+         echo ' ' $(DIST_COMMON) ' ' | grep "[ /]$$f " >/dev/null \
+           || { echo $$f: distcom fail >&2; exit 1; }; \
+       done
+END
+
+: First try listing the automatically-distributed files in proper
+: targets in Makefile.am
+
+echo "MAINTAINERCLEANFILES = $list" > sub/distfiles.am
+for f in $list; do echo "$f :; touch $f"; done >> sub/distfiles.am
+
+cat sub/distfiles.am # For debugging.
+
+$AUTOMAKE -a
+
+./configure
+
+$MAKE distdir
+autodist_list="$list" $MAKE check
+
+$MAKE maintainer-clean
+test ! -f sub/README    # Sanity check.
+rm -rf $me-1.0          # Remove $(distdir).
+
+: Now try creating the automatically-distributed files before
+: running automake.
+
+: > sub/distfiles.am
+for f in $list; do
+  echo dummy > sub/$f
+done
+
+ls -l # For debugging.
+
+$AUTOMAKE
+
+./configure
+
+$MAKE distdir
+autodist_list="$list" $MAKE check
+
+:
diff --git a/tests/autodist.test b/tests/autodist.test
new file mode 100755
index 0000000..9294bc3
--- /dev/null
+++ b/tests/autodist.test
@@ -0,0 +1,109 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake really automatically distributes all the files
+# it advertises to do.
+# Related to automake bug#7819.
+# Keep this test in sync with sister test `autodist-subdir.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+# Ensure we are run from the right directory.
+# (The last thing we want is to delete some random user files.)
+test -f ../defs
+rm -f *
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+
+# The automake manual states that the list of automatically-distributed
+# files should be given by `automake --help'.
+list=`$AUTOMAKE --help \
+        | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ 
*$/p' \
+        | sed 1d`
+# Normalize whitespace, just in case.
+list=`echo $list`
+
+test -n "$list"
+
+cat > Makefile.am <<'END'
+include distfiles.am
+check-local:
+## For debugging.
+       @echo DIST_COMMON:
+       @for f in $(DIST_COMMON); do echo "  $$f"; done
+       @echo DISTDIR:
+       @ls -l $(distdir) | sed 's/^/  /'
+## Now the checks.
+       @for f in $(autodist_list); do \
+         echo "file: $$f"; \
+         test -f $(distdir)/$$f \
+           || { echo $$f: distdir fail >&2; exit 1; }; \
+         ## Some filenames might contain dots, but this won't cause spurious
+         ## failures, and "spurious successes" are so unlikely that they're
+         ## not worth worrying about.
+         echo ' ' $(DIST_COMMON) ' ' | grep "[ /]$$f " >/dev/null \
+           || { echo $$f: distcom fail >&2; exit 1; }; \
+       done
+END
+
+: First try listing the automatically-distributed files in proper
+: targets in Makefile.am
+
+echo "MAINTAINERCLEANFILES = $list" > distfiles.am
+for f in $list; do echo "$f :; touch $f"; done >> distfiles.am
+
+cat distfiles.am # For debugging.
+
+$AUTOMAKE -a
+
+./configure
+
+$MAKE distdir
+autodist_list="$list" $MAKE check
+
+$MAKE maintainer-clean
+test ! -f README        # Sanity check.
+rm -rf $me-1.0          # Remove $(distdir).
+
+: Now try creating the automatically-distributed files before
+: running automake.
+
+: > distfiles.am
+for f in $list; do
+  echo dummy > $f
+done
+
+ls -l # For debugging.
+
+$AUTOMAKE
+
+./configure
+
+$MAKE distdir
+autodist_list="$list" $MAKE check
+
+:
diff --git a/tests/autohdr.test b/tests/autohdr.test
index 014d2b7..9293bd1 100755
--- a/tests/autohdr.test
+++ b/tests/autohdr.test
@@ -16,7 +16,7 @@
 
 # Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/autohdr2.test b/tests/autohdr2.test
index 2ddce32..e2a71cf 100755
--- a/tests/autohdr2.test
+++ b/tests/autohdr2.test
@@ -16,7 +16,7 @@
 
 # Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/autohdr3.test b/tests/autohdr3.test
index 8e9f079..f559295 100755
--- a/tests/autohdr3.test
+++ b/tests/autohdr3.test
@@ -17,7 +17,7 @@
 # Check rebuild rules for autoheader.
 
 required=GNUmake
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/autohdr4.test b/tests/autohdr4.test
index 187429f..24c57fb 100755
--- a/tests/autohdr4.test
+++ b/tests/autohdr4.test
@@ -18,7 +18,7 @@
 # (This should also work without GNU Make.)
 
 required=gcc
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/autohdrdry.test b/tests/autohdrdry.test
new file mode 100755
index 0000000..b501e76
--- /dev/null
+++ b/tests/autohdrdry.test
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Removal recovery rules for AC_CONFIG_HEADERS should not remove files
+# with `make -n'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'EOF'
+AC_PROG_CC
+AC_CONFIG_HEADERS([config.h])
+AC_OUTPUT
+EOF
+
+: >Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+$AUTOMAKE
+
+./configure
+$MAKE
+
+rm -f config.h
+$MAKE -n
+test -f stamp-h1
+test ! -f config.h
+
+:
diff --git a/tests/check-concurrency-bug9245.test 
b/tests/check-concurrency-bug9245.test
new file mode 100755
index 0000000..e5dd153
--- /dev/null
+++ b/tests/check-concurrency-bug9245.test
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Look for a bug where FreeBSD make in concurrent mode reported success
+# even when the Automake-generated parallel testsuite harness failed.
+# See automake bug#9245.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.test bar.test
+END
+
+cat > foo.test <<'END'
+#!/bin/sh
+exit 1
+END
+chmod a+x foo.test
+
+cp foo.test bar.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# Some make implementations don't grok the `-j' option.
+$MAKE -j1 || Exit 77
+
+for j in '' -j1 -j2; do
+  $MAKE $j check && Exit 1
+  TESTS=foo.test $MAKE $j -e check && Exit 1
+  if test x"$parallel_tests" = x"yes"; then
+    $MAKE $j recheck && Exit 1
+    TEST_LOGS=foo.log $MAKE $j -e check && Exit 1
+    rm -f test-suite.log
+    $MAKE $j test-suite.log && Exit 1
+    test -f test-suite.log || Exit 1
+  else
+    : # For shells with buggy 'set -e'.
+  fi
+done
+
+:
diff --git a/tests/check-exported-srcdir.test b/tests/check-exported-srcdir.test
new file mode 100755
index 0000000..5cec7fc
--- /dev/null
+++ b/tests/check-exported-srcdir.test
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the testsuite driver (either with or without the
+# parallel-tests option enabled) exports the `srcdir' value in the
+# environment of the tests.  This is documented in the manual.
+
+. ./defs || Exit 1
+
+set -e
+
+show_info ()
+{
+  if test x"$parallel_tests" = x"yes"; then
+     cat foo.log
+     cat test-suite.log
+  else
+     :
+  fi
+}
+
+mkdir SrcDir
+mv [!S]* SrcDir
+mkdir BuildDir
+cd SrcDir
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.test
+END
+
+cat > foo.test <<'END'
+#!/bin/sh
+echo "foo.test: srcdir='$srcdir'"
+test x"$srcdir" = x"../SrcDir"
+END
+chmod a+x foo.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+cd ../BuildDir
+../SrcDir/configure
+
+$MAKE check || { show_info; Exit 1; }
+show_info
+
+:
diff --git a/tests/check-tests-in-builddir.test 
b/tests/check-tests-in-builddir.test
new file mode 100755
index 0000000..b588f11
--- /dev/null
+++ b/tests/check-tests-in-builddir.test
@@ -0,0 +1,94 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the testsuite driver can find test in the srcdir as
+# well as in builddir, and that is prefers those in the builddir.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.test bar.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > foo.test << 'END'
+#! /bin/sh
+exit ${FOO_EXIT_STATUS-0}
+END
+chmod a+x foo.test
+
+unset FOO_EXIT_STATUS || :
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+
+../configure
+
+cat > bar.test << 'END'
+#! /bin/sh
+exit 0
+END
+chmod a+x bar.test
+
+$MAKE check >out 2>&1 || { cat out; Exit1; }
+cat out
+# The simple-tests driver does not strip VPATH components from
+# the name of the test, but the parallel-tests driver should.
+if test x"$parallel_tests" = x"yes"; then
+  grep '\.\./foo' out && Exit 1
+  grep '^PASS: foo.test *$' out
+else
+  grep '^PASS: .*foo.test *$' out
+fi
+grep '^PASS: bar.test *$' out
+
+rm -f test-suite.log foo.log bar.log
+
+FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; Exit1; }
+cat out
+# See comments above.
+if test x"$parallel_tests" = x"yes"; then
+  grep '\.\./foo' out && Exit 1
+  grep '^FAIL: foo.test *$' out
+else
+  grep '^FAIL: .*foo.test *$' out
+fi
+grep '^PASS: bar.test *$' out
+
+rm -f test-suite.log foo.log bar.log
+
+# Check that if the same test is present in srcdir and builddir,
+# the one in builddir is preferred.
+cp bar.test foo.test
+FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 || { cat out; Exit1; }
+cat out
+grep '^PASS: foo.test *$' out
+grep '^PASS: bar.test *$' out
+
+# The tests in the builddir must be preferred also by "make dist".
+FOO_EXIT_STATUS=1 $MAKE distcheck
+
+:
diff --git a/tests/check-tests_environment.test 
b/tests/check-tests_environment.test
new file mode 100755
index 0000000..a07ab95
--- /dev/null
+++ b/tests/check-tests_environment.test
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > foo.test << 'END'
+#! /bin/sh
+test x"$FOO" = x"ok"
+END
+chmod a+x foo.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+FOO=bad TESTS_ENVIRONMENT='FOO=ok'  $MAKE check
+FOO=ok  TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
+
+:
diff --git a/tests/colon.test b/tests/colon.test
index da7a9da..22b5ed3 100755
--- a/tests/colon.test
+++ b/tests/colon.test
@@ -22,15 +22,15 @@
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile foo.h:foo.hin)
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([foo.h:foo.hin])
+AC_OUTPUT
 END
 
 : > Makefile.am
 : > foo.hin
-: > stamp-h.in
 
 $ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/colon2.test b/tests/colon2.test
index ebb2bfe..a52dfa8 100755
--- a/tests/colon2.test
+++ b/tests/colon2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,18 +19,23 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:zardoz.in)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:zardoz.in])
+AC_OUTPUT
 END
 
-: > zardoz.am
+echo 'dummy:' > zardoz.am
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # We actually check several things here.
-test -f zardoz.in || Exit 1
+test -f zardoz.in
 grep '^zardoz:' zardoz.in && Exit 1
-Exit 0
+grep '^dummy:' zardoz.in
+
+:
diff --git a/tests/colon3.test b/tests/colon3.test
index 6fed8b9..151d015 100755
--- a/tests/colon3.test
+++ b/tests/colon3.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,10 +22,11 @@
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:zardoz.in:two.in:three.in)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:zardoz.in:two.in:three.in])
+AC_OUTPUT
 END
 
 : > zardoz.am
@@ -35,21 +36,26 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-# We actually check several things here.
 # Automake should have created zardoz.in.
 test -f zardoz.in
 
 # The generated file should refer to zardoz.in and zardoz.am, but
 # never just "zardoz".
-echo Grep1
-grep zardoz zardoz.in | $FGREP -v 'zardoz.in' | $FGREP -v 'zardoz.am' > O || :
-# We cat the output file so we see in when verbose.
-cat O
-test -z "`cat O`"
-
+sed -e 's|zardoz\.am|zrdz.am|g' \
+    -e 's|zardoz\.in|zrdz.in|g' \
+  <zardoz.in | $FGREP 'zardoz' && Exit 1
+
+# FIXME: Do something like this after planned enahncements to tests/defs.
+# FIXME: Or even do proper functional testing.
+## Also, Makefile should depend on two.in and three.in.
+# extract_makefile_deps Makefile zardoz.in > deps
+#$FGREP ' $(srcdir)/two.in ' deps
+#$FGREP ' $(srcdir)/three.in ' deps
+#
+# FIXME: for the moment, we content ourselves with these inferior tests.
 # Makefile should depend on two.in.
-echo Grep2
 grep '^Makefile:.* \$(srcdir)/two.in' zardoz.in
 # Likewise three.in.
-echo Grep3
 grep '^Makefile:.* \$(srcdir)/three.in' zardoz.in
+
+:
diff --git a/tests/colon4.test b/tests/colon4.test
index cec3c86..9af6b4e 100755
--- a/tests/colon4.test
+++ b/tests/colon4.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,16 +15,17 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure ":" works with files automake generates.
-# This test is for multiple ":"s.
+# Make sure multiple ":"s in AC_CONFIG_FILES do not generate broken
+# rebuild rules.
 # Test from Maciej W. Rozycki.
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile zardoz:one:two:three)
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_FILES([zardoz:one:two:three])
+AC_OUTPUT
 END
 
 : > Makefile.am
@@ -31,9 +33,10 @@ END
 : > two
 : > three
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
-# The rule should regenerate the file "zardoz".
-grep '^zardoz:one:two' Makefile.in && Exit 1
+# The rule should regenerate the file "zardoz", not a meaningless
+# file "'zardoz:one:two".
+$FGREP 'zardoz:one:two' Makefile.in && Exit 1
 Exit 0
diff --git a/tests/colon5.test b/tests/colon5.test
index fe97f99..9dae9c8 100755
--- a/tests/colon5.test
+++ b/tests/colon5.test
@@ -21,16 +21,31 @@
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:Makefile.in:Makefile.dep)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:Makefile.in:Makefile.dep])
+AC_OUTPUT
 END
 
-: > Makefile.am
 : > Makefile.dep
 
+cat > Makefile.am <<'END'
+.PHONY: test
+test:
+       case ' $(DIST_COMMON) ' in \
+         *' $(srcdir)/Makefile.dep '*|*' Makefile.dep '*) exit 0;; \
+         *) exit 1;; \
+       esac
+END
+
 $ACLOCAL
 $AUTOMAKE
 
-grep 'Makefile:Makefile.in' Makefile.in
+grep 'Makefile:Makefile\.in' Makefile.in
+grep '^Makefile:.* \$(srcdir)/Makefile\.dep' Makefile.in
+
+sed -e '/@SET_MAKE@/d' -e "address@hidden@!$SHELL!g" <Makefile.in >Makefile.sed
+$MAKE -f Makefile.sed SHELL=$SHELL test
+
+:
diff --git a/tests/colon6.test b/tests/colon6.test
index 99877c5..7c620d6 100755
--- a/tests/colon6.test
+++ b/tests/colon6.test
@@ -21,16 +21,33 @@
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(demo/Makefile demo/version.good:demo/version.gin)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
+AC_OUTPUT
 END
 
 mkdir demo
 
-: > demo/Makefile.am
 : > demo/version.gin
 
+cat > demo/Makefile.am <<'END'
+.PHONY: test
+test:
+       case ' $(DIST_COMMON) ' in \
+         *' $(srcdir)/version.gin '*) exit 0;; \
+         *) exit 1;; \
+       esac
+END
+
 $ACLOCAL
 $AUTOMAKE
+
+$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && Exit 1
+grep 'version\.good:.*version\.gin' demo/Makefile.in
+
+sed -e '/@SET_MAKE@/d' -e "address@hidden@!$SHELL!g" <demo/Makefile.in 
>Makefile.sed
+$MAKE -f Makefile.sed SHELL=$SHELL test
+
+:
diff --git a/tests/colon7.test b/tests/colon7.test
index 4df6a13..4195188 100755
--- a/tests/colon7.test
+++ b/tests/colon7.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,9 +20,12 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([colon7], [1.0])
+AM_INIT_AUTOMAKE
+dnl: Please do not add proper m4 quoting here.
 AC_OUTPUT(subdir/bar:subdir/foo \
    Makefile \
    subdir/Makefile
@@ -34,8 +38,8 @@ mkdir subdir
 : > subdir/Makefile.am
 : > subdir/foo
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # shouldn't have any bar.in
 grep 'bar.in' subdir/Makefile.in && Exit 1
@@ -43,4 +47,4 @@ grep 'bar.in' subdir/Makefile.in && Exit 1
 # DIST_COMMON should have foo, not subdir/foo
 grep 'DIST_COMMON.*subdir/foo' subdir/Makefile.in && Exit 1
 
-Exit 0
+:
diff --git a/tests/color.test b/tests/color.test
index 9d86785..c1032fd 100755
--- a/tests/color.test
+++ b/tests/color.test
@@ -34,7 +34,7 @@ std=''
 # BSD 'grep' works from a pipe, but not a seekable file.
 # GNU or BSD 'grep -a' works on files, but is not portable.
 case `echo "$std" | grep .` in
-  $std) ;;
+  "$std") ;;
   *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
 esac
 
diff --git a/tests/color2.test b/tests/color2.test
index eedd37d..306aa04 100755
--- a/tests/color2.test
+++ b/tests/color2.test
@@ -34,7 +34,7 @@ std=''
 # BSD 'grep' works from a pipe, but not a seekable file.
 # GNU or BSD 'grep -a' works on files, but is not portable.
 case `echo "$std" | grep .` in
-  $std) ;;
+  "$std") ;;
   *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
 esac
 
diff --git a/tests/comments-in-var-def.test b/tests/comments-in-var-def.test
new file mode 100755
index 0000000..b00ee6b
--- /dev/null
+++ b/tests/comments-in-var-def.test
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure Automake ignores in-line comments when using variables,
+# but preserve them in the output.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+# Use a slash in the comment, because automake takes the dirname
+# of TEXINFO_TEX to compute $(am__TEXINFO_TEX_DIR).
+cat > Makefile.am << 'END'
+TEXINFO_TEX = tex/texinfo.tex    # some comment w/ a slash
+info_TEXINFOS = main.texi
+.PHONY: test
+test:
+       test tex/texinfo.tex = $(TEXINFO_TEX)
+       test -d '$(am__TEXINFO_TEX_DIR)'
+       case '$(am__TEXINFO_TEX_DIR)' in tex|./tex) :;; *) exit 1;; esac
+END
+
+cat > main.texi << 'END'
+\input texinfo
address@hidden main.info
+END
+
+mkdir tex
+: > tex/texinfo.tex
+
+$ACLOCAL
+$AUTOMAKE
+
+grep TEX Makefile.in # for debugging
+grep '^TEXINFO_TEX *= *tex/texinfo\.tex  *# some comment w/ a slash *$' 
Makefile.in
+
+$AUTOCONF
+./configure
+$MAKE test
+
+:
diff --git a/tests/compile2.test b/tests/compile2.test
index fe4574a..334f154 100755
--- a/tests/compile2.test
+++ b/tests/compile2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -66,11 +66,7 @@ test -f "$amtest_object"
 # Absolute w32 paths should be accepted.
 # Do not actually run this test on anything that could be w32.
 test -d "C:\\" && Exit 77
-# This test is taken from Autoconf's _AS_PATH_SEPARATOR_PREPARE.
-(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-  (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-    Exit 77
-}
+case $PATH_SEPARATOR in ';'|':');; *) Exit 77;; esac
 
 amtest_source='C:\libltdl\libltdl\slist.c'
 amtest_object='C:\libltdl\libltdl\libltdl_libltdl_la-slist.obj'
diff --git a/tests/compile_f_c_cxx.test b/tests/compile_f_c_cxx.test
index a995527..d1836fb 100755
--- a/tests/compile_f_c_cxx.test
+++ b/tests/compile_f_c_cxx.test
@@ -39,6 +39,8 @@ END
 : > foo.f
 : > bar.c
 : > baz.cc
+: > config.guess
+: > config.sub
 
 $ACLOCAL
 $AUTOMAKE
diff --git a/tests/cond13.test b/tests/cond13.test
index d8c4361..e5f6be9 100755
--- a/tests/cond13.test
+++ b/tests/cond13.test
@@ -33,7 +33,7 @@ cat > Makefile.am << 'END'
 noinst_LIBRARIES = libtest.a
 
 if COND1
-SOURCEVAR1 = 
+SOURCEVAR1 =
 SOURCEVAR2 = habla.cpp espanol.cpp
 else
 SOURCEVAR1 = dummy.cpp
diff --git a/tests/cond14.test b/tests/cond14.test
index 2779a3d..09701f7 100755
--- a/tests/cond14.test
+++ b/tests/cond14.test
@@ -33,7 +33,7 @@ BUILD_helldl = helldl
 helldl_SOURCES = dlmain.c
 helldl_DEPENDENCIES = libhello.la
 else
-BUILD_helldl = 
+BUILD_helldl =
 bin_SCRIPTS = helldl
 helldl$(EXEEXT):
        rm -f $@
diff --git a/tests/cond23.test b/tests/cond23.test
index 4ec596d..e2b133c 100755
--- a/tests/cond23.test
+++ b/tests/cond23.test
@@ -17,7 +17,7 @@
 # Check that conditional redefinitions of AC_SUBST'ed variables are detected.
 # Report from Patrik Weiskircher
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond24.test b/tests/cond24.test
index 6f76e4d..e548211 100755
--- a/tests/cond24.test
+++ b/tests/cond24.test
@@ -17,7 +17,7 @@
 # Check that conditional redefinitions of AC_SUBST'ed variables are detected.
 # Report from Patrik Weiskircher
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond25.test b/tests/cond25.test
index 332fda5..02614f9 100755
--- a/tests/cond25.test
+++ b/tests/cond25.test
@@ -17,7 +17,7 @@
 # Check that conditional primaries can use non-conditional directories.
 # From Pavel Roskin.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond26.test b/tests/cond26.test
index a9baa55..1d93cc0 100755
--- a/tests/cond26.test
+++ b/tests/cond26.test
@@ -17,7 +17,7 @@
 # Check that non-conditional primaries can use conditional directories.
 # Reported by Juergen Keil.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond27.test b/tests/cond27.test
index 3082902..250b1ef 100755
--- a/tests/cond27.test
+++ b/tests/cond27.test
@@ -17,7 +17,7 @@
 # Check that non-conditional primaries cannot use directories defined
 # in some conditions (but not others).
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond28.test b/tests/cond28.test
index ccdcf9e..006ef57 100755
--- a/tests/cond28.test
+++ b/tests/cond28.test
@@ -17,7 +17,7 @@
 # Check that conditional primaries can use directories defined
 # in the same conditions (but not others).
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond29.test b/tests/cond29.test
index 12badcb..8310eab 100755
--- a/tests/cond29.test
+++ b/tests/cond29.test
@@ -24,7 +24,7 @@
 # or cpu time it can found.  Although this test won't print `FAIL' if
 # it fails, it will take long enough so it can't go unnoticed.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond30.test b/tests/cond30.test
index e092c45..d1935f7 100755
--- a/tests/cond30.test
+++ b/tests/cond30.test
@@ -16,7 +16,7 @@
 
 # For PR/352: make sure we support bin_PROGRAMS being defined conditionally.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond31.test b/tests/cond31.test
index 4975ef4..224d32c 100755
--- a/tests/cond31.test
+++ b/tests/cond31.test
@@ -16,7 +16,7 @@
 
 # Make sure we define conditional _DEPENDENCIES correctly.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond32.test b/tests/cond32.test
index ae5c8c6..6ec5a20 100755
--- a/tests/cond32.test
+++ b/tests/cond32.test
@@ -16,7 +16,7 @@
 
 # Make sure the user can override a conditional _DEPENDENCIES.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond33.test b/tests/cond33.test
index 0aff11a..f327cb7 100755
--- a/tests/cond33.test
+++ b/tests/cond33.test
@@ -17,7 +17,7 @@
 # Check for conditional library with a conditional directory.
 # Report from Ralf Corsepius
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond34.test b/tests/cond34.test
index 9e42eea..ecb1616 100755
--- a/tests/cond34.test
+++ b/tests/cond34.test
@@ -17,7 +17,7 @@
 # Check for _DEPDENDENCIES definition with conditional _LDADD.
 # Report from Elena A. Vengerova
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond35.test b/tests/cond35.test
index 6b3a4d4..0f3b8cf 100755
--- a/tests/cond35.test
+++ b/tests/cond35.test
@@ -18,7 +18,7 @@
 # Report from Roman Fietze.
 
 required='flex bison gcc'
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond36.test b/tests/cond36.test
index 58eb529..6826cd5 100755
--- a/tests/cond36.test
+++ b/tests/cond36.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,8 +16,7 @@
 
 # Check rules output for parser defined conditionally.
 
-required='flex bison gcc'
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -59,3 +58,5 @@ $AUTOMAKE -Wno-error
 test `grep tparse.h: Makefile.in | wc -l` = 2
 grep '@address@hidden:' Makefile.in
 grep '@address@hidden:' Makefile.in
+
+:
diff --git a/tests/cond37.test b/tests/cond37.test
index 144c2ac..a4ae078 100755
--- a/tests/cond37.test
+++ b/tests/cond37.test
@@ -17,7 +17,7 @@
 # Check conditional local rules.
 # Report from Simon Josefsson.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond38.test b/tests/cond38.test
index 0051e1f..b1c3036 100755
--- a/tests/cond38.test
+++ b/tests/cond38.test
@@ -17,7 +17,7 @@
 # Check conditional variable ordering.
 # Report from Ed Hartnett.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond39.test b/tests/cond39.test
index 8d96595..c75c7b5 100755
--- a/tests/cond39.test
+++ b/tests/cond39.test
@@ -20,7 +20,7 @@
 
 # Build either as CONFIG_FILE or as PROGRAM.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 mkdir sub
diff --git a/tests/cond40.test b/tests/cond40.test
index c0bde5c..8552cef 100755
--- a/tests/cond40.test
+++ b/tests/cond40.test
@@ -20,7 +20,7 @@
 
 # Test AM_COND_IF.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 cat >>configure.in <<'END'
diff --git a/tests/cond41.test b/tests/cond41.test
index b32bff3..dd9ffda 100755
--- a/tests/cond41.test
+++ b/tests/cond41.test
@@ -20,7 +20,7 @@
 
 # AM_COND_IF with an undefined condition should fail.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 cat >>configure.in <<'END'
diff --git a/tests/cond42.test b/tests/cond42.test
index 00ca114..428c02b 100755
--- a/tests/cond42.test
+++ b/tests/cond42.test
@@ -22,7 +22,7 @@
 # This shouldn't happen with user input, as _AM_COND_* are not documented,
 # but better to be safe.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 cat >>configure.in <<'END'
diff --git a/tests/cond43.test b/tests/cond43.test
index 1b468a7..1fa413d 100755
--- a/tests/cond43.test
+++ b/tests/cond43.test
@@ -20,7 +20,7 @@
 
 # Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 cat >>configure.in <<'END'
diff --git a/tests/cond44.test b/tests/cond44.test
index ac907f1..4b5adc2 100755
--- a/tests/cond44.test
+++ b/tests/cond44.test
@@ -17,7 +17,7 @@
 # Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
 # are not diagnosed.  See cond23.test.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond45.test b/tests/cond45.test
index 57dd339..c70fecb 100755
--- a/tests/cond45.test
+++ b/tests/cond45.test
@@ -17,7 +17,7 @@
 # Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
 # are not diagnosed.  See cond24.test.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/cond5.test b/tests/cond5.test
index 84afdd0..50101a6 100755
--- a/tests/cond5.test
+++ b/tests/cond5.test
@@ -48,12 +48,16 @@ $ACLOCAL
 $AUTOMAKE 2>stderr &
 pid=$!
 
+# MSYS bash seems to have a bug in kill, so don't try to kill too soon;
+# and avoid maintainer-check test.
+sleep '2'
+
 # Make at most 30 tries, one every 10 seconds (= 300 seconds = 5 min).
 try=1
 while test $try -le 30; do
   if kill -0 $pid; then
     : process $pid is still alive, wait and retry
-    sleep 10
+    sleep '10'
     try=`expr $try + 1`
   else
     cat stderr >&2
diff --git a/tests/condd.test b/tests/condd.test
index 0e9b6e8..b70d691 100755
--- a/tests/condd.test
+++ b/tests/condd.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 dnl Define a macro with the same name as the conditional to exhibit
-dnl any underquotted bug.
+dnl any underquoted bug.
 AC_DEFUN([COND1], ["some'meaningless;characters`])
 AM_CONDITIONAL([COND1], false)
 AC_CONFIG_FILES([foo/Makefile])
@@ -68,3 +68,5 @@ grep "meaningless;characters" configure && Exit 1
 $AUTOMAKE
 ./configure
 $MAKE test
+
+:
diff --git a/tests/condhook.test b/tests/condhook.test
index 06fa887..bf9225b 100755
--- a/tests/condhook.test
+++ b/tests/condhook.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,6 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test install when a conditional install-*-hook is not defined.
+# Keep this in sync with sister test condhook2.test.
 # Report by Nik A. Melchior (PR/428).
 
 . ./defs || Exit 1
@@ -22,7 +23,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AM_CONDITIONAL(TEST, false)
+AM_CONDITIONAL([TEST], [false])
 AC_OUTPUT
 END
 
@@ -30,7 +31,7 @@ cat > Makefile.am << 'END'
 sysconf_DATA = mumble
 if TEST
 install-data-hook:
-       echo foo
+       : > $(top_srcdir)/bad
 endif
 END
 
@@ -39,5 +40,11 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE install
+test -f inst/etc/mumble
+test ! -f bad
+
+:
diff --git a/tests/condhook2.test b/tests/condhook2.test
new file mode 100755
index 0000000..45e2d43
--- /dev/null
+++ b/tests/condhook2.test
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test install when a conditional install-*-hook is defined.
+# Keep this in sync with sister test condhook.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([TEST], [true])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+sysconf_DATA = mumble
+if TEST
+install-data-hook:
+       : > $(top_srcdir)/good
+endif
+END
+
+: > mumble
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure --prefix "`pwd`/inst"
+
+$MAKE install
+test -f inst/etc/mumble
+test -f good
+
+:
diff --git a/tests/condinc2.test b/tests/condinc2.test
index 088fb55..9001028 100755
--- a/tests/condinc2.test
+++ b/tests/condinc2.test
@@ -21,7 +21,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AM_CONDITIONAL(TOBE, false)
+AM_CONDITIONAL([TOBE], [false])
 END
 
 cat > Makefile.am << 'END'
@@ -39,3 +39,5 @@ END
 $ACLOCAL
 AUTOMAKE_fails
 grep 'adjunct:3: too many conditionals closed' stderr
+
+:
diff --git a/tests/condman.test b/tests/condman.test
index 3dc8bcd..ee2d41b 100755
--- a/tests/condman.test
+++ b/tests/condman.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,10 +15,13 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure conditionals work with man pages.
+
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
-AM_CONDITIONAL(FRED, true)
+AM_CONDITIONAL([FRED], [true])
 END
 
 cat > Makefile.am << 'END'
@@ -29,8 +32,7 @@ man_MANS = joe.1
 endif
 END
 
-: > foo.1
-: > joe.1
-
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/condman2.test b/tests/condman2.test
index 0b448e2..c0e7216 100755
--- a/tests/condman2.test
+++ b/tests/condman2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,16 +15,21 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure appropriate man install targets generated in all cases.
+
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 man_MANS = foo.1 foo.2
 man5_MANS = foo.5
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^install-man1:' Makefile.in
+grep '^install-man2:' Makefile.in
+grep '^install-man5:' Makefile.in
 
-grep '^install-man1:' Makefile.in || Exit 1
-grep '^install-man2:' Makefile.in || Exit 1
-grep '^install-man5:' Makefile.in || Exit 1
+:
diff --git a/tests/condman3.test b/tests/condman3.test
new file mode 100755
index 0000000..ff93daf
--- /dev/null
+++ b/tests/condman3.test
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure conditionals work with man pages.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+if COND
+man_MANS = foo.1
+else
+man_MANS = bar.2
+endif
+
+.PHONY: test1 test2
+test1:
+       test -f $(mandir)/man1/foo.1
+       test ! -f $(mandir)/man2/bar.2
+test2:
+       test ! -f $(mandir)/man1/foo.1
+       test -f $(mandir)/man2/bar.2
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+mkdir dir1
+cd dir1
+../configure FOO=true --prefix="`pwd`/_inst"
+sed -n '/man_MANS/p' Makefile # useful for debugging
+: > foo.1
+$MAKE install
+$MAKE test1
+
+cd ..
+mkdir dir2
+cd dir2
+../configure FOO=false --prefix="`pwd`/_inst"
+sed -n '/man_MANS/p' Makefile # useful for debugging
+: > bar.2
+$MAKE install
+$MAKE test2
+
+:
diff --git a/tests/conf2.test b/tests/conf2.test
deleted file mode 100755
index 8e53733..0000000
--- a/tests/conf2.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2010 Free Software
-# Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure several config headers are allowed.
-
-. ./defs || Exit 1
-
-set -e
-
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(config.h two.h)
-AC_PROG_CC
-AC_OUTPUT(Makefile)
-END
-
-: > Makefile.am
-
-: > config.h.in
-: > two.h.in
-
-$ACLOCAL
-$AUTOMAKE
diff --git a/tests/confdeps.test b/tests/confdeps.test
index 8e1cc64..b09f816 100755
--- a/tests/confdeps.test
+++ b/tests/confdeps.test
@@ -36,4 +36,4 @@ mv -f aclocal.m4t aclocal.m4
 $AUTOMAKE
 grep '^\$(ACLOCAL_M4):' Makefile.in && Exit 1
 
-Exit 0
+:
diff --git a/tests/conff.test b/tests/conff.test
index 353cb8e..dc6677c 100755
--- a/tests/conff.test
+++ b/tests/conff.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -93,3 +93,5 @@ grep 'bot2 rule' stdout
 cd ..
 
 $MAKE distcheck
+
+:
diff --git a/tests/conff2.test b/tests/conff2.test
index 0c53067..a0101e1 100755
--- a/tests/conff2.test
+++ b/tests/conff2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +20,8 @@
 
 set -e
 
+# We avoid using configure.in stub initialized by ./defs, since we need
+# to keep track of line numbers (to grep for error messages).
 cat > configure.in << END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
@@ -30,5 +32,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'configure.in:3:.*AC_CONFIG_FILES' stderr
-grep 'configure.in:4:.*AC_CONFIG_HEADERS' stderr
+grep 'configure\.in:3:.* arguments .*AC_CONFIG_FILES' stderr
+grep 'configure\.in:4:.* arguments .*AC_CONFIG_HEADERS' stderr
+
+:
diff --git a/tests/confh.test b/tests/confh.test
index 772a763..93badef 100755
--- a/tests/confh.test
+++ b/tests/confh.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,38 +20,46 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(include/config.h)
-AC_OUTPUT(Makefile include/Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([include/config.h])
+AC_OUTPUT
 END
 
-: > Makefile.am
-: > acconfig.h
+cat > Makefile.am << 'END'
+.PHONY: test1 test2
+test1:
+       @echo DIST_COMMON = $(DIST_COMMON)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
+test2: distdir
+       ls -l $(distdir)/*
+       test -f $(distdir)/acconfig.h
+check-local: test1 test2
+END
 
 mkdir include
-: > include/Makefile.am
 : > include/config.h.in
+: > acconfig.h
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-(sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep acconfig.h) || Exit 1
+# The test used to fail if `include/Makefile.am' was created (!)
+: > include/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test1
+$MAKE test2
+$MAKE distcheck
 
 # Make sure re-running automake in a different way generates same
 # Makefile.in.
-mv Makefile.in save
-$ACLOCAL || Exit 1
-$AUTOMAKE Makefile || Exit 1
-cmp Makefile.in save
+mv Makefile.in Makefile.sav
+$ACLOCAL
+$AUTOMAKE Makefile
+diff Makefile.sav Makefile.in
+
+:
diff --git a/tests/confh4.test b/tests/confh4.test
index 6fd4a07..8e36cfa 100755
--- a/tests/confh4.test
+++ b/tests/confh4.test
@@ -27,12 +27,10 @@
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(include/config.h)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([include/Makefile])
+AM_CONFIG_HEADER([include/config.h])
 AC_PROG_CC
-AC_OUTPUT(Makefile include/Makefile)
 END
 
 cat > Makefile.am << 'END'
@@ -40,9 +38,6 @@ bin_PROGRAMS = foo
 foo_SOURCES = foo.c
 END
 
-: > foo.c
-: > acconfig.h
-
 mkdir include
 : > include/Makefile.am
 : > include/config.h.in
@@ -50,4 +45,6 @@ mkdir include
 $ACLOCAL
 $AUTOMAKE
 
-$EGREP '^DEFAULT_INCLUDES =.* -I(\.|\$\(top_builddir\))/include' Makefile.in
+grep '^ *DEFAULT_INCLUDES *=.* -I\$(top_builddir)/include' Makefile.in
+
+:
diff --git a/tests/confh5.test b/tests/confh5.test
index febe000..9af83dc 100755
--- a/tests/confh5.test
+++ b/tests/confh5.test
@@ -21,14 +21,15 @@
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST([FOO], [name])
-AC_CONFIG_FILES(include/config.h.in)
-AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_HEADERS(include/config.h)
+AC_SUBST([FOO], [NameToBeGrepped])
+AC_CONFIG_FILES([include/config.h.in])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([include/config.h])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+.PHONY: test
 test: distdir
        test -f $(distdir)/config.h.in
        test -f $(distdir)/include/config.h.in.in
@@ -51,6 +52,10 @@ $MAKE
 $sleep
 echo '#undef @FOO@' > include/config.h.in.in
 $MAKE include/config.h
-grep '/\*.*#undef.*name' include/config.h
+# Don't try to be too strict in this grepping, since the substutition
+# is done by config.status, and we don't have too much control on it.
+grep '/\*.*#undef.*NameToBeGrepped' include/config.h
 $MAKE test
 $MAKE distcheck
+
+:
diff --git a/tests/confh6.test b/tests/confh6.test
new file mode 100755
index 0000000..532a2fd
--- /dev/null
+++ b/tests/confh6.test
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2010 Free Software
+# Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure config.h rule made even if it is in a subdir.  The
+# idea is that if config.h is in a subdir, and there is no Makefile in
+# that subdir, then we want to build config.h as the top level.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([subdir/config.h])
+AC_OUTPUT
+END
+
+: > Makefile.am
+mkdir subdir
+: > subdir/config.h.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE
+
+$sleep
+echo '#define gRePmE' > subdir/config.h.in
+$MAKE subdir/config.h
+$FGREP gRePmE subdir/config.h
+
+$MAKE distcheck
+
+:
diff --git a/tests/confh7.test b/tests/confh7.test
new file mode 100755
index 0000000..4e4f7da
--- /dev/null
+++ b/tests/confh7.test
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2010 Free Software
+# Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure several config headers are allowed.
+# See also sister "semantic" test `confh8.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([config.h two.h])
+END
+
+: > Makefile.am
+
+: > config.h.in
+: > two.h.in
+
+$ACLOCAL
+$AUTOMAKE
+
+# Try again with more macros.
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+$ACLOCAL --force
+$AUTOMAKE
+
+:
diff --git a/tests/confh8.test b/tests/confh8.test
new file mode 100755
index 0000000..146d2f0
--- /dev/null
+++ b/tests/confh8.test
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure several config headers are allowed.
+# See also sister "minimalistic" test `confh7.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([one.h two.h])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+.PHONY: test0 test1 test2
+test0:
+       @echo DIST_COMMON = $(DIST_COMMON)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]one\.h\.in '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]two\.h\.in '
+       : Processed header files should not be distributed.
+       if echo ' ' $(DIST_COMMON) ' ' | grep '\.h '; then \
+         exit 1; \
+       else \
+         exit 0; \
+       fi
+test1: all
+       test -f one.h
+       test -f two.h
+test2: distdir
+       ls -l $(distdir)/*
+       test -f $(distdir)/one.h.in
+       test -f $(distdir)/two.h.in
+       : Processed header files should not be distributed.
+       test ! -r $(distdir)/one.h
+       test ! -r $(distdir)/two.h
+check-local: test0 test1 test2
+END
+
+: > one.h.in
+: > two.h.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test0
+$MAKE test1
+$MAKE test2
+$MAKE distcheck
+
+:
diff --git a/tests/config.test b/tests/config.test
deleted file mode 100755
index bed9a92..0000000
--- a/tests/config.test
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure config.h rule made even if it is in a subdir.  The
-# idea is that if config.h is in a subdir, and there is no Makefile in
-# that subdir, then we want to build config.h as the top level.
-
-required=GNUmake
-. ./defs || Exit 1
-
-set -e
-
-cat >> configure.in << 'END'
-AM_CONFIG_HEADER(subdir/config.h)
-AC_OUTPUT
-END
-
-: > Makefile.am
-mkdir subdir
-: > subdir/config.h.in
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-./configure
-$MAKE
-
-$sleep
-echo '#define FOO' > subdir/config.h.in
-$MAKE subdir/config.h
-grep FOO subdir/config.h
-
-$MAKE distcheck
diff --git a/tests/configure.test b/tests/configure.test
index 838da68..0773a00 100755
--- a/tests/configure.test
+++ b/tests/configure.test
@@ -21,45 +21,36 @@
 
 set -e
 
-cat >configure.ac <<\EOF
-AC_INIT
-AM_INIT_AUTOMAKE([configure], [1.0])
+cat >configure.ac <<EOF
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
 EOF
 
 cat >configure.in <<EOF
-AC_INIT([configure], [1.0])
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([an-invalid-automake-option])
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-EOF
-
-cat >configure.in <<EOF
-AC_INIT([configure], [1.0])
-AM_INIT_AUTOMAKE([an-invalid-automake-option])
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
 EOF
 
 : >Makefile.am
 
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep 'configure.ac.*configure.in.*both present' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
 
 $ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 # Ensure we really proceed with configure.ac.
 AUTOMAKE_fails -Werror
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 AUTOMAKE_run 0 -Wno-error
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 :
diff --git a/tests/confincl.test b/tests/confincl.test
index dd0b63e..c4f0cde 100755
--- a/tests/confincl.test
+++ b/tests/confincl.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,18 +20,19 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
 
-cat > Makefile.am << 'EOF'
+cat > Makefile.am << 'END'
 bin_PROGRAMS = fred
-EOF
+END
+
+$ACLOCAL
+$AUTOMAKE
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$FGREP '@CONFIG_INCLUDE_SPEC@' Makefile.in && Exit 1
 
-if grep '@CONFIG_INCLUDE_SPEC@' Makefile.in; then
-   Exit 1
-fi
-Exit 0
+:
diff --git a/tests/conflnk.test b/tests/conflnk.test
index 6bc5970..8dfafbc 100755
--- a/tests/conflnk.test
+++ b/tests/conflnk.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,12 +29,12 @@ mkdir sdir
 mkdir sdir-no-make
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(dest:src)
-AC_CONFIG_LINKS(dest2:src)
-AC_CONFIG_LINKS(sdir/dest3:src)
-AC_CONFIG_LINKS(dest4:sdir/src2)
-AC_CONFIG_LINKS(sdir/dest5:sdir/src2 sdir-no-make/dest6:src)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([dest:src])
+AC_CONFIG_LINKS([dest2:src])
+AC_CONFIG_LINKS([sdir/dest3:src])
+AC_CONFIG_LINKS([dest4:sdir/src2])
+AC_CONFIG_LINKS([sdir/dest5:sdir/src2 sdir-no-make/dest6:src])
 AC_OUTPUT
 EOF
 
diff --git a/tests/conflnk2.test b/tests/conflnk2.test
index 8a045be..8c68c38 100755
--- a/tests/conflnk2.test
+++ b/tests/conflnk2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@ set -e
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test -f $(distdir)/src
        test -f $(distdir)/src2
@@ -42,10 +43,10 @@ mkdir sdir-no-make
 : > sdir-no-make/src4
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(dest:src)
-AC_CONFIG_LINKS(sdir/dest2:src2 sdir-no-make/dest3:sdir/src3)
-AC_CONFIG_LINKS(sdir/dest4:sdir-no-make/src4)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([dest:src])
+AC_CONFIG_LINKS([sdir/dest2:src2 sdir-no-make/dest3:sdir/src3])
+AC_CONFIG_LINKS([sdir/dest4:sdir-no-make/src4])
 AC_OUTPUT
 EOF
 
@@ -54,3 +55,5 @@ $AUTOMAKE
 $AUTOCONF
 ./configure
 $MAKE test
+
+:
diff --git a/tests/conflnk3.test b/tests/conflnk3.test
index 00e9da2..20f4786 100755
--- a/tests/conflnk3.test
+++ b/tests/conflnk3.test
@@ -23,6 +23,7 @@ set -e
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test ! -r $(distdir)/sdir/dest3
        test ! -r $(distdir)/sdir/dest2
@@ -41,16 +42,16 @@ mkdir sdir
 : > sdir/src3
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
+AC_CONFIG_FILES([sdir/Makefile])
 my_src_dir=sdir
 my_dest=dest
-AC_CONFIG_LINKS(sdir/dest2:src2 sdir/dest3:$my_src_dir/src3)
-AC_CONFIG_LINKS($my_dest:src)
+AC_CONFIG_LINKS([sdir/dest2:src2 sdir/dest3:$my_src_dir/src3])
+AC_CONFIG_LINKS([$my_dest:src])
 # the following is a link whose source is itself a link
-AC_CONFIG_LINKS(dest4:sdir/dest2)
+AC_CONFIG_LINKS([dest4:sdir/dest2])
 # Some package prefer to compute links.
 cmplink='dest5:src';
-AC_CONFIG_LINKS($cmplink)
+AC_CONFIG_LINKS([$cmplink])
 AC_OUTPUT
 EOF
 
@@ -79,9 +80,9 @@ test -r dest5 # ditto
 rm -f dest dest5
 test ! -r dest4
 
-## Cannot do the following, because at the time of writing Autoconf
-## (2.59) does not support AC_CONFIG_LINKS source in the build tree.
-# mkdir build
-# cd build
-# ../configure
-# $MAKE test
+mkdir build
+cd build
+../configure
+$MAKE test
+
+:
diff --git a/tests/conflnk4.test b/tests/conflnk4.test
index 4bedf52..fd96054 100755
--- a/tests/conflnk4.test
+++ b/tests/conflnk4.test
@@ -34,17 +34,20 @@ mkdir nonmk-subdir sdir sdir/mk-subdir
 
 cat >> Makefile.am <<'EOF'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test -f $(distdir)/src
        test -f $(distdir)/sdir/src2
+       test -f $(distdir)/nonmk-subdir/src3
+       test -f $(distdir)/sdir/mk-subdir/src4
 EOF
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(src:src)
-AC_CONFIG_LINKS(sdir/src2:sdir/src2)
-AC_CONFIG_LINKS(nonmk-subdir/src3:nonmk-subdir/src3)
-AC_CONFIG_LINKS(sdir/mk-subdir/src4:sdir/mk-subdir/src4)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([src:src])
+AC_CONFIG_LINKS([sdir/src2:sdir/src2])
+AC_CONFIG_LINKS([nonmk-subdir/src3:nonmk-subdir/src3])
+AC_CONFIG_LINKS([sdir/mk-subdir/src4:sdir/mk-subdir/src4])
 AC_OUTPUT
 EOF
 
@@ -56,7 +59,6 @@ mkdir build
 cd build
 ../configure
 
-# TODO: Make sure links are distributed
 $MAKE test
 
 # Make sure nothing is deleted by `make clean'
@@ -84,7 +86,6 @@ test -r sdir/mk-subdir/src4 && Exit 1
 cd ..
 ./configure
 
-# TODO: Make sure links are distributed
 $MAKE test
 
 # Make sure nothing is deleted by `make distclean'
@@ -94,3 +95,5 @@ test -f src
 test -f sdir/src2
 test -f nonmk-subdir/src3
 test -f sdir/mk-subdir/src4
+
+:
diff --git a/tests/confsub.test b/tests/confsub.test
index 65ec91b..a0d4fe3 100755
--- a/tests/confsub.test
+++ b/tests/confsub.test
@@ -39,8 +39,8 @@ END
 
 echo 'Before.' > subdir/config.hin
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # Make sure subdir Makefile.in doesn't itself look in the subdir.
 # One line is allowed though:
@@ -49,11 +49,13 @@ $AUTOMAKE || Exit 1
 ($FGREP 'subdir/config.h' subdir/Makefile.in |
    $FGREP -v 'cd $(top_builddir)') && Exit 1
 
-$AUTOCONF || Exit 1
-./configure || Exit 1
+$AUTOCONF
+./configure
 $FGREP 'Before.' subdir/config.h
 
 $sleep
 echo 'After.' > subdir/config.hin
-$MAKE || Exit 1
-$FGREP 'After.' subdir/config.h || Exit 1
+$MAKE
+$FGREP 'After.' subdir/config.h
+
+:
diff --git a/tests/confvar.test b/tests/confvar.test
index 99811b0..13cc7dd 100755
--- a/tests/confvar.test
+++ b/tests/confvar.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST(QBERT)
+AC_SUBST([QBERT])
 END
 
 : > Makefile.am
@@ -29,4 +29,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^QBERT' Makefile.in
+grep '^QBERT =' Makefile.in
+
+:
diff --git a/tests/confvar2.test b/tests/confvar2.test
index 75c02dc..1cfd2d3 100755
--- a/tests/confvar2.test
+++ b/tests/confvar2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST(OTHER_SCRIPTS)
+AC_SUBST([OTHER_SCRIPTS])
 END
 
 cat > Makefile.am << 'END'
@@ -30,3 +30,7 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+grep '^OTHER_SCRIPTS =' Makefile.in
+
+:
diff --git a/tests/cxxansi.test b/tests/cxxansi.test
index 8bbe9b2..9d6fd6e 100755
--- a/tests/cxxansi.test
+++ b/tests/cxxansi.test
@@ -39,7 +39,7 @@ END
 : > jane.C
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
 
 $FGREP 'jane$U' Makefile.in && Exit 1
 $FGREP 'doe$U' Makefile.in
diff --git a/tests/defs.in b/tests/defs.in
index da744c3..2959f8b 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -2,7 +2,7 @@
 # @configure_input@
 #
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,6 +34,18 @@ else
   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
 
+# A single whitespace character.
+sp=' '
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+
+# As autoconf-generated configure scripts do, ensure that IFS
+# is defined initially, so that saving and restoring $IFS works.
+IFS=$sp$tab$nl
+
 # Ensure we are running from the right directory.
 test -f ./defs || {
    echo "defs: not found in current directory" 1>&2
@@ -52,7 +64,32 @@ test -f "$srcdir/defs.in" || {
    exit 1
 }
 
-me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+# The name of the current test (without the `.test' suffix).
+# Test scripts can override it if they need to (but this should
+# be done carefully, and *before* including ./defs).
+if test -z "$me"; then
+  me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+elif env | grep '^me=' >/dev/null; then
+  echo "$0: variable \`me' is set in the environment: this is unsafe" >&2
+  exit 99
+fi
+
+# Check that the environment is properly sanitized.
+for var in required parallel_tests; do
+  if env | grep "^$var=" >/dev/null; then
+    echo "$me: variable \`$var' is set in the environment:" \
+         "this is unsafe" >&2
+    exit 99
+  fi
+done
+unset var
+
+# This might be used in testcases checking distribution-related features.
+# Test scripts are free to override this if they need to.
+distdir=$me-1.0
+
+APIVERSION='@APIVERSION@'
+PATH_SEPARATOR='@PATH_SEPARATOR@'
 
 # Make sure we override the user shell.
 SHELL='@SHELL@'
@@ -61,15 +98,14 @@ export SHELL
 test -z "$PERL" && PERL='@PERL@'
 test -z "$MAKE" && MAKE=make
 test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
+test -z "$AUTOM4TE" && AUTOM4TE="@am_AUTOM4TE@"
+test -z "$AUTORECONF" && AUTORECONF="@am_AUTORECONF@"
 test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
-test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
+test -z "$AUTOUPDATE" && AUTOUPDATE="@am_AUTOUPDATE@"
 test -z "$MISSING" && MISSING=`pwd`/../lib/missing
 # Use -Werror because this also turns some Perl warnings into error.
 # (Tests for which this is inappropriate should use -Wno-error.)
-test -z "$ACLOCAL" && ACLOCAL="address@hidden@ -Werror"
-# Extra flags to pass to aclocal before all other flags added by this script.
-ACLOCAL_TESTSUITE_FLAGS=
-export ACLOCAL_TESTSUITE_FLAGS
+test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
 
 # See how Automake should be run.  We put --foreign as the default
 # strictness to avoid having to create lots and lots of files.  A test
@@ -77,26 +113,80 @@ export ACLOCAL_TESTSUITE_FLAGS
 # -Werror by default.  Tests for which this is inappropriate
 # (e.g. when testing that a warning is enabled by a specific switch)
 # should use -Wnone or/and -Wno-error
-test -z "$AUTOMAKE" && AUTOMAKE="address@hidden@ --foreign -Werror -Wall"
+test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
 
-PATH="address@hidden@$PATH"
+PATH="`pwd`$PATH_SEPARATOR$PATH"
 echo "$PATH"
 # Some shells forget to export modified environment variables.
 # (See note about `export' in the Autoconf manual.)
 export PATH
 
+# We use a trap below for cleanup.  This requires us to go through
+# hoops to get the right exit status transported through the signal.
+# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit ()
+{
+  set +e
+  (exit $1)
+  exit $1
+}
+
+# Print warnings (e.g., about skipped and failed tests) to this file
+# number.  Override by putting, say:
+#   stderr_fileno_=9; export stderr_fileno_; exec 9>&2;
+# in the definition of AM_TESTS_ENVIRONMENT.
+# This is useful when using automake's parallel tests mode, to print the
+# reason for skip/failure to console, rather than to the *.log files.
+: ${stderr_fileno_=2}
+
+# Copied from Gnulib's `tests/init.sh'.
+warn_ () { echo "$@" 1>&$stderr_fileno_; }
+fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
+skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$me: hard error: $@"; Exit 99; }
+framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
+
+# cross_compiling
+# ---------------
+# Tell whether we are cross-compiling.  This is especially useful to skip
+# tests (or portions of them) that requires a native compiler.
+cross_compiling ()
+{
+  test x"$host_alias" != x
+}
+
+# So that we can force the use of correct gcc, g++ etc., consistently
+# with cross-compilation settings.
+if cross_compiling; then
+  am__tool_prefix="$host_alias-"
+else
+  am__tool_prefix=
+fi
+
 for tool in : $required
 do
   # Check that each required tool is present.
   case $tool in
     :) ;;
-    bison)
+    bison|yacc)
       # Since bison is required, we pick YACC for ./configure.
       YACC='bison -y'
       export YACC
       echo "$me: running bison --version"
       ( bison --version ) || exit 77
       ;;
+    flex|lex)
+      # Since flex is required, we pick LEX for ./configure.
+      LEX=flex
+      export LEX
+      echo "$me: running flex --version"
+      flex --version || exit 77
+      ;;
+    cc|c++|fortran|fortran77)
+      echo "$me: dummy requirement '$tool', no check done"
+      ;;
     bzip2)
       # Do not use --version, bzip2 still tries to compress stdin.
       echo "$me: running bzip2 --help"
@@ -128,24 +218,48 @@ do
       # always use it.  This is important only when the user
       # has defined CC in his environment, otherwise ./configure will
       # prefer gcc to other compilers.
-      CC=gcc
+      CC=${am__tool_prefix}gcc
       export CC
       echo "$me: running $CC --version"
       ( $CC --version ) || exit 77
       ;;
     gcj)
-      GCJ=gcj
+      GCJ=${am__tool_prefix}gcj
       export GCJ
       echo "$me: running $GCJ --version"
       ( $GCJ --version ) || exit 77
       ( $GCJ -v ) || exit 77
       ;;
     g++)
-      CXX=g++
+      CXX=${am__tool_prefix}g++
       export CXX
       echo "$me: running $CXX --version"
       ( $CXX --version ) || exit 77
       ;;
+    gfortran)
+      FC=${am__tool_prefix}gfortran
+      export FC
+      echo "$me: running $FC --version"
+      $FC --version || skip_ "GNU Fortran compiler not available"
+      echo "$me: running $FC -v"
+      $FC -v || skip_ "botched installation for GNU Fortran compiler"
+      case " $required " in
+        *\ g77\ *) ;;
+        *) F77=$FC; export F77;;
+      esac
+      ;;
+    g77)
+      F77=${am__tool_prefix}g77
+      export F77
+      echo "$me: running $F77 --version"
+      $F77 --version || skip_ "GNU Fortran 77 compiler not available"
+      echo "$me: running $F77 -v"
+      $F77 -v || skip_ "botched installation for GNU Fortran 77 compiler"
+      case " $required " in
+        *\ gfortran\ *) ;;
+        *) FC=$F77; export FC;;
+      esac
+      ;;
     icc)
       CC=icc
       export CC
@@ -156,6 +270,14 @@ do
       echo "$me: running $CC -V -help"
       ( $CC -V -help ) || exit 77
       ;;
+    javac)
+      # The Java compiler from JDK 1.5 (and presumably earlier versions)
+      # cannot handle the `-version' option by itself: it bails out
+      # telling that source files are missing.  Adding also the `-help'
+      # option seems to solve the problem.
+      echo "$me: running javac -version -help"
+      javac -version -help || exit 77
+      ;;
     makedepend)
       echo "$me: running makedepend -f-"
       ( makedepend -f- ) || exit 77
@@ -176,6 +298,9 @@ do
       rm -f $priv_check_temp
       test $overwrite_status = 0 && exit 77
       ;;
+    native)
+      cross_compiling && skip_ "doesn't work in cross-compile mode"
+      ;;
     python)
       # Python doesn't support --version, it has -V
       echo "$me: running python -V"
@@ -248,22 +373,10 @@ case "$srcdir" in
     ;;
 esac
 
-# We use a trap below for cleanup.  This requires us to go through
-# hoops to get the right exit status transported through the signal.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
-# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function.
-Exit ()
-{
-  set +e
-  (exit $1)
-  exit $1
-}
-
 curdir=`pwd`
 testSubDir=$me.dir
 test ! -d $testSubDir || {
-  find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
+  find $testSubDir -type d ! -perm -700 -exec chmod u+rwx {} ";"
   rm -rf $testSubDir
 }
 mkdir $testSubDir
@@ -275,7 +388,7 @@ if test "$sh_errexit_works" = yes; then
     cd "$curdir"
     case $exit_status,$keep_testdirs in
     0,)
-      find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
+      find $testSubDir -type d ! -perm -700 -exec chmod u+rwx {} ";"
       rm -rf $testSubDir
       ;;
     esac
@@ -325,11 +438,15 @@ unset DESTDIR
 unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
 unset htmldir includedir infodir libdir libexecdir localedir mandir
 unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+# Unset variables that might change the "make distcheck" behaviour.
+unset DISTCHECK_CONFIGURE_FLAGS AM_DISTCHECK_CONFIGURE_FLAGS
 # Also unset variables that control our test driver.  While not
 # conceptually independent, they cause some changed semantics we
 # need to control (and test for) in some of the tests to ensure
 # backward-compatible behavior.
+unset TESTS_ENVIRONMENT AM_TESTS_ENVIRONMENT
 unset DISABLE_HARD_ERRORS
+unset AM_COLOR_TESTS
 unset TESTS
 unset TEST_LOG_COMPILER
 unset TEST_LOGS
@@ -414,6 +531,16 @@ is_newest ()
   test -z "$is_newest_files"
 }
 
+# using_gmake
+# -----------
+# Return success if $MAKE is GNU make, return failure otherwise.
+using_gmake ()
+{
+  # Use --version AND -v, because SGI Make doesn't fail on --version.
+  # Also grep for GNU because newer versions of FreeBSD make do
+  # not complain about `--version' (they seem to silently ignore it).
+  $MAKE --version -v | grep GNU
+}
 
 # AUTOMAKE_run status [options...]
 # --------------------------------
@@ -439,6 +566,36 @@ AUTOMAKE_fails ()
   AUTOMAKE_run 1 ${1+"$@"}
 }
 
+commented_sed_unindent_prog='
+  /^$/b                    # Nothing to do for empty lines.
+  x                        # Get x<indent> into pattern space.
+  /^$/{                    # No prior x<indent>, go prepare it.
+    g                      # Copy this 1st non-blank line into pattern space.
+    s/^\(['"$tab"' ]*\).*/x\1/   # Prepare x<indent> in pattern space.
+  }                        # Now: x<indent> in pattern and <line> in hold.
+  G                        # Build x<indent>\n<line> in pattern space, and
+  h                        # duplicate it into hold space.
+  s/\n.*$//                # Restore x<indent> in pattern space, and
+  x                        # exchange with the above duplicate in hold space.
+  s/^x\(.*\)\n\1//         # Remove leading <indent> from <line>.
+  s/^x.*\n//               # Restore <line> when there is no leading <indent>.
+'
+
+# unindent [input files...]
+# -------------------------
+# Remove the "proper" amount of leading whitespace from the given files,
+# and output the result on stdout.  That amount is determined by looking
+# at the leading whitespace of the first non-blank line in the input
+# files.  If no input file is specified, standard input is implied.
+unindent ()
+{
+  if test x"$sed_unindent_prog" = x; then
+    sed_unindent_prog=`printf '%s\n' "$commented_sed_unindent_prog" | sed -e 
"s/  *# .*//"`
+  fi
+  sed "$sed_unindent_prog" ${1+"$@"}
+}
+sed_unindent_prog="" # Avoid interferences from the environment.
+
 # Turn on shell traces.
 set -x
 
diff --git a/tests/depcomp.test b/tests/depcomp.test
index 8b9be29..d5b6c78 100755
--- a/tests/depcomp.test
+++ b/tests/depcomp.test
@@ -40,12 +40,11 @@ END
 
 cp subdir/Makefile.am subdir2/Makefile.am
 
-: > subdir/foo.c
-: > subdir2/foo.c
-
 $ACLOCAL
 $AUTOMAKE --add-missing
 
 # There used to be a bug where this was created in the first subdir with C
 # sources in it instead of in $top_srcdir or $ac_auxdir
 test -f depcomp
+
+:
diff --git a/tests/depcomp10.test b/tests/depcomp10.test
new file mode 100755
index 0000000..0fa6c6a
--- /dev/null
+++ b/tests/depcomp10.test
@@ -0,0 +1,90 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# hp depmode should work with GNU make in VPATH mode (bug similar to
+# depcomp9.test).
+# For automake bug#8473.
+
+# Here's the bug: hp depmode will prefix VPATH to the object file name,
+# thus the second gmake will invoke depcomp with object='../../src/foo.o',
+# causing errors such as (broken on multiple lines for clarity):
+#   cpp: "", line 0: error 4066: Cannot create
+#        "../../gllib/.deps/nonblocking.TPo" file for
+#        "-M../../gllib/.deps/nonblocking.TPo" option.
+#        (No such file or directory[errno=2])
+
+required=GNUmake
+. ./defs || Exit 1
+
+mkdir src src/sub build
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_CONFIG_FILES([src/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = src
+END
+
+cat > src/Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c foo.h sub/subfoo.c
+END
+
+cat > src/foo.h <<EOF
+extern int subfoo (void);
+EOF
+
+cat >src/foo.c <<EOF
+#include "foo.h"
+int main (void)
+{
+  return subfoo ();
+}
+EOF
+
+cat >src/sub/subfoo.c <<EOF
+#include "foo.h"
+int subfoo (void)
+{
+  return 0;
+}
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+cd build
+../configure am_cv_CC_dependencies_compiler_type=hp
+# Do not error out with the first make, as the forced 'hp' depmode might
+# not actually work, but we have overridden the _AM_DEPENDENCIES tests.
+$MAKE || Exit 77
+
+# We must clean and rebuild, as the actual error only happens the second
+# time the objects are built because 'depcomp' has silently messed up the
+# .Po files the first time.
+$MAKE clean
+
+$MAKE >out 2>&1 || { cat out; Exit 1; }
+cat out
+grep 'src/[._]deps' out && Exit 1
+
+:
diff --git a/tests/depcomp2.test b/tests/depcomp2.test
index 2b4353c..e8e4a67 100755
--- a/tests/depcomp2.test
+++ b/tests/depcomp2.test
@@ -43,11 +43,12 @@ END
 : > subdir/foo.c
 
 # Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
+unset CFLAGS || :
 
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
-./configure CC='gcc' 2>error.log
-test -z "`cat error.log`"
+./configure 2>stderr || { cat stderr >&2; Exit 1; }
+test ! -s stderr
+
+:
diff --git a/tests/depcomp3.test b/tests/depcomp3.test
index 2a5db60..649fada 100755
--- a/tests/depcomp3.test
+++ b/tests/depcomp3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,14 +32,15 @@ AUTOMAKE_OPTIONS = subdir-objects
 check_PROGRAMS = prg
 prg_SOURCES = src/sub.c src/foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'src/sub.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
+       grep 'src/sub\.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
 
 END
 
 mkdir src
 
-touch src/foo.h
+: > src/foo.h
 
 cat >src/sub.c <<EOF
 #include "foo.h"
@@ -60,3 +61,5 @@ grep am_cv_CC_dependencies_compiler_type configure
 ./configure am_cv_CC_dependencies_compiler_type=dashmstdout
 $MAKE check
 $MAKE grepdeps
+
+:
diff --git a/tests/depcomp4.test b/tests/depcomp4.test
index 7d22894..4f2df97 100755
--- a/tests/depcomp4.test
+++ b/tests/depcomp4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,8 +31,9 @@ cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = liba.la
 liba_la_SOURCES = a.c foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'a.lo *:' ./$(DEPDIR)/a.Plo
+       grep 'a\.lo *:' ./$(DEPDIR)/a.Plo
 END
 
 : > foo.h
@@ -51,7 +52,9 @@ $AUTOMAKE -a
 grep am_cv_CC_dependencies_compiler_type configure
 
 ./configure am_cv_CC_dependencies_compiler_type=makedepend
-$MAKE >output 2>&1
+$MAKE >output 2>&1 || { cat output; Exit 1; }
 cat output
 grep 'unknown directive' output && Exit 1
 $MAKE grepdeps
+
+:
diff --git a/tests/depcomp5.test b/tests/depcomp5.test
index 9637288..4fe7e16 100755
--- a/tests/depcomp5.test
+++ b/tests/depcomp5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 required='icc'
 . ./defs || Exit 1
 
+set -e
+
 # Automake supports icc since version 7.0 through a dedicated depcomp mode.
 # icc 8.0 and greater understand gcc options, so depmode is set to gcc.
 if icc -V -help 2>&1 | grep 'Version 7'; then
@@ -27,8 +29,6 @@ else
   expect='depmode=gcc'
 fi
 
-set -e
-
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -40,8 +40,9 @@ AUTOMAKE_OPTIONS = subdir-objects
 check_PROGRAMS = prg
 prg_SOURCES = src/sub.c src/foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'src/sub.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
+       grep 'src/sub\.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
 
 END
 
@@ -66,3 +67,5 @@ $AUTOMAKE -a
 grep "$expect" Makefile
 $MAKE check
 $MAKE grepdeps
+
+:
diff --git a/tests/depcomp6.test b/tests/depcomp6.test
index 0b6a7f5..ea15e20 100755
--- a/tests/depcomp6.test
+++ b/tests/depcomp6.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_RANLIB
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
 END
 
@@ -47,7 +47,7 @@ cat >foo.c <<'END'
 #include "foo.h"
 #include "sub2/baz.h"
 #include <stdlib.h>
-int main() { printf("foo"); return bar() + baz(); }
+int main (void) { printf ("foo"); return bar () + baz (); }
 END
 
 cat >foo.h <<'END'
@@ -57,28 +57,28 @@ END
 
 cat >sub/bar.c <<'END'
 #include "sub/bar.h"
-int bar() { return 0; }
+int bar (void) { return 0; }
 END
 
 touch sub2/sub3/ba3.h
 
 cat >sub/bar.h <<'END'
 #include <stdio.h>
-extern int bar();
+extern int bar (void);
 END
 
 cat >sub2/baz.c <<'END'
 #include "baz.h"
-int baz() { return 0; }
+int baz (void) { return 0; }
 END
 
 cat >sub2/baz.h <<'END'
-extern int baz();
+extern int baz (void);
 END
 
 cat >sub2/sub3/ba3.c <<'END'
 #include "ba3.h"
-int ba3() { return 0; }
+int ba3 (void) { return 0; }
 END
 
 $ACLOCAL
@@ -86,14 +86,26 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure --enable-dependency-tracking
-$MAKE 
-
-# check that dependency tracking works
-if grep 'depmode=none' Makefile; then :
-else
-  cd sub2
-  $sleep
-  echo 'choke me' > sub3/ba3.h
-  if $MAKE; then Exit 1; fi
+$MAKE
+
+# Check that dependency tracking works.
+if grep 'depmode=none' Makefile; then
+  Exit 77
 fi
+
+cd sub2
+$sleep
+echo 'choke me' > sub3/ba3.h
+# Do not use `$MAKE && Exit 1' here, since even relatively-recent
+# versions of the BSD shell wrongly exit when the `errexit' shell
+# flag is active if a command within "&&" fails inside a compound
+# statement.
+if $MAKE; then Exit 1; else :; fi
+
+# Ensure the deleted header bug is fixed.
+rm -f sub3/ba3.h
+sed 1d sub3/ba3.c >sub3/ba3.t
+mv -f sub3/ba3.t sub3/ba3.c
+$MAKE
+
 :
diff --git a/tests/depcomp7.test b/tests/depcomp7.test
index 67702c7..47f09fc 100755
--- a/tests/depcomp7.test
+++ b/tests/depcomp7.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AM_PROG_LIBTOOL
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
 END
 
@@ -48,7 +48,7 @@ cat >foo.c <<'END'
 #include "foo.h"
 #include "sub2/baz.h"
 #include <stdlib.h>
-int main() { printf("foo"); return bar() + baz(); }
+int main (void) { printf ("foo"); return bar () + baz (); }
 END
 
 cat >foo.h <<'END'
@@ -58,28 +58,28 @@ END
 
 cat >sub/bar.c <<'END'
 #include "sub/bar.h"
-int bar() { return 0; }
+int bar (void) { return 0; }
 END
 
 echo 'extern int x;' > sub2/sub3/ba3.h
 
 cat >sub/bar.h <<'END'
 #include <stdio.h>
-extern int bar();
+extern int bar (void);
 END
 
 cat >sub2/baz.c <<'END'
 #include "baz.h"
-int baz() { return 0; }
+int baz (void) { return 0; }
 END
 
 cat >sub2/baz.h <<'END'
-extern int baz();
+extern int baz (void);
 END
 
-cat >sub2/sub3/ba3.c <<'END'
+cat >sub2/sub3/ba3.in <<'END'
 #include "ba3.h"
-int ba3() { return 0; }
+int ba3 (void) { return 0; }
 END
 
 libtoolize
@@ -87,17 +87,32 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
+st=0
 for staticshared in --disable-shared "" --disable-static; do
+
+  cp sub2/sub3/ba3.in sub2/sub3/ba3.c
   ./configure --enable-dependency-tracking $staticshared
-  $MAKE 
+  $MAKE
 
-  # check that dependency tracking works
-  if grep 'depmode=none' Makefile; then :
+  # If we cannot enable dependency tracking, perform only the most basic
+  # checks, and don't consider this test to be PASSed but SKIPped, because
+  # the main purpose of this test is exposing the depmode features.
+  if grep 'depmode=none' Makefile; then
+    st=77
   else
     cd sub2
     $sleep
     echo 'choke me' > sub3/ba3.h
-    if $MAKE; then Exit 1; fi
+    # Do not use `$MAKE && Exit 1' here, since even relatively-recent
+    # versions of the BSD shell wrongly exit when the `errexit' shell
+    # flag is active if a command within "&&" fails inside a compound
+    # statement.
+    if $MAKE; then Exit 1; else :; fi
+
+    # Ensure the deleted header bug is fixed.
+    rm -f sub3/ba3.h
+    sed 1d sub3/ba3.in >sub3/ba3.c
+    $MAKE
     cd ..
   fi
 
@@ -106,4 +121,7 @@ for staticshared in --disable-shared "" --disable-static; do
   test ! -f sub2/sub3/ba3.d
 
   echo 'extern int x;' > sub2/sub3/ba3.h
+
 done
+
+Exit $st
diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test
new file mode 100755
index 0000000..ea14c3f
--- /dev/null
+++ b/tests/depcomp8a.test
@@ -0,0 +1,81 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test for regressions in computation of names of .Po files for
+# automatic dependency tracking.
+# Keep this in sync with sister test `depcomp8b.test', which checks the
+# same thing for libtool objects.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = foo.c sub/bar.c
+END
+
+mkdir sub
+cat > foo.c << 'END'
+int main (void)
+{
+  extern int bar;
+  return bar;
+}
+END
+cat > sub/bar.c << 'END'
+extern int bar = 0;
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+grep include Makefile.in # for debugging
+grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
+grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
+grep 'include.*/\./\$(DEPDIR)' Makefile.in && Exit 1
+
+$AUTOCONF
+# Don't reject slower dependency extractors, for better coverage.
+./configure --enable-dependency-tracking
+$MAKE
+./zardoz
+DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
+
+# Try again with subdir-objects option.
+
+echo AM_PROG_CC_C_O >> configure.in
+echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+
+$ACLOCAL
+$AUTOMAKE -a
+grep include Makefile.in # for debugging
+grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
+grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
+$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && Exit 1
+
+$AUTOCONF
+# Don't reject slower dependency extractors, for better coverage.
+./configure --enable-dependency-tracking
+$MAKE
+./zardoz
+DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
+
+:
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
new file mode 100755
index 0000000..d36e754
--- /dev/null
+++ b/tests/depcomp8b.test
@@ -0,0 +1,75 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test for regressions in computation of names of .Plo files for
+# automatic dependency tracking.
+# Keep this in sync with sister test `depcomp8a.test', which checks the
+# same thing for non-libtool objects.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LTLIBRARIES = libzardoz.la
+libzardoz_la_SOURCES = foo.c sub/bar.c
+END
+
+mkdir sub
+echo 'extern int foo = 0;' > foo.c
+echo 'extern int bar = 0;' > sub/bar.c
+
+libtoolize
+
+$ACLOCAL
+$AUTOMAKE -a
+grep include Makefile.in # for debugging
+grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
+grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
+grep 'include.*/\./\$(DEPDIR)' Makefile.in && Exit 1
+
+$AUTOCONF
+# Don't reject slower dependency extractors, for better coverage.
+./configure --enable-dependency-tracking
+$MAKE
+DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
+
+# Try again with subdir-objects option.
+
+echo AM_PROG_CC_C_O >> configure.in
+echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+
+$ACLOCAL
+$AUTOMAKE -a
+grep include Makefile.in # for debugging
+grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
+grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
+$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && Exit 1
+
+$AUTOCONF
+# Don't reject slower dependency extractors, for better coverage.
+./configure --enable-dependency-tracking
+$MAKE
+DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
+
+:
diff --git a/tests/depcomp9.test b/tests/depcomp9.test
new file mode 100755
index 0000000..9972c3d
--- /dev/null
+++ b/tests/depcomp9.test
@@ -0,0 +1,92 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# makedepend should work in VPATH mode.
+
+# Here's the bug: makedepend will prefix VPATH to the object file name,
+# thus the second make will invoke depcomp with object='../../src/foo.o',
+# causing errors such as:
+# touch: cannot touch `../../src/.deps/foo.TPo': No such file or directory
+# makedepend: error:  cannot open "../../src/.deps/foo.TPo"
+# ../../depcomp: line 560: ../../src/.deps/foo.TPo: No such file or directory
+
+# We include subfoo only to be sure that we don't remove too much
+# from the object file name.
+
+required='makedepend'
+. ./defs || Exit 1
+
+mkdir src src/sub build
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_CONFIG_FILES([src/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = src
+END
+
+cat > src/Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c foo.h sub/subfoo.c
+END
+
+cat > src/foo.h <<EOF
+extern int subfoo (void);
+EOF
+
+cat >src/foo.c <<EOF
+#include "foo.h"
+int main (void)
+{
+  return subfoo ();
+}
+EOF
+
+cat >src/sub/subfoo.c <<EOF
+#include "foo.h"
+int subfoo (void)
+{
+  return 0;
+}
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+cd build
+../configure am_cv_CC_dependencies_compiler_type=makedepend
+
+# Do not error out with the first make, as the forced 'makedepend'
+# depmode might not actually work, but we have overridden the
+# _AM_DEPENDENCIES tests.
+$MAKE || Exit 77
+
+# We must clean and rebuild, as the actual error only happens the second
+# time the objects are built because 'makedepend' has silently messed up
+# the .Po files the first time.
+$MAKE clean
+
+$MAKE >out 2>&1 || { cat out; Exit 1; }
+cat out
+grep 'src/[._]deps' out && Exit 1
+
+:
diff --git a/tests/dirforbid.test b/tests/dirforbid.test
deleted file mode 100755
index 3ab319d..0000000
--- a/tests/dirforbid.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# All primaries cannot be used with all directories.
-# Automake should flag them as errors.
-# For PR/294
-
-. ./defs || Exit 1
-
-set -e
-
-cat >> configure.in <<'END'
-AC_PROG_CC
-END
-
-# Try some (not all) disallowed variables
-for i in data_PROGRAMS lib_HEADERS ; do
-  cat > Makefile.am << END
-$i = foo
-END
-  $ACLOCAL
-  AUTOMAKE_fails -a
-  grep 'Makefile.am:1:.*directory' stderr
-done
-:
diff --git a/tests/include2.test b/tests/dist-included-parent-dir.test
similarity index 100%
rename from tests/include2.test
rename to tests/dist-included-parent-dir.test
diff --git a/tests/distcheck-configure-flags-am.test 
b/tests/distcheck-configure-flags-am.test
new file mode 100755
index 0000000..dc31ee3
--- /dev/null
+++ b/tests/distcheck-configure-flags-am.test
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check support for AM_DISTCHECK_CONFIGURE_FLAGS at "make distcheck"
+# time, and its interactions with DISTCHECK_CONFIGURE_FLAGS.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
+AS_IF([test $success = yes && test "$sentence" = 'it works :-)'],
+      [:],
+      [AC_MSG_ERROR([success='$success', sentence='$sentence'])])
+AC_OUTPUT
+END
+
+unset sentence || :
+
+cat > Makefile.am << 'END'
+AM_DISTCHECK_CONFIGURE_FLAGS = $(dc_flags1) $(dc_flags2)
+dc_flags1 = --enable-success sentence='it works :-)'
+dc_flags2 =
+END
+
+$ACLOCAL
+$AUTOMAKE
+$FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
+$FGREP '$(AM_DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
+grep 'DISTCHECK_CONFIGURE_FLAGS.*AM_DISTCHECK_CONFIGURE_FLAGS' Makefile.in \
+  && Exit 1
+
+$AUTOCONF
+./configure --enable-success sentence='it works :-)'
+
+# The configure call in "make distcheck" should honour
+# $(AM_DISTCHECK_CONFIGURE_FLAGS).
+
+$MAKE distcheck
+
+# $(DISTCHECK_CONFIGURE_FLAGS) takes precedence over
+# $(AM_DISTCHECK_CONFIGURE_FLAGS)
+
+cat >> Makefile.am << 'END'
+dc_flags2 += --disable-success
+END
+$AUTOMAKE Makefile
+./config.status Makefile
+
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+grep "^configure:.* success='no', sentence='it works :-)'" output
+
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes"
+
+:
diff --git a/tests/distcheck-configure-flags-subpkg.test 
b/tests/distcheck-configure-flags-subpkg.test
new file mode 100755
index 0000000..695b47c
--- /dev/null
+++ b/tests/distcheck-configure-flags-subpkg.test
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check AM_DISTCHECK_CONFIGURE_FLAGS and DISTCHECK_CONFIGURE_FLAGS
+# are not honored in a subpackage Makefile.am, but the flags from
+# AM_DISTCHECK_CONFIGURE_FLAGS and DISTCHECK_CONFIGURE_FLAGS are
+# passed down to the configure script of the subpackage.  This is
+# explicitly documented in the manual.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_SUBDIRS([subpkg])
+if test $dc != ok || test $am_dc != ok; then
+  AC_MSG_ERROR([dc=$dc am_dc=$dc])
+fi
+AC_OUTPUT
+END
+
+mkdir subpkg
+
+sed <configure.in >subpkg/configure.in \
+    -e 's/^AC_INIT.*/AC_INIT([subpkg], [2.0])/' \
+    -e '/^AC_CONFIG_SUBDIRS/d' \
+
+cat configure.in
+cat subpkg/configure.in
+
+dc=KO am_dc=KO; export dc am_dc
+
+cat > Makefile.am << 'END'
+AM_DISTCHECK_CONFIGURE_FLAGS = am_dc=ok
+DISTCHECK_CONFIGURE_FLAGS = dc=ok
+END
+
+: > subpkg/Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+cd subpkg
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+cd ..
+
+# For debugging.
+$FGREP 'DISTCHECK_CONFIGURE_FLAGS' Makefile.in subpkg/Makefile.in
+
+grep '^AM_DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
+grep '^DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
+$EGREP '^(AM_)?DISTCHECK_CONFIGURE_FLAGS' subpkg/Makefile.in && Exit 1
+
+./configure dc=ok am_dc=ok
+
+# Flags in $(DISTCHECK_CONFIGURE_FLAGS) and $(AM_DISTCHECK_CONFIGURE_FLAGS)
+# should be passed down to the subpackage configure when "make distcheck"
+# is run from the top-level package ...
+$MAKE distcheck
+
+# ... but not when "make distcheck" is run from the subpackage.
+cd subpkg
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+grep '^configure:.* dc=KO am_dc=KO' output
+
+:
diff --git a/tests/distcheck-configure-flags.test 
b/tests/distcheck-configure-flags.test
new file mode 100755
index 0000000..117d83c
--- /dev/null
+++ b/tests/distcheck-configure-flags.test
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check support for DISTCHECK_CONFIGURE_FLAGS at "make distcheck" time.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
+AS_IF([test $success = yes && test "$sentence" = 'it works :-)'],
+      [:],
+      [AC_MSG_ERROR([success='$success', sentence='$sentence'])])
+AC_OUTPUT
+END
+
+unset sentence || :
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+$FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
+
+$AUTOCONF
+./configure --enable-success sentence='it works :-)'
+
+# It should be ok to define DISTCHECK_CONFIGURE_FLAGS either on the
+# make command line or in the environment.
+
+env DISTCHECK_CONFIGURE_FLAGS='--enable-success sentence=it\ works\ :-\)' \
+  $MAKE distcheck # Not `make -e' here, deliberately.
+
+$MAKE distcheck \
+  DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes sentence='it works :-)'"
+
+# Sanity check.
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+grep "^configure:.* success='no', sentence=''" output
+
+:
diff --git a/tests/distcheck-hook.test b/tests/distcheck-hook.test
new file mode 100755
index 0000000..9a2c384
--- /dev/null
+++ b/tests/distcheck-hook.test
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check basic support for distcheck-hook.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+distcheck-hook:
+       ls -l $(distdir)
+       chmod u+w $(distdir)
+       : > $(distdir)/dc-hook-has-run
+       chmod a-w $(distdir)
+check-local:
+       ls -l $(srcdir)
+       test -f $(srcdir)/dc-hook-has-run
+END
+
+$ACLOCAL
+$AUTOMAKE
+$FGREP 'distcheck-hook' Makefile.in
+$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
+grep '^distcheck-hook:' Makefile.in
+
+$AUTOCONF
+./configure
+
+$MAKE
+$MAKE check && Exit 1
+$MAKE distdir
+test -f $distdir/dc-hook-has-run && Exit 1
+$MAKE distcheck
+
+:
diff --git a/tests/distcheck-hook2.test b/tests/distcheck-hook2.test
new file mode 100755
index 0000000..befc1d6
--- /dev/null
+++ b/tests/distcheck-hook2.test
@@ -0,0 +1,81 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that no 'distcheck-hook' target is created automatically by
+# Automake, and that a used-defined 'distcheck-hook' is *not* honored
+# in a subpackage Makefile.am.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_SUBDIRS([subpkg])
+AC_OUTPUT
+END
+
+mkdir subpkg
+
+cat > subpkg/configure.in << 'END'
+AC_INIT([subpkg], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+distcheck-hook:
+       ls -l $(distdir)
+       chmod u+w $(distdir)
+       : > $(distdir)/dc-hook-has-run
+       chmod a-w $(distdir)
+check-local:
+       ls -l $(srcdir)
+       test -f $(srcdir)/dc-hook-has-run
+END
+
+cat > subpkg/Makefile.am <<'END'
+check-local:
+       ls -l $(srcdir)
+       test ! -r $(srcdir)/dc-hook-has-run
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+cd subpkg
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+cd ..
+
+# For debugging.
+$FGREP 'distcheck-hook' Makefile.in subpkg/Makefile.in
+
+$FGREP 'distcheck-hook' subpkg/Makefile.in && Exit 1
+$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
+grep '^distcheck-hook:' Makefile.in
+
+./configure
+
+$MAKE
+$MAKE check && Exit 1
+cd subpkg
+$MAKE check
+cd ..
+$MAKE distcheck
+
+:
diff --git a/tests/distlinksbrk.test b/tests/distlinksbrk.test
index 1e478ab..2314408 100755
--- a/tests/distlinksbrk.test
+++ b/tests/distlinksbrk.test
@@ -49,30 +49,25 @@ test -h $lnk2
 test -h $lnka
 test -h $lnkb
 
-cat >>configure.in <<END
+cat >> configure.in <<'END'
 AC_OUTPUT
 END
 
-cat > Makefile.am <<END
-EXTRA_DIST = $lnk1 $lnk2 $lnka $lnkb
-END
-
-ls -l
-
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
-./configure
 
-# Distribution must fail.
-$MAKE distdir && Exit 1
+ls -l # for debugging
 
-# Names of distributed broken symlinks should be reported in make output.
-$MAKE -k distdir >out 2>&1 || : # don't trust the exit status of make -k
-cat out
-$FGREP $lnk1 out
-$FGREP $lnk2 out
-$FGREP $lnka out
-$FGREP $lnkb out
+# Don't try to use "make -k", because some botched make implementations
+# (HP-UX, IRIX) might still exit on the first error in this situations.
+for lnk in $lnk1 $lnk2 $lnka $lnkb; do
+  echo "EXTRA_DIST = $lnk" > Makefile.am
+  $AUTOMAKE
+  ./configure
+  # Distribution must fail, with a decent error message.
+  $MAKE distdir >out 2>&1 && { cat out; Exit 1; }
+  cat out
+  $FGREP $lnk out
+done
 
 :
diff --git a/tests/dmalloc.test b/tests/dmalloc.test
new file mode 100755
index 0000000..629c949
--- /dev/null
+++ b/tests/dmalloc.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Simple checks on the `AM_WITH_DMALLOC' macro.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_HEADERS([config.h])
+AM_WITH_DMALLOC
+AC_SUBST([LDFLAGS])
+AC_OUTPUT
+END
+
+cat > config.h.in <<'END'
+#undef WITH_DMALLOC
+END
+
+cat > Makefile.am <<'END'
+check-with-dmalloc:
+## The AM_WITH_DMALLOC assumes that the user is a developer, so that
+## he is expected to install and make available the `dmalloc' library
+## by his own.  So we just check that proper linker and libs flags get
+## added.
+       echo ' ' $(LDFLAGS) ' ' | grep ' -g '
+       echo ' ' $(LIBS) ' ' | grep ' -ldmalloc '
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+cat config.h # debug info
+grep '^ */\* *# *undef  *WITH_DMALLOC *\*/ *$' config.h
+
+./configure --without-dmalloc
+cat config.h # debug info
+grep '^ */\* *# *undef  *WITH_DMALLOC *\*/ *$' config.h
+
+./configure --with-dmalloc
+cat config.h # debug info
+grep '^# *define  *WITH_DMALLOC  *1 *$' config.h
+$MAKE check-with-dmalloc
+
+:
diff --git a/tests/doc-parsing-buglets-colneq-subst.test 
b/tests/doc-parsing-buglets-colneq-subst.test
new file mode 100755
index 0000000..685d2b6
--- /dev/null
+++ b/tests/doc-parsing-buglets-colneq-subst.test
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check a documented limitation of the Automake's Makefile parser
+# w.r.t. POSIX variable substitutions used in the name of targets.
+# See Section "General Operation" in the Automake manual.
+# If you cause some parts of this test to fail, chances are that you've
+# improved the Automake parser ;-)
+# See: <http://lists.gnu.org/archive/html/automake/2010-08/msg00074.html>
+# or: 
<http://thread.gmane.org/gmane.comp.sysutils.automake.general/11943/focus=11962>
+
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am <<'END'
+$(FOO:=x): bar
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+
+grep 'bad characters.*variable name.*\$(FOO' stderr
+grep ':=.*assignments.*not portable' stderr
+
+:
diff --git a/tests/doc-parsing-buglets-tabs.test 
b/tests/doc-parsing-buglets-tabs.test
new file mode 100755
index 0000000..acff363
--- /dev/null
+++ b/tests/doc-parsing-buglets-tabs.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check the documented limitation of the Automake's Makefile parser w.r.t.
+# use of TAB characters; see Section "General Operation" in the Automake
+# manual, and automake bug#8360.
+# If you cause some parts of this test to fail, chances are that you've
+# improved the Automake parser ;-)
+
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am <<END
+.PHONY: test
+test: all check
+
+fail:
address@hidden "'\$@ recipe executed'"; exit 1
+
+## This won't be recognized as a target+recipe by Automake.
+all-local${tab}:
address@hidden 1
+
+## This won't be recognized as a target+rdependency by Automake.
+all-local${tab}: fail
+
+just_to_separate: dummy deps
+
+## This won't be recognized as a variable assignment by Automake.
+${tab}bin_PROGRAMS = foo
+END
+
+echo AC_OUTPUT >> configure.in
+
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP '$(EXEEEXT)' Makefile.in && Exit 1
+grep 'all:.*all-local' Makefile.in && Exit 1
+grep "^${tab}bin_PROGRAMS = foo" Makefile.in
+
+$AUTOCONF
+./configure
+
+$MAKE test
+
+:
diff --git a/tests/dollarvar.test b/tests/dollarvar.test
index bdc73ab..7105cb0 100755
--- a/tests/dollarvar.test
+++ b/tests/dollarvar.test
@@ -22,7 +22,7 @@
 # containing a `$' on the left hand side of an assignment are not
 # portable in practice, even though POSIX allows them.  :-/
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/dollarvar2.test b/tests/dollarvar2.test
index 0d12afd..6fc2737 100755
--- a/tests/dollarvar2.test
+++ b/tests/dollarvar2.test
@@ -17,7 +17,7 @@
 # Test to make sure that -Wportability turns on portability-recursive,
 # likewise for -Wno-...
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/flibs.test b/tests/flibs.test
index b9fe541..d35c4c6 100755
--- a/tests/flibs.test
+++ b/tests/flibs.test
@@ -48,6 +48,8 @@ zardoz_LDADD = @FLIBS@
 END
 
 : > zardoz.f
+: > config.guess
+: > config.sub
 
 $ACLOCAL
 $AUTOMAKE
diff --git a/tests/fn99.test b/tests/fn99.test
index 982a989..a63f2ca 100755
--- a/tests/fn99.test
+++ b/tests/fn99.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,6 +34,9 @@ do
   touch x
 done) || Exit 77
 
+# AIX 5.3 `cp -R' is too buggy for `make dist'.
+cp -R 12345678 t || Exit 77
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
diff --git a/tests/fn99subdir.test b/tests/fn99subdir.test
index 465f2af..33ac663 100755
--- a/tests/fn99subdir.test
+++ b/tests/fn99subdir.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -55,6 +55,9 @@ do
   touch x
 done)
 
+# AIX 5.3 `cp -R' is too buggy for `make dist'.
+cp -R ${subdirname} t || Exit 77
+
 for init_dir in ${subdirname} .; do
        (
                cd ${init_dir} || Exit 1
diff --git a/tests/fort4.test b/tests/fort4.test
index 605a377..84df399 100755
--- a/tests/fort4.test
+++ b/tests/fort4.test
@@ -62,12 +62,12 @@ cat >Makefile.am <<'END'
 bin_PROGRAMS = hello goodbye
 hello_SOURCES = hello.f foo.f90 sub/bar.f90
 goodbye_SOURCES = bye.f90 sub/baz.f
-goodbye_FCFLAGS = 
+goodbye_FCFLAGS =
 LDADD = $(FCLIBS)
 END
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -a
 # The Fortran 77 linker should be preferred:
 grep '.\$(FCLINK)' Makefile.in && Exit 1
 
diff --git a/tests/fort5.test b/tests/fort5.test
index cd2a7d5..d6151a7 100755
--- a/tests/fort5.test
+++ b/tests/fort5.test
@@ -70,7 +70,7 @@ hello_LDADD = libhello.la
 libhello_la_SOURCES = foo.f90 sub/bar.f90
 libhello_la_LIBADD = libgoodbye.la
 libgoodbye_la_SOURCES = bye.f90 sub/baz.f
-libgoodbye_la_FCFLAGS = 
+libgoodbye_la_FCFLAGS =
 LDADD = $(FCLIBS)
 END
 
diff --git a/tests/fpinst2.test b/tests/fpinst2.test
deleted file mode 100755
index c6b4900..0000000
--- a/tests/fpinst2.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure "reversed" order of AC_PROG_INSTALL and
-# AC_PROG_INSTALL is not buggy.
-
-. ./defs || Exit 1
-
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile)
-END
-
-cat > Makefile.am <<'END'
-bin_SCRIPTS = zot
-END
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
diff --git a/tests/fpinstall.test b/tests/fpinstall.test
deleted file mode 100755
index 6c645eb..0000000
--- a/tests/fpinstall.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test for bug reported by Thomas Morgan.  If both AC_PROG_INSTALL and
-# AC_PROG_INSTALL appear in configure.in, bad error results.
-
-. ./defs || Exit 1
-
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile)
-END
-
-cat > Makefile.am <<'END'
-bin_SCRIPTS = zot
-END
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
diff --git a/tests/gen-parallel-tests b/tests/gen-parallel-tests
index 39f5d1e..451fb77 100755
--- a/tests/gen-parallel-tests
+++ b/tests/gen-parallel-tests
@@ -19,6 +19,14 @@
 # For each test in the TESTS list in this Makefile.am file, that itself
 # tests features of the TESTS automake interface, generate a sibling
 # test that does likewise, but with the option `parallel-tests' enabled.
+# Individual tests can prevent the creation of such a sibling by
+# explicitly setting the `$parallel_tests' variable to either "yes" or
+# "no".  The rationale for this is that if the variable is set to "yes",
+# the test already uses the `parallel-tests' option, so that a sibling
+# would be just a duplicate; while if the variable is set to "no", the
+# test doesn't support, or is not meant to run with, the `parallel-tests'
+# option, and forcing it to do so in the sibling would likely cause a
+# spurious failure.
 
 set -e
 
@@ -31,8 +39,7 @@ grep -v '.-p\.test' |
 LC_ALL=C sort -u |
 while read tst; do
   if grep '^[^#]*parallel-tests' $tst >/dev/null \
-     || grep "parallel_tests=yes" $tst >/dev/null \
-     || grep "parallel_tests=['\"]yes" $tst >/dev/null
+     || grep "parallel_tests=" $tst >/dev/null
   then :; else echo $tst; fi;
 done |
 {
diff --git a/tests/include.test b/tests/hdr-vars-defined-once.test
similarity index 100%
rename from tests/include.test
rename to tests/hdr-vars-defined-once.test
diff --git a/tests/help-depend.test b/tests/help-depend.test
new file mode 100755
index 0000000..e676e5e
--- /dev/null
+++ b/tests/help-depend.test
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our private macro `AM_DEP_TRACK' adds proper text to
+# the configure help screen.
+# Keep this in sync with sister test `help-depend2.test'
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_DEP_TRACK
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^  *--enable-dependency-tracking( |$)' stdout
+$EGREP '^  *--disable-dependency-tracking( |$)' stdout
+$FGREP ' speeds up one-time build' stdout
+$FGREP ' slow dependency extract' stdout
+
+:
diff --git a/tests/help-depend2.test b/tests/help-depend2.test
new file mode 100755
index 0000000..6bad661
--- /dev/null
+++ b/tests/help-depend2.test
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that when automake automatically activates support for
+# dependency tracking, it adds proper text to the configure help screen.
+# Keep this in sync with sister test `help-depend.test'
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^  *--enable-dependency-tracking( |$)' stdout
+$EGREP '^  *--disable-dependency-tracking( |$)' stdout
+$FGREP ' speeds up one-time build' stdout
+$FGREP ' slow dependency extract' stdout
+
+:
diff --git a/tests/help-dmalloc.test b/tests/help-dmalloc.test
new file mode 100755
index 0000000..51b3ba4
--- /dev/null
+++ b/tests/help-dmalloc.test
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_WITH_DMALLOC' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_WITH_DMALLOC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^   *--with-dmalloc( |$) ' stdout
+$FGREP ' use dmalloc' stdout
+$FGREP 'www.dmalloc.com' stdout
+
+:
diff --git a/tests/help-init.test b/tests/help-init.test
new file mode 100755
index 0000000..fdd9fa0
--- /dev/null
+++ b/tests/help-init.test
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our grand macro `AM_INIT_AUTOMAKE' add proper text
+# to the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep '^  *--program-prefix[= ]' stdout
+grep '^  *--program-suffix[= ]' stdout
+grep '^  *--program-transform-name[= ]' stdout
+
+:
diff --git a/tests/help-lispdir.test b/tests/help-lispdir.test
new file mode 100755
index 0000000..5eb7ab9
--- /dev/null
+++ b/tests/help-lispdir.test
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_PATH_LISPDIR' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_PATH_LISPDIR
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^  *--with-lispdir( |$)' stdout
+grep ' override.*lisp directory' stdout
+$EGREP '^  *EMACS( |$)' stdout
+grep ' .*[eE]macs editor' stdout
+$EGREP '^  *EMACSLOADPATH( |$)' stdout
+grep ' .*[eE]macs library search path' stdout
+
+:
diff --git a/tests/help-maintainer.test b/tests/help-maintainer.test
new file mode 100755
index 0000000..6933d0c
--- /dev/null
+++ b/tests/help-maintainer.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_MAINTAINER_MODE' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_MAINTAINER_MODE
+END
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+$EGREP '^  *--enable-maintainer-mode( |$)' stdout
+$FGREP ' enable make rules' stdout
+
+rm -rf autom4te*.cache # just to be sure
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in >t
+mv -f t configure.in
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+$EGREP '^  *--enable-maintainer-mode( |$)' stdout
+$FGREP ' enable make rules' stdout
+
+rm -rf autom4te*.cache # just to be sure
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in >t
+mv -f t configure.in
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+$EGREP '^  *--disable-maintainer-mode( |$)' stdout
+$FGREP ' disable make rules' stdout
+
+:
diff --git a/tests/help-multilib.test b/tests/help-multilib.test
new file mode 100755
index 0000000..1657c34
--- /dev/null
+++ b/tests/help-multilib.test
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_ENABLE_MULTILIB' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_ENABLE_MULTILIB
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^  *--enable-multilib( |$)' stdout
+$FGREP ' many library versions (default)' stdout
+
+:
diff --git a/tests/help-python.test b/tests/help-python.test
new file mode 100755
index 0000000..ba20013
--- /dev/null
+++ b/tests/help-python.test
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that macro `AM_PATH_PYTHON' adds proper text to the
+# configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_PATH_PYTHON
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep '^  *PYTHON  *the Python interpreter$' stdout
+
+:
diff --git a/tests/help-regex.test b/tests/help-regex.test
new file mode 100755
index 0000000..3eff5f9
--- /dev/null
+++ b/tests/help-regex.test
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that obsolescent macro `AM_WITH_REGEX' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_WITH_REGEX
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$FGREP ' --without-regex ' stdout
+$FGREP ' use GNU rx ' stdout
+
+:
diff --git a/tests/help-silent.test b/tests/help-silent.test
new file mode 100755
index 0000000..e59f2f1
--- /dev/null
+++ b/tests/help-silent.test
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_SILENT_RULES' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_SILENT_RULES
+END
+
+$ACLOCAL
+
+mv -f configure.in configure.tmpl
+
+for args in '' '([])' '([yes])' '([no])'; do
+  sed "s/AM_SILENT_RULES.*/&$args/" configure.tmpl >configure.in
+  cat configure.in
+  $AUTOCONF --force
+  ./configure --help >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  $EGREP '^  *--enable-silent-rules( |$)' stdout
+  grep ' less verbose build.*undo.*make V=1' stdout
+  $EGREP '^  *--disable-silent-rules ( |$)' stdout
+  grep ' verbose build.*undo.*make V=0' stdout
+done
+
+:
diff --git a/tests/help-upc.test b/tests/help-upc.test
new file mode 100755
index 0000000..8f5ff5f
--- /dev/null
+++ b/tests/help-upc.test
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_PROG_UPC' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_PROG_UPC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep '^  *UPCFLAGS .*Unified Parallel C compiler flags' stdout
+grep '^  *UPC .*Unified Parallel C compiler command' stdout
+
+:
diff --git a/tests/help.test b/tests/help.test
index e9ccf62..dd8b3b4 100755
--- a/tests/help.test
+++ b/tests/help.test
@@ -14,28 +14,34 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure --help and --version work, even when no configure.ac
-# is in the current directory.
+# Make sure --help and --version work, even when no configure.ac nor
+# configure.in is in the current directory.
 
 . ./defs || Exit 1
 
 set -e
 
-# Ensure we are run from the right directory.
-# (The last thing we want is to delete some random user files.)
-test -f ../defs
-rm -f *
+# Ensure we run in an empty directory.
+mkdir emptydir
+cd emptydir
+
+# Honour user overrides for $ACLOCAL and $AUTOMAKE.
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
 
 $ACLOCAL --version
 $ACLOCAL --help
 $AUTOMAKE --version
 $AUTOMAKE --help
 
-# aclocal and automake cannot work without configure.ac or configure.in
+# Sanity checks: aclocal and automake cannot work without configure.ac
+# or configure.in.
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep configure.ac stderr
-grep configure.in stderr
+$FGREP configure.ac stderr
+$FGREP configure.in stderr
 AUTOMAKE_fails
-grep configure.ac stderr
-grep configure.in stderr
+$FGREP configure.ac stderr
+$FGREP configure.in stderr
+
+:
diff --git a/tests/help2.test b/tests/help2.test
new file mode 100755
index 0000000..b74f30a
--- /dev/null
+++ b/tests/help2.test
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure --help and --version work, even when the current directory
+# contains a broken configure.in and a broken acinclude.m4.
+. ./defs || Exit 1
+
+set -e
+
+# Ensure we run in a new, clean directory.
+mkdir cleandir
+cd cleandir
+
+# Honour user overrides for $ACLOCAL and $AUTOMAKE.
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+
+echo '[' > configure.in
+echo '[' > acinclude.m4
+
+$AUTOMAKE --version
+$AUTOMAKE --help
+$ACLOCAL --version
+$ACLOCAL --help
+
+# Sanity check: aclocal cannot work with broken acinclude.m4.
+$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP acinclude.m4 stderr
+
+rm -f acinclude.m4
+
+# Sanity checks: aclocal and automake cannot work with broken configure.in.
+$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP configure.in stderr
+AUTOMAKE_fails
+$FGREP configure.in stderr
+
+:
diff --git a/tests/help3.test b/tests/help3.test
new file mode 100755
index 0000000..72399e3
--- /dev/null
+++ b/tests/help3.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure --help and --version takes precedence over other options.
+
+. ./defs || Exit 1
+
+set -e
+
+# We must have full control over the content of the current directory.
+mkdir cleandir
+cd cleandir
+
+# Honour user overrides for $ACLOCAL and $AUTOMAKE.
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.]) dnl prevent automake from looking into '..'
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_FILES([Makefile])
+END
+
+cat > Makefile.am <<END
+## so that install-sh will be required
+pkgdata_DATA =
+END
+
+$ACLOCAL --force --help --output=foo.m4
+test ! -r foo.m4
+$ACLOCAL --output=foo.m4 --version --force
+test ! -r foo.m4
+# Sanity check.
+$ACLOCAL --output=foo.m4 --force
+test -f foo.m4
+
+mv -f foo.m4 aclocal.m4 # autoconf will need aclocal.m4
+
+$AUTOMAKE --add-missing --help --copy
+test ! -r install-sh
+$AUTOMAKE --copy --version --add-mising
+test ! -r install-sh
+# Sanity check.
+$AUTOMAKE --add-missing --copy
+test -f install-sh
+
+:
diff --git a/tests/help4.test b/tests/help4.test
new file mode 100755
index 0000000..1b7de41
--- /dev/null
+++ b/tests/help4.test
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the first among --help and --version to be specified on
+# the command line takes precedence over the following one.
+
+. ./defs || Exit 1
+
+set -e
+
+# Ensure we run in an empty directory.
+mkdir emptydir
+cd emptydir
+
+# Honour user overrides for $ACLOCAL and $AUTOMAKE.
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+
+escape_dots () { sed 's/\./\\./g'; } # avoid issues with `\' in backquotes
+apiversion_rx=`echo "$APIVERSION" | escape_dots`
+
+$ACLOCAL --version --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^aclocal.*$apiversion_rx" stdout
+grep "^Usage" stdout && Exit 1
+
+$ACLOCAL --help --version >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^Usage" stdout
+grep "^aclocal.*$apiversion_rx" stdout && Exit 1
+
+$AUTOMAKE --version --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^automake.*$apiversion_rx" stdout
+grep "^Usage" stdout && Exit 1
+
+$AUTOMAKE --help --version >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^Usage" stdout
+grep "^automake.*$apiversion_rx" stdout && Exit 1
+
+:
diff --git a/tests/hfs.test b/tests/hfs.test
index 8022729..8f0c5cc 100755
--- a/tests/hfs.test
+++ b/tests/hfs.test
@@ -20,7 +20,7 @@
 # Darwin).
 # Report from Peter O'Gorman.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 echo AC_OUTPUT >>configure.in
diff --git a/tests/install2.test b/tests/install2.test
index d1f27fe..3cc71f5 100755
--- a/tests/install2.test
+++ b/tests/install2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,8 +18,8 @@
 # Test for bug in `make dist'
 # From Pavel Roskin.
 
-required=gzip
 . ./defs || Exit 1
+
 set -e
 
 cat > configure.in << 'END'
diff --git a/tests/instdir-java.test b/tests/instdir-java.test
index 6adc82e..9d9a03c 100755
--- a/tests/instdir-java.test
+++ b/tests/instdir-java.test
@@ -16,13 +16,12 @@
 
 # If $(javadir) is the empty string, then nothing should be installed there.
 
+required=javac
 . ./defs || Exit 1
 
 set -e
 
 cat >>configure.in <<'END'
-AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
-($HAS_JAVAC 77); $HAS_JAVAC 77
 AC_OUTPUT
 END
 
diff --git a/tests/instdir-texi.test b/tests/instdir-texi.test
index 50617c8..8210535 100755
--- a/tests/instdir-texi.test
+++ b/tests/instdir-texi.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,9 +20,8 @@
 required='makeinfo-html tex texi2dvi'
 . ./defs || Exit 1
 
-(dvips --help 2>/dev/null >/dev/null) || Exit 77
-(pdfetex --help 2>/dev/null >/dev/null) ||
-  (pdftex --help 2>/dev/null >/dev/null) || Exit 77
+dvips --help || Exit 77
+pdfetex --help || pdftex --help || Exit 77
 
 set -e
 
@@ -54,6 +53,7 @@ mkdir build
 cd build
 ../configure --prefix="$instdir"
 $MAKE all dvi ps pdf html
+ls -l
 
 infodir= htmldir= dvidir= psdir= pdfdir=
 export infodir htmldir dvidir psdir pdfdir
@@ -67,4 +67,5 @@ $MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'rm -f' stdout && Exit 1
 $MAKE -e uninstall DESTDIR="$destdir"
+
 :
diff --git a/tests/instfail-java.test b/tests/instfail-java.test
index 2cb8afb..8f527cf 100755
--- a/tests/instfail-java.test
+++ b/tests/instfail-java.test
@@ -19,13 +19,12 @@
 
 # This is the java sister test of instfail.test.
 
+required=javac
 . ./defs || Exit 1
 
 set -e
 
 cat >>configure.in <<'END'
-AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
-($HAS_JAVAC 77); $HAS_JAVAC 77
 AC_OUTPUT
 END
 
diff --git a/tests/insthook.test b/tests/insthook.test
index 5a82bd6..a315447 100755
--- a/tests/insthook.test
+++ b/tests/insthook.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2005, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2007, 2010  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ test -f ok
 
 # Make sure that installing a second version doesn't erase the first
 # one.  (This is error prone since `foo' symlinks to `foo-1.0' and the
-# second version will overwrite `foo'.   Hopefully `install' and `install-sh'
+# second version will overwrite `foo'.  Hopefully `install' and `install-sh'
 # are smart enough to erase the `foo' symlink before installing the new
 # version.)
 ./configure "--bindir=`pwd`/bin"
diff --git a/tests/instmany-mans.test b/tests/instmany-mans.test
index fcee60b..fe55be4 100755
--- a/tests/instmany-mans.test
+++ b/tests/instmany-mans.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -123,7 +123,7 @@ test `find "$instdir" -type f -print | wc -l` = 0
 
 # Try whether we don't exceed the low limit.
 INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
 
 cd $subdir
 srcdir=../../$subdir
@@ -146,4 +146,5 @@ for file in page3.man page$nfiles.man npage3.man 
npage$nfiles.man; do
   $MAKE install-man3 && Exit 1
   chmod u+r $srcdir/$file
 done
+
 :
diff --git a/tests/instmany-python.test b/tests/instmany-python.test
index 6831c9e..7648e1b 100755
--- a/tests/instmany-python.test
+++ b/tests/instmany-python.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -113,7 +113,7 @@ test `find "$instdir" -type f -print | wc -l` = 0
 
 # Try whether we don't exceed the low limit.
 INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
 
 cd $subdir
 srcdir=../../$subdir
diff --git a/tests/instmany.test b/tests/instmany.test
index a3b10cb..2de026d 100755
--- a/tests/instmany.test
+++ b/tests/instmany.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -137,7 +137,7 @@ test `find "$instdir" -type f -print | wc -l` = 0
 
 # Try whether we don't exceed the low limit.
 INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..:$PATH" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
 
 cd $subdir
 srcdir=../../$subdir
diff --git a/tests/instsh2.test b/tests/instsh2.test
index 778c1a3..927edeb 100755
--- a/tests/instsh2.test
+++ b/tests/instsh2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004, 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -77,9 +78,40 @@ test -f d3/y
 ./install-sh -T x d3 && Exit 1
 ./install-sh -T x d4// && Exit 1
 
-# Ensure that install-sh works with names that include spaces
+# Ensure that install-sh works with names that include spaces.
 touch 'a  b'
 mkdir 'x  y'
 ./install-sh 'a  b' 'x  y'
 test -f x\ \ y/a\ \ b
 test -f 'a  b'
+
+# Ensure we do not run into `test' operator precedence bugs with Tru64 sh.
+for c in = '(' ')' '!'; do
+  ./install-sh $c 2>stderr && { cat stderr >&2; Exit 1; }
+  cat stderr >&2
+  grep 'test: ' stderr && Exit 1
+  # Skip tests if the file system is not capable.
+  mkdir ./$c || continue
+  rmdir ./$c
+  ./install-sh -d $c/$c/$c
+  rm -rf ./$c
+  ./install-sh -d $c d5/$c/$c
+  test -d ./$c
+  test -d d5/$c/$c
+  ./install-sh x $c
+  test -f ./$c/x
+  rm -f ./$c/x
+  ./install-sh -t $c x
+  test -f ./$c/x
+  rm -rf ./$c
+  ( : > ./$c ) || continue
+  ./install-sh $c x d5/$c/$c
+  test -f d5/$c/$c/x
+  test -f d5/$c/$c/$c
+  rm -f d5/$c/$c/?
+  ./install-sh -t d5/$c/$c $c x
+  test -f d5/$c/$c/x
+  test -f d5/$c/$c/$c
+done
+
+:
diff --git a/tests/instspc.test b/tests/instspc.test
index 414b3e5..7d00788 100755
--- a/tests/instspc.test
+++ b/tests/instspc.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -135,9 +135,13 @@ do
 
     cd "$build"
 
+    # Some make implementations eliminate leading and trailing whitespace
+    # from macros passed on the command line, and some eliminate leading
+    # whitespace from macros set from environment variables, so prepend
+    # './' and use the latter here.
     ../configure --prefix "/$file-prefix" &&
     $MAKE &&
-    DESTDIR=$dest file=$file $MAKE -e test-install-sep ||
+    DESTDIR=$dest file=./$file $MAKE -e test-install-sep ||
       eval "${test}_failures=\"\$${test}_failures$lf\$file\""
 
     cd ..
diff --git a/tests/interp.test b/tests/interp.test
index af82e33..05464d2 100755
--- a/tests/interp.test
+++ b/tests/interp.test
@@ -18,17 +18,23 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = qqq
-s1 = z.c
-qqq_SOURCES = $(s1)
+bin_PROGRAMS = foo
+xs = a.c b.c
+foo_SOURCES = c.c $(xs)
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP ' a.$(OBJEXT)' Makefile.in
+$FGREP ' b.$(OBJEXT)' Makefile.in
+$FGREP ' c.$(OBJEXT)' Makefile.in
 
-$FGREP 'z.$(OBJEXT)' Makefile.in
+:
diff --git a/tests/java-check.test b/tests/java-check.test
new file mode 100755
index 0000000..a67b4e8
--- /dev/null
+++ b/tests/java-check.test
@@ -0,0 +1,66 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that check_JAVA causes *.class files to be built only with
+# "make check", and not also with "make all".
+# See automake bug#8234.
+
+required=javac
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+check_JAVA = One.java Two.java
+END
+
+cat > One.java <<'END'
+class One { }
+END
+
+cat > Two.java <<'END'
+class Two { // Deliberately missing closing bracket.
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+inst=`pwd`/_inst
+
+./configure --prefix="$inst"
+
+$MAKE
+ls | $EGREP '\.(class|stamp)$' && Exit 1
+
+# Make Two.java compilable.
+echo '}' >> Two.java
+
+# "make check" should compile files in $(check_JAVA) ...
+$MAKE check
+ls -l # for debugging
+test -f One.class
+test -f Two.class
+# ... but should *not* install them.
+$FGREP checkdir Makefile && Exit 1
+$MAKE install
+test -d _inst && Exit 1
+
+:
diff --git a/tests/java-empty-classpath.test b/tests/java-empty-classpath.test
new file mode 100755
index 0000000..e94f885
--- /dev/null
+++ b/tests/java-empty-classpath.test
@@ -0,0 +1,90 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Java compilation works also when CLASSPATH is unset or empty at
+# compilation time.  See automake bug#9306.
+
+required=javac
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_CONFIG_SRCDIR([org/gnu/bug/Library.java])
+AC_CONFIG_FILES([
+    org/Makefile
+    org/gnu/Makefile
+    org/gnu/bug/Makefile
+])
+AC_OUTPUT
+END
+
+mkdir org org/gnu org/gnu/bug
+cat > Makefile.am <<END
+CLEANFILES = *.class
+SUBDIRS = org
+END
+echo SUBDIRS = gnu > org/Makefile.am
+echo SUBDIRS = bug > org/gnu/Makefile.am
+cat > org/gnu/bug/Makefile.am <<'END'
+JAVAROOT = ../../..
+dist_noinst_JAVA = Library.java Application.java
+END
+
+cat > org/gnu/bug/Library.java <<'END'
+package org.gnu.bug;
+public class Library
+{
+    public Library ()
+    {
+      // Nothing to do.
+    }
+    public static void doSomethingUseful (String arg)
+    {
+      System.out.println (arg);
+    }
+}
+END
+
+cat > org/gnu/bug/Application.java <<'END'
+import org.gnu.bug.*;
+public class Application
+{
+    public static void main (String args[])
+    {
+        Library lib = new Library ();
+        lib.doSomethingUseful ("PLUGH");
+    }
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+unset CLASSPATH || :
+$MAKE
+$MAKE clean
+
+CLASSPATH=''; export CLASSPATH
+$MAKE
+$MAKE clean
+
+unset CLASSPATH || :
+$MAKE distcheck
+
+:
diff --git a/tests/java.test b/tests/java.test
index d5210cd..cae56dc 100755
--- a/tests/java.test
+++ b/tests/java.test
@@ -16,13 +16,12 @@
 
 # Minimal test of Java functionality.
 
+required=javac
 . ./defs || Exit 1
 
 set -e
 
 cat >>configure.in <<'EOF'
-AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
-($HAS_JAVAC 77); $HAS_JAVAC 77
 AC_OUTPUT
 EOF
 
diff --git a/tests/java3.test b/tests/java3.test
index 7895769..e1850a8 100755
--- a/tests/java3.test
+++ b/tests/java3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure that Java rules don't attempt to install *.java files when
-# there are none.
+# Make sure that Java rules don't attempt to compile or install
+# *.java files when there are none.
 # Report from Johannes Nicolai (PR/441).
 
 . ./defs || Exit 1
@@ -23,7 +23,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AM_CONDITIONAL([WHO_CARES], false)
+AM_CONDITIONAL([WHO_CARES], [false])
 AC_OUTPUT
 END
 
@@ -32,13 +32,25 @@ if WHO_CARES
 JAVA_FILES = MyClass1.java
 endif
 
-dist_pkgdata_JAVA = $(JAVA_FILES)
+javadir = $(prefix)/java
+java_JAVA = $(JAVA_FILES)
 END
 
-: >MyClass1.java
+cat > MyClass1.java << 'END'
+class MyClass1 { // Deliberately missing right curly bracket.
+END
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+$MAKE install
+ls -l . _inst/java # For debugging.
+find . -name '*.class' | grep . && Exit 1
+$MAKE uninstall
 $MAKE distcheck
+
+:
diff --git a/tests/lex-subobj-nodep.test b/tests/lex-subobj-nodep.test
new file mode 100755
index 0000000..4449715
--- /dev/null
+++ b/tests/lex-subobj-nodep.test
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure subdirs for subdir scanners are generated when subdir-objects
+# are used, even when dependency tracking is disabled.
+
+required=flex
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<\END
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LEX
+AC_OUTPUT
+END
+
+cat >Makefile.am <<\END
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = p1 p2
+p1_SOURCES = sub1/s1.l
+p2_SOURCES = sub2/s2.l
+p2_CPPFLAGS = -DWHATEVER
+END
+
+mkdir sub1 sub2
+
+cat >sub1/s1.l <<\END
+%%
+"END"   return EOF;
+.
+%%
+int main (void)
+{
+  while (yylex () != EOF)
+    ;
+  return 0;
+}
+
+int yywrap(void)
+{
+  return 0;
+}
+END
+
+cp sub1/s1.l sub2/s2.l
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+mkdir build
+cd build
+../configure --disable-dependency-tracking
+$MAKE sub1/s1.c
+$MAKE sub2/s2.c
+rm -rf sub1 sub2
+$MAKE
+
+:
diff --git a/tests/lex3.test b/tests/lex3.test
index 178a54f..c4120cf 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -18,7 +18,7 @@
 # Test associated with PR 19.
 # From Matthew D. Langston.
 
-required='gcc gzip flex GNUmake'
+required='gcc flex GNUmake'
 . ./defs || Exit 1
 
 # Ignore user CFLAGS.
diff --git a/tests/lflags.test b/tests/lflags.test
index 97de608..4c3e048 100755
--- a/tests/lflags.test
+++ b/tests/lflags.test
@@ -30,6 +30,10 @@ echo 'extern int dummy;' >> lex.yy.c
 END
 chmod a+x fake-lex
 
+# Remove Lex from the environment, so that it won't interfere
+# with `make -e' below.
+unset LEX || :
+
 cat >> configure.in <<'END'
 AC_PROG_CC
 # Simulate presence of Lex using our fake-lex script.
diff --git a/tests/lflags2.test b/tests/lflags2.test
index df766b2..f13c656 100755
--- a/tests/lflags2.test
+++ b/tests/lflags2.test
@@ -31,6 +31,10 @@ echo 'extern int dummy;' >> lex.yy.c
 END
 chmod a+x fake-lex
 
+# Remove Lex from the environment, so that it won't interfere
+# with `make -e' below.
+unset LEX || :
+
 cat >> configure.in <<'END'
 AC_PROG_CXX
 # Simulate presence of Lex using our fake-lex script.
diff --git a/tests/libobj14.test b/tests/libobj14.test
index ed20703..0ee750c 100755
--- a/tests/libobj14.test
+++ b/tests/libobj14.test
@@ -20,7 +20,7 @@
 # Report from Bill Davidson
 
 required=gcc
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/libobj8.test b/tests/libobj8.test
index c06746b..206bca6 100755
--- a/tests/libobj8.test
+++ b/tests/libobj8.test
@@ -45,6 +45,6 @@ END
 : > ansi2knr.c
 
 $ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$AUTOMAKE  -Wno-obsolete || Exit 1
 
 grep 'strsignal_.c:' Makefile.in
diff --git a/tests/libtool4.test b/tests/libtool4.test
index bcc9b0f..9f6a730 100755
--- a/tests/libtool4.test
+++ b/tests/libtool4.test
@@ -20,10 +20,17 @@
 
 set -e
 
+cat >> configure.in <<'END'
+AC_PROG_CC
+END
+
 cat > Makefile.am << 'END'
 EXTRA_LTLIBRARIES = liblib.la
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AC_PROG_LIBTOOL stderr
+grep '[Ll]ibtool library .*LIBTOOL.* undefined' stderr
+grep 'define .*LIBTOOL.* add .*LT_INIT' stderr
+
+:
diff --git a/tests/lispdry.test b/tests/lispdry.test
new file mode 100755
index 0000000..3bca21a
--- /dev/null
+++ b/tests/lispdry.test
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2005, 2008, 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Automake; see the file COPYING.  If not, write to
+
+# Check that `make -n' works with the lisp_LISP recover rule.
+
+required='emacs non-root'
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am << 'EOF'
+dist_lisp_LISP = am-one.el am-two.el am-three.el
+EOF
+
+cat >> configure.in << 'EOF'
+AM_PATH_LISPDIR
+AC_OUTPUT
+EOF
+
+echo "(require 'am-two)" > am-one.el
+echo "(require 'am-three) (provide 'am-two)" > am-two.el
+echo "(provide 'am-three)" > am-three.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+./configure
+
+$MAKE
+
+test -f am-one.elc
+test -f am-two.elc
+test -f am-three.elc
+test -f elc-stamp
+
+rm -f am-*.elc elc-stamp
+
+chmod a-w .
+
+$MAKE -n
+
+test ! -f am-one.elc
+test ! -f am-two.elc
+test ! -f am-three.elc
+test ! -f elc-stamp
+
+:
diff --git a/tests/ltinit.test b/tests/ltinit.test
new file mode 100755
index 0000000..b4eaad6
--- /dev/null
+++ b/tests/ltinit.test
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that libtool support works correctly when "newer" libtool
+# interface (with LT_INIT etc.) is used (this interface has been
+# present since libtool 1.9b, circa 2004).
+
+required='libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+dnl Older libtool versions don't define LT_PREREQ :-(
+m4_ifdef([LT_PREREQ],
+    [LT_PREREQ([2.0])],
+    [m4_fatal([Libtool version too old], [63])])
+LT_INIT([dlopen])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+lib_LTLIBRARIES = libfoo.la
+END
+
+cat > libfoo.c <<'END'
+int foo (void)
+{
+  return 1;
+}
+END
+
+libtoolize
+# Skip if older libtool (pre-2.0) is used.
+{ $ACLOCAL && $AUTOCONF; } || {
+  if test $? -eq 63; then Exit 77; else Exit 1; fi
+}
+$EGREP 'LT_(INIT|PREREQ)' configure && Exit 1 # Sanity check.
+$AUTOMAKE -a
+
+cwd=`pwd`
+./configure --prefix="$cwd/inst" >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^checking.*dlopen' stdout
+
+$MAKE
+$MAKE install
+$MAKE distcheck
+
+:
diff --git a/tests/m4-inclusion.test b/tests/m4-inclusion.test
new file mode 100755
index 0000000..025d44f
--- /dev/null
+++ b/tests/m4-inclusion.test
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (C) 1998, 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to see if `m4_sinclude' and `m4_include' works.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'EOF'
+sinclude([doesntexist.m4])
+EOF
+
+mkdir sub
+cat > sub/p.m4 << 'END'
+AC_SUBST(MAGICALPIG)
+END
+
+cat > sub/h.m4 << 'END'
+AC_SUBST(MAGICALHOG)
+END
+
+cat > sub/g.m4 << 'END'
+AC_SUBST(GREPME)
+END
+
+: > Makefile.am
+
+echo 'sinclude(sub/g.m4)' >> acinclude.m4
+echo 'm4_sinclude(sub/doesntexist.m4)' >> acinclude.m4
+
+$ACLOCAL
+
+echo 'm4_sinclude(sub/p.m4)' >> aclocal.m4
+echo 'm4_include(sub/h.m4)' >> aclocal.m4
+
+$AUTOMAKE
+
+grep doesntexist Makefile.in && Exit 1
+grep MAGICALPIG Makefile.in
+grep MAGICALHOG Makefile.in
+grep GREPME Makefile.in
diff --git a/tests/maintclean-vpath.test b/tests/maintclean-vpath.test
new file mode 100755
index 0000000..4b93ab1
--- /dev/null
+++ b/tests/maintclean-vpath.test
@@ -0,0 +1,106 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure distclean and maintainer-clean erase the right files.
+# This test is for VPATH builds; see sister test `maintclean.test'
+# for in-tree builds.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([bar sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+noinst_DATA = foo.c
+foo.c:
+       touch foo.c
+MAINTAINERCLEANFILES = foo.c
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+noinst_SCRIPTS = zap
+zap: zap.sh
+       cp $(srcdir)/zap.sh $@ && chmod a+x $@
+MAINTAINERCLEANFILES = zap
+END
+
+: > bar.in
+: > sub/zap.sh
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+# Users can disable autom4te.cache.
+if test -d autom4te.cache; then
+  test_cache='test -d ../autom4te.cache'
+else
+  test_cache=:
+fi
+
+mkdir build
+
+chmod a-w . sub
+
+cd build
+
+../configure
+test -f bar
+
+$MAKE
+test -f foo.c
+test -f sub/zap
+$test_cache
+
+$MAKE distclean
+test ! -f bar
+test ! -f Makefile
+test ! -f sub/Makefile
+test ! -f config.status
+test -f foo.c
+test -f sub/zap
+test -f ../sub/zap.sh
+$test_cache
+
+../configure
+test -f bar
+
+$MAKE foo.c
+test -f foo.c
+cd sub
+$MAKE zap
+test -f zap
+cd ..
+
+chmod u+w ..
+
+$MAKE maintainer-clean
+test -f ../sub/zap.sh
+test ! -f bar
+test ! -f foo.c
+test ! -f sub/zap
+test ! -f Makefile
+test ! -f sub/Makefile
+test ! -f config.status
+test ! -d ../autom4te.cache
+
+:
diff --git a/tests/maintclean.test b/tests/maintclean.test
index a66464b..9e22463 100755
--- a/tests/maintclean.test
+++ b/tests/maintclean.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,27 +15,36 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure distclean and maintainer-clean erase the right files.
+# This test is for in-tree builds; see sister test `maintclean-vpath.test'
+# for VPATH builds.
 
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
-AC_CONFIG_FILES(bar)
+AC_CONFIG_FILES([bar sub/Makefile])
 AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
+SUBDIRS = sub
 noinst_DATA = foo.c
-
 foo.c:
        touch foo.c
-
 MAINTAINERCLEANFILES = foo.c
+END
 
+mkdir sub
+cat > sub/Makefile.am <<'END'
+noinst_SCRIPTS = zap
+zap: zap.sh
+       cp $(srcdir)/zap.sh $@ && chmod a+x $@
+MAINTAINERCLEANFILES = zap
 END
 
-touch bar.in
+: > bar.in
+: > sub/zap.sh
 
 $ACLOCAL
 $AUTOCONF
@@ -48,18 +57,22 @@ else
   test_cache=:
 fi
 
-# Since we don't require Yacc, make sure it's not used.
-./configure YACC=false
+./configure
 test -f bar
 
 $MAKE
 test -f foo.c
+test -f sub/zap
+$test_cache
 
 $MAKE distclean
 test ! -f bar
 test ! -f Makefile
+test ! -f sub/Makefile
 test ! -f config.status
 test -f foo.c
+test -f sub/zap
+test -f sub/zap.sh
 $test_cache
 
 ./configure
@@ -67,10 +80,19 @@ test -f bar
 
 $MAKE foo.c
 test -f foo.c
+cd sub
+$MAKE zap
+test -f zap
+cd ..
 
 $MAKE maintainer-clean
+test -f sub/zap.sh
 test ! -f bar
 test ! -f foo.c
+test ! -f sub/zap
 test ! -f Makefile
+test ! -f sub/Makefile
 test ! -f config.status
 test ! -d autom4te.cache
+
+:
diff --git a/tests/man4.test b/tests/man4.test
index aa86a9e..de75f837 100755
--- a/tests/man4.test
+++ b/tests/man4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -73,7 +73,7 @@ END
 
 chmod +x foo bar help2man
 save_PATH=$PATH
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
 
 $ACLOCAL
 $AUTOMAKE
diff --git a/tests/mclean.test b/tests/mclean.test
deleted file mode 100755
index dcbe818..0000000
--- a/tests/mclean.test
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure MAINTAINERCLEANFILES works.
-# Report from Paul D. Smith.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-MAINTAINERCLEANFILES = foo
-END
-
-: > FOO
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-grep 'rm -f .*MAINTAINERCLEANFILES' Makefile.in
diff --git a/tests/mdate6.test b/tests/mdate6.test
new file mode 100755
index 0000000..e7f7d69
--- /dev/null
+++ b/tests/mdate6.test
@@ -0,0 +1,35 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# mdate-sh can work with weird file names, doesn't eval too much.
+
+. ./defs || Exit 1
+
+set -e
+
+a=
+file='file  name $a'
+( : > "$file" ) || Exit 77
+
+cp "$testsrcdir"/../lib/mdate-sh .
+$SHELL ./mdate-sh "$file" >stdout 2>stderr ||
+  { cat stdout; cat stderr >&2; Exit 1; }
+cat stdout
+cat stderr >&2
+grep '[12][0-9]\{3\}' stdout
+test ! -s stderr
+
+:
diff --git a/tests/missing6.test b/tests/missing6.test
index 3994b85..e543697 100755
--- a/tests/missing6.test
+++ b/tests/missing6.test
@@ -22,7 +22,7 @@ set -e
 
 {
   echo 'm4_define([AC_AUTOCONF_VERSION], [9999a])'
-  echo 'm4_define([b], [oops])'
+  echo 'dnl!! m4_define([a], [oops])'
   cat configure.in
   echo AC_OUTPUT
 } >configure.ac
@@ -39,10 +39,9 @@ $AUTOMAKE
 ./configure
 $MAKE
 
-sed 's/\[b\]/[a]/' < configure.ac > configure.tmp
-cmp configure.ac configure.tmp && Exit 1
-
-mv configure.tmp configure.ac
+sed 's/^dnl!! //' < configure.ac > configure.tmp
+cmp configure.ac configure.tmp && Exit 99 # sanity check
+mv -f configure.tmp configure.ac
 
 $MAKE 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
diff --git a/tests/mkinst3.test b/tests/mkinst3.test
index 18f18fb..20b9b04 100755
--- a/tests/mkinst3.test
+++ b/tests/mkinst3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ EOF
 chmod +x bin/mkdir
 AM_PATH=$PATH
 export AM_PATH
-PATH=`pwd`/bin:$PATH
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH
 export PATH
 
 # Test mkinstalldirs without mkdir -p.
diff --git a/tests/mmode.test b/tests/mmode.test
index 19f83f1..c5a16c9 100755
--- a/tests/mmode.test
+++ b/tests/mmode.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,7 +31,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure --help | grep 'enable-maintainer-mode.*enable make rules'
 ./configure
 grep '^MAINT.*#' Makefile
 
@@ -51,7 +50,6 @@ sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in > 
configure.int
 mv -f configure.int configure.in
 $AUTOCONF --force
 
-./configure --help | grep 'disable-maintainer-mode.*disable make rules'
 ./configure
 grep '^MAINT.*#' Makefile && Exit 1
 
@@ -64,4 +62,5 @@ grep '^MAINT.*#' Makefile
 sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.in > configure.int
 mv -f configure.int configure.in
 $AUTOCONF --force -Werror && Exit 1
+
 :
diff --git a/tests/mmodely.test b/tests/mmodely.test
index 0f9bb3b..fc94d37 100755
--- a/tests/mmodely.test
+++ b/tests/mmodely.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2004, 2006, 2007, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007, 2009, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -82,7 +83,7 @@ cat >mylex.sh <<'END'
 echo "$@" >lex.yy.c
 END
 chmod +x myyacc.sh mylex.sh
-PATH="`pwd`:$PATH"
+PATH="`pwd`$PATH_SEPARATOR$PATH"
 
 # make maintainer-clean; ./configure; make should always work,
 # per GNU Standard.
diff --git a/tests/multlib.test b/tests/multlib.test
index 5ff19d7..3f88be3 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -45,7 +45,7 @@ gcc ${1+"$@"}
 END
 
 chmod +x mycc
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = @subdirs@
diff --git a/tests/parallel-tests-harderror.test 
b/tests/parallel-tests-harderror.test
new file mode 100755
index 0000000..8680e29
--- /dev/null
+++ b/tests/parallel-tests-harderror.test
@@ -0,0 +1,98 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests features: DISABLE_HARD_ERRORS
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat > Makefile.am << 'END'
+SUBDIRS = . sub
+TESTS = foo.test
+XFAIL_TESTS = foo.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > sub/Makefile.am << 'END'
+TESTS = bar.test
+XFAIL_TESTS = $(TESTS)
+EXTRA_DIST = $(TESTS)
+END
+
+cat > foo.test <<'END'
+#! /bin/sh
+exit 99
+END
+chmod a+x foo.test
+cp foo.test sub/bar.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# DISABLE_HARD_ERRORS is not defined as a make variable, so that it
+# should be possible to define either from the environment or from
+# command-line, also when recursive make invocations are involved,
+# and also without using the `-e' make flag; this should work also
+# for non-GNU make. Moreover, it shouldn't be necessary to define
+# DISABLE_HARD_ERRORS to "yes" to really disable hard errors: any
+# non-empty value should do.
+$MAKE check DISABLE_HARD_ERRORS=yes
+DISABLE_HARD_ERRORS=x $MAKE check
+
+# But an empty values for DISABLE_HARD_ERRORS means that hard errors
+# are not to be counted like normal failures.
+
+$MAKE check DISABLE_HARD_ERRORS='' && Exit 1
+cat test-suite.log
+grep '^FAIL: foo\.test .*exit.*99' test-suite.log
+
+cd sub
+# The `-e' is wanted here.
+DISABLE_HARD_ERRORS='' $MAKE -e check && Exit 1
+cat test-suite.log
+grep '^FAIL: bar\.test .*exit.*99' test-suite.log
+cd ..
+
+# Check the distributions.
+$MAKE DISABLE_HARD_ERRORS=y distcheck
+
+# Finally, DISABLE_HARD_ERRORS should work also when the developer
+# sets it directly in Makefile.am or Makefile.  And its effects
+# should remain local to that specific Makefile, obviously.
+
+echo 'DISABLE_HARD_ERRORS = yes' >> Makefile.am
+$AUTOMAKE Makefile
+./config.status Makefile
+VERBOSE=yes $MAKE check && Exit 1
+grep '^FAIL' test-suite.log && Exit 1
+grep '^FAIL: bar\.test .*exit.*99' sub/test-suite.log
+
+echo 'DISABLE_HARD_ERRORS = zardoz' >> sub/Makefile
+VERBOSE=yes $MAKE check
+
+:
diff --git a/tests/parallel-tests-log-compiler-example.test 
b/tests/parallel-tests-log-compiler-example.test
new file mode 100755
index 0000000..746c128
--- /dev/null
+++ b/tests/parallel-tests-log-compiler-example.test
@@ -0,0 +1,71 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test the example of usage of generic and extension-specific
+# LOG_COMPILER and LOG_FLAGS given in the manual.
+
+parallel_tests=yes
+required=python
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_SUBST([PERL], ['$PERL'])
+AM_PATH_PYTHON
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.pl bar.py baz
+TEST_EXTENSIONS = .pl .py
+PL_LOG_COMPILER = $(PERL)
+AM_PL_LOG_FLAGS = -w
+PY_LOG_COMPILER = $(PYTHON)
+AM_PY_LOG_FLAGS = -v
+LOG_COMPILER = ./wrapper-script
+AM_LOG_FLAGS = -d
+END
+
+echo 'my $a =+ 2; exit (0);' > foo.pl
+echo 'import sys; sys.exit(0);' > bar.py
+: > baz
+
+cat > wrapper-script <<'END'
+#!/bin/sh
+echo "wrapper args: $*"
+END
+chmod a+x wrapper-script
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+st=0
+$MAKE check || st=$?
+cat foo.log
+cat bar.log
+cat baz.log
+test $st -eq 0 || Exit $st
+
+# Check that the wrappers have been run with the expected flags.
+grep '[rR]eversed.*+=.*operator.*foo\.pl' foo.log
+grep '^# *[cC]lear.*sys\.argv' bar.log
+grep '^wrapper args:.* -d .*baz' baz.log
+
+:
diff --git a/tests/parallel-tests-log-override-1.test 
b/tests/parallel-tests-log-override-1.test
new file mode 100755
index 0000000..6e98380
--- /dev/null
+++ b/tests/parallel-tests-log-override-1.test
@@ -0,0 +1,112 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG).
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+TESTS = pass.test skip.test xfail.test
+XFAIL_TESTS = xfail.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > pass.test <<'END'
+#! /bin/sh
+exit 0
+END
+
+cat > skip.test <<'END'
+#! /bin/sh
+echo "% test skipped %"
+exit 77
+END
+
+cat > xfail.test <<'END'
+#! /bin/sh
+echo "# expected failure #"
+exit 1
+END
+
+chmod a+x *.test
+
+test_log_edit ()
+{
+  sed -e "s|^  *$me 1\.0:.*$|  $me 1.0: ???|" \
+      -e "s|^=====*|=======================|" $*
+}
+
+test_log_expected ()
+{
+  test_log_edit orig > exp
+  test_log_edit $1   > got
+  diff exp got || Exit 1
+  rm -f exp got
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check
+ls -l
+cat test-suite.log
+cp test-suite.log orig
+
+$MAKE clean
+test -f test-suite.log && Exit 99 # Sanity check.
+
+# Check that we can override the testsuite log file at runtime.
+TEST_SUITE_LOG=zardoz.log $MAKE -e check
+ls -l
+test ! -f test-suite.log
+cat zardoz.log
+test_log_expected zardoz.log
+# Sanity check the distribution too (this also does minimal checks on
+# VPATH support).
+TEST_SUITE_LOG=zardoz.log $MAKE -e distcheck
+
+# Check that cleanup rules remove the correct file even when
+# user overrides are in place.
+cp orig test-suite.log
+TEST_SUITE_LOG=zardoz.log $MAKE -e clean
+ls -l
+test ! -f zardoz.log
+diff orig test-suite.log
+
+# Check that the default testsuite log doesn't get unduly modified.
+# Also check that the testsuite log file doesn't need to be named
+# accordingly to the `*.log' pattern.
+chmod a-w test-suite.log
+TEST_SUITE_LOG=TheLogFile $MAKE -e check
+ls -l
+diff orig test-suite.log
+test_log_expected TheLogFile
+TEST_SUITE_LOG=TheLogFile $MAKE -e clean
+ls -l
+test ! -f TheLogFile
+diff orig test-suite.log
+
+:
diff --git a/tests/parallel-tests-log-override-2.test 
b/tests/parallel-tests-log-override-2.test
new file mode 100755
index 0000000..649360c
--- /dev/null
+++ b/tests/parallel-tests-log-override-2.test
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests features: runtime redefinition of:
+#  - $(TEST_SUITE_LOG) and $(TESTS)
+#  - $(TEST_SUITE_LOG) and $(TEST_LOGS)
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+TESTS = pass.test pass2.test skip.test skip2.test fail.test
+END
+
+cat > pass.test <<'END'
+#! /bin/sh
+exit 0
+END
+
+cp pass.test pass2.test
+
+cat > skip.test <<'END'
+#! /bin/sh
+echo "% skipped test %"
+exit 77
+END
+
+cp skip.test skip2.test
+
+cat > fail.test <<'END'
+#! /bin/sh
+exit 1
+END
+
+chmod a+x *.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+for test_list_override in \
+  'TESTS=pass.test skip.test' \
+  'TEST_LOGS=pass.log skip.log'
+do
+  env TEST_SUITE_LOG=partial.log "$test_list_override" \
+    $MAKE -e check >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  ls -l
+  cat pass.log
+  cat skip.log
+  cat partial.log
+  test ! -f test-suite.log
+  test ! -f pass2.log
+  test ! -f skip2.log
+  test ! -f fail.log
+  grep '^PASS: .*pass\.test' stdout
+  grep '^SKIP: .*skip\.test' stdout
+  $FGREP 'skip.test' partial.log
+  $FGREP '% skipped test %' partial.log
+  for t in pass2 skip2 fail; do
+    $FGREP "$t.test" stdout && Exit 1
+    $FGREP "$t.test" partial.log && Exit 1
+  done
+  rm -f *.log
+done
+
+:
diff --git a/tests/parallel-tests-log-override-recheck.test 
b/tests/parallel-tests-log-override-recheck.test
new file mode 100755
index 0000000..8a50d29
--- /dev/null
+++ b/tests/parallel-tests-log-override-recheck.test
@@ -0,0 +1,92 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG)
+# for the recheck target.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+TESTS = foo.test bar.test baz.test
+END
+
+cat > foo.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 0
+END
+
+cat > bar.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 99
+END
+
+cat > baz.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit ${BAZ_EXIT_STATUS-1}
+END
+
+chmod a+x *.test
+
+unset BAZ_EXIT_STATUS || :
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE check >stdout && { cat stdout; Exit 1; }
+cat stdout
+
+chmod a-rw test-suite.log
+TEST_SUITE_LOG=my.log $MAKE -e recheck >stdout \
+  && { cat stdout; Exit 1; }
+cat stdout
+ls -l
+grep '^2 of 2 .*failed' stdout
+for x in stdout my.log; do
+  $FGREP foo.test $x && Exit 1
+  $FGREP bar.test $x
+  $FGREP baz.test $x
+done
+
+chmod a-rw my.log
+BAZ_EXIT_STATUS=0 TEST_SUITE_LOG=my2.log $MAKE -e recheck >stdout \
+  && { cat stdout; Exit 1; }
+cat stdout
+ls -l
+grep '^1 of 2 .*failed' stdout
+$FGREP foo.test stdout && Exit 1
+$FGREP bar.test stdout
+$FGREP baz.test stdout
+$FGREP foo.test my2.log && Exit 1
+$FGREP bar.test my2.log
+$FGREP baz.test my2.log && Exit 1
+
+chmod u+r test-suite.log my.log
+$FGREP baz.test test-suite.log
+$FGREP baz.test my.log
+
+:
diff --git a/tests/parallel-tests-subdir.test b/tests/parallel-tests-subdir.test
new file mode 100755
index 0000000..18695fe
--- /dev/null
+++ b/tests/parallel-tests-subdir.test
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the parallel-tests driver creates parent directories for
+# the log files when needed.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = dir1/foo.test dir2/dir3/foo.test
+TEST_LOG_COMPILER = sh
+END
+
+mkdir dir1 dir2 dir2/dir3
+echo : > dir1/foo.test
+echo : > dir2/dir3/foo.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+../configure
+$MAKE check
+find . # For debugging.
+test -f test-suite.log
+test -f dir1/foo.log
+test -f dir2/dir3/foo.log
+
+:
diff --git a/tests/parallel-tests-unreadable-log.test 
b/tests/parallel-tests-unreadable-log.test
new file mode 100755
index 0000000..572f03d
--- /dev/null
+++ b/tests/parallel-tests-unreadable-log.test
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the testsuite driver copes well with unreadable test logs.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.test bar.test
+XFAIL_TESTS = bar.test
+END
+
+cat > foo.test << 'END'
+#! /bin/sh
+exit 0
+END
+cat > bar.test << 'END'
+#! /bin/sh
+exit 1
+END
+chmod a+x foo.test bar.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+# The testsuite driver will use this variable, so ensure it sanitizes
+# it and do not allow in spurious values from the environment.
+line=PASS; export line
+
+./configure
+
+$MAKE foo.log
+$MAKE bar.log
+chmod a-r foo.log bar.log
+test ! -r foo.log || Exit 77
+$MAKE test-suite.log >stdout && { cat stdout; Exit 1; }
+cat stdout
+grep '^2 of 2 tests failed *$' stdout
+grep '^2 of 2 tests failed\. *$' test-suite.log
+
+:
diff --git a/tests/parallel-tests.test b/tests/parallel-tests.test
index 29111c2..54f0cd5 100755
--- a/tests/parallel-tests.test
+++ b/tests/parallel-tests.test
@@ -19,7 +19,6 @@
 # - clean
 # - TEST_SUITE_LOG
 # - dependencies between tests
-# - DISABLE_HARD_ERRORS
 # - TESTS
 # - TEST_LOGS
 # - RECHECK_LOGS
@@ -41,14 +40,19 @@ foo.log: bar.log
 bar.log: baz.log
 END
 
+# foo.test and bar.test sleep to ensure their logs are always strictly newer
+# than the logs of their prerequisites, for HP-UX make.  The quoting pleases
+# maintainer-check.
 cat >>foo.test <<'END'
 #! /bin/sh
 echo "this is $0"
+sleep '1'
 exit 0
 END
 cat >>bar.test <<'END'
 #! /bin/sh
 echo "this is $0"
+sleep '1'
 exit 99
 END
 cat >>baz.test <<'END'
@@ -63,12 +67,13 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-# No hard errors: all tests should be run, there should be one failure.
-env DISABLE_HARD_ERRORS=yes $MAKE -e check >stdout && { cat stdout; Exit 1; }
+
+$MAKE check >stdout && { cat stdout; Exit 1; }
 cat stdout
-test `grep -c '^FAIL' stdout` -eq 1
+# There should be two errors: bar.test is a hard error.
+test `grep -c '^FAIL' stdout` -eq 2
 test -f mylog.log
-test `grep -c '^FAIL' mylog.log` -eq 1
+test `grep -c '^FAIL' mylog.log` -eq 2
 test -f baz.log
 test -f bar.log
 test -f foo.log
@@ -84,19 +89,11 @@ test ! -f foo.log
 test ! -f mylog.log
 test -f unrelated.log
 
-$MAKE clean
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-# Now, there should be two errors: bar.test is a hard error.
-test `grep -c '^FAIL' stdout` -eq 2
-test `grep -c '^FAIL' mylog.log` -eq 2
-
 # Check dependencies: baz.test needs to run before bar.test,
 # but foo.test is not needed.
 # Note that this usage has a problem: the summary will only
 # take bar.log into account, because the $(TEST_SUITE_LOG) rule
 # does not "see" baz.log.  Hmm.
-$MAKE clean
 env TESTS='bar.test' $MAKE -e check && Exit 1
 test -f baz.log
 test -f bar.log
diff --git a/tests/parallel-tests8.test b/tests/parallel-tests8.test
index 784e07f..524b82b 100755
--- a/tests/parallel-tests8.test
+++ b/tests/parallel-tests8.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,7 +38,8 @@ TESTS = foo.test
 ## the next line will cause automake to error out:
 TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
 .in.test:
-       cp $< $@
+## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5)
+       cp `test -f '$<' || echo $(srcdir)/`$< $@
        chmod +x $@
 check_SCRIPTS = $(TESTS)
 EXTRA_DIST = foo.in foo.test
@@ -57,7 +58,7 @@ AUTOMAKE_fails -a
 grep '(srcdir.*bar' stderr
 grep 'top_srcdir.*baz' stderr
 
-sed '/srcdir/d' < Makefile.am > t
+sed '/^TESTS +=.*srcdir/d' < Makefile.am > t
 mv -f t Makefile.am
 $AUTOMAKE -a
 
diff --git a/tests/percent.test b/tests/percent.test
index 40f9a43..dfb48ae 100755
--- a/tests/percent.test
+++ b/tests/percent.test
@@ -17,7 +17,7 @@
 # Test to make sure that -Wportability understands %-style pattern
 # rules.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/percent2.test b/tests/percent2.test
index f7c7f14..09e4f84 100755
--- a/tests/percent2.test
+++ b/tests/percent2.test
@@ -19,7 +19,7 @@
 # `${ARCH}/%.$(OBJEXT):'.
 # Report from Ralf Corsepius.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/phony.test b/tests/phony.test
index 0f57915..9c9f3d3 100755
--- a/tests/phony.test
+++ b/tests/phony.test
@@ -17,7 +17,7 @@
 # Make sure .PHONY can be given dependencies several times.
 # From Ralf Corsepius.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/pluseq11.test b/tests/pluseq11.test
new file mode 100755
index 0000000..12ec4d7
--- /dev/null
+++ b/tests/pluseq11.test
@@ -0,0 +1,54 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check for bug in variable concatenation with `+=': an extra backslash
+# is erroneously retained in the final value.
+# See also sister test pluseq11b.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+## Use more line continuation to ensure we are robust and can (hopefully)
+## cope any number of them, and not just one
+FOO = \
+\
+\
+bar
+## Both these two variable additions are required to trigger the bug.
+FOO +=
+FOO += baz
+
+.PHONY: test
+test:
+       case '$(FOO)' in *\\*) exit 1;; *) exit 0;; esac
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+grep '^ *FOO *=.*\\.' Makefile.in && Exit 1
+
+$AUTOCONF
+./configure
+$MAKE test
+
+:
diff --git a/tests/pr2.test b/tests/pr2.test
index 258a8ef..ceb2729 100755
--- a/tests/pr2.test
+++ b/tests/pr2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2010 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -16,11 +16,23 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for bug reported in PR 2.
+# "make dist" fails for AC_OUTPUT(README.foo:templ/README.foo.in).
+#
+# == Report ==
+# When my AC_OUTPUT macro in configure.in contains something
+# like the following (among the Makefiles)
+#       README.foo:templ/README.foo.in
+# the generated dist target in the Makefile.in fails,
+# because DIST_COMMON will contain templ/README.foo.in
+# and the dist target will try to copy templ/README.foo.in
+# to the distribution directory before it creates a templ
+# subdirectory in the distribution directory.
 
 . ./defs || Exit 1
 
 set -e
 
+# Please keep this underquoted and old-style.
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -38,3 +50,5 @@ $AUTOMAKE
 ./configure
 $MAKE distdir
 test -f nonesuch-nonesuch/templ/README.foo.in
+
+:
diff --git a/tests/pr204.test b/tests/pr204.test
index 2944449..22a1e54 100755
--- a/tests/pr204.test
+++ b/tests/pr204.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,13 +22,10 @@ required='bison gcc'
 
 set -e
 
-cat > configure.in <<'EOF'
-AC_INIT(pr204, 0.1)
-AM_INIT_AUTOMAKE
+cat >> configure.in <<'EOF'
 AM_MAINTAINER_MODE
 AC_PROG_CC
 AC_PROG_YACC
-AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
 EOF
 
@@ -64,8 +61,10 @@ cp parse.y parse2.y
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
+
 ./configure
 $MAKE distdirtest
+
 # Make sure parse.c and parse2.c are still targets.
 $MAKE parse.c parse2.c
 test -f parse.c
@@ -78,3 +77,5 @@ touch parse.y
 $sleep
 $MAKE parse.c parse2.c
 test `ls -1t parse.c parse.y | sed 1q` = parse.c
+
+:
diff --git a/tests/pr211.test b/tests/pr211.test
index 9344fd2..6778f7a 100755
--- a/tests/pr211.test
+++ b/tests/pr211.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,18 +15,27 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 211.
+#
+# == Description ==
+# Suppose you have a library and an ltlibrary in the same
+# directory which use the same source:
+#
+#   libfoo_la_SOURCES = foo.c
+#   libbar_a_SOURCES = foo.c
+#
+# In this case foo.c will be compiled twice but using different
+# compilers.  This is a conflict.  In this case the user should
+# rename one of the `foo.o's.
 
 required=libtoolize
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(hello,0.23)
+cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -40,3 +49,5 @@ libtoolize
 $ACLOCAL
 AUTOMAKE_fails -a
 $FGREP 'foo.$(OBJEXT)' stderr
+
+:
diff --git a/tests/pr220.test b/tests/pr220.test
index 25e1f0e..95212ab 100755
--- a/tests/pr220.test
+++ b/tests/pr220.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2008, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,13 +16,19 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR automake/220.
+# Test for problems when conditionals are not actually defined.
+# Check that the problems is diagnosed by configure.
+# This isn't perfect (ideally we'd like an error from autoconf),
+# but it is the best we can do.  It certainly makes it easier
+# to debug the problem.
+# Note that this should be also in the documentation.
 
 required=gcc
 . ./defs || Exit 1
 
 set -e
 
-cat >main.c <<EOF
+cat > main.c <<'EOF'
 int main() { return 0; }
 EOF
 
@@ -57,4 +64,6 @@ cd build
 # configure should fail since we've done something invalid.
 ../configure 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep NEVER_TRUE stderr
+grep 'conditional.*NEVER_TRUE' stderr
+
+:
diff --git a/tests/pr224.test b/tests/pr224.test
index fdcb997..00a7aad 100755
--- a/tests/pr224.test
+++ b/tests/pr224.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,11 +14,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for $(top_srcdir) with dependencies.
+# Test for PR automake/224: $(top_srcdir) w.r.t. dependencies.
+#
+# == Description ==
+# Dependency tracking data should be stored in in the relative path
+# of the source file, as opposed the object file.
+# I.e., for `foo.c' in `$(top_srcdir)/bar', being built in
+# `$(top_srcdir)/build', the location of the `.deps' directory
+# should be `$(top_builddir)/bar/.deps'.
 
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 mkdir foo
 
 cat >foo/main.c <<'EOF'
@@ -31,30 +40,24 @@ bin_PROGRAMS = bar
 bar_SOURCES = foo/main.c
 EOF
 
-cat >configure.in <<'EOF'
-AC_INIT(foo/main.c)
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+cat >>configure.in <<'EOF'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 EOF
 
-touch README NEWS AUTHORS ChangeLog
-
 mkdir build
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
 cd build
-CC='gcc' ../configure
-$MAKE
+../configure
 
+$MAKE
 test -d foo/.deps
 $MAKE distclean
 test -d foo/.deps && Exit 1
+
 :
diff --git a/tests/pr229.test b/tests/pr229.test
index a97ef4f..0d3f153 100755
--- a/tests/pr229.test
+++ b/tests/pr229.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,6 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Test for PR automake/229.
 # Make sure AC_CYGWIN requires config.{sub,guess}.
 # Reported by James Youngman.
 
@@ -29,5 +30,8 @@ EOF
 
 $ACLOCAL
 $AUTOMAKE -a
+
 test -f config.sub
 test -f config.guess
+
+:
diff --git a/tests/pr243.test b/tests/pr243.test
index a5e869e..58fb2a8 100755
--- a/tests/pr243.test
+++ b/tests/pr243.test
@@ -15,30 +15,45 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 243.
+# AM_OUTPUT_DEPENDENCY_COMMANDS doesn't handle
+# `Makefile:Makefile.in:tail.mk' in AC_OUTPUT.
+#
+# == Report ==
+# If configure.in has something like:
+#       AC_OUTPUT(Makefile:Makefile.in:tail.mk)
+# then config.status cannot parse the Makefile to build the
+# dependency files in the .deps directory.  This is because
+# the AM_OUTPUT_DEPENDENCY_COMMANDS macro cannot cope with
+# the colon in the CONFIG_FILES variable.
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
-AC_CONFIG_FILES(Makefile:Makefile.in:tail.mk)
+AC_CONFIG_FILES([Makefile:Makefile.in:tail.mk])
 AC_OUTPUT
 END
 
 : > tail.mk
 
 cat > Makefile.am << 'END'
-include_HEADERS         = 3dfx.h linutil.h
-noinst_HEADERS          = fx64.h fxdll.h fximg.h fxglob.h \
-                          fxos.h fxver.h glob.h
+include_HEADERS  = 3dfx.h linutil.h
+noinst_HEADERS   = fx64.h fxdll.h fximg.h fxglob.h \
+                   fxos.h fxver.h glob.h
 noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES    = fx64.c fximg.c fxos.c linutil.c
+fxmisc_SOURCES  = fx64.c fximg.c fxos.c linutil.c
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$AUTOCONF || Exit 1
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+# FIXME: require compiler in $required rather than skipping here
 ./configure || Exit $?
 
 test -f .deps/fx64.Po
+
+:
diff --git a/tests/pr266.test b/tests/pr266.test
index a1cd2fe..2bace6f 100755
--- a/tests/pr266.test
+++ b/tests/pr266.test
@@ -15,28 +15,34 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 266.
+# Dependency tracking -vs- nonstandard Makefile names
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
-AC_CONFIG_FILES(Maudefile)
+AC_CONFIG_FILES([Maudefile])
 AC_OUTPUT
 END
 
 cat > Maudefile.am << 'END'
-include_HEADERS         = 3dfx.h linutil.h
-noinst_HEADERS          = fx64.h fxdll.h fximg.h fxglob.h \
-                          fxos.h fxver.h glob.h
+include_HEADERS = 3dfx.h linutil.h
+noinst_HEADERS  = fx64.h fxdll.h fximg.h fxglob.h \
+                  fxos.h fxver.h glob.h
 noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES    = fx64.c fximg.c fxos.c linutil.c
+fxmisc_SOURCES  = fx64.c fximg.c fxos.c linutil.c
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$AUTOCONF || Exit 1
-./configure || Exit $?
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+# FIXME: require compiler in $required rather than skipping here
+./configure --enable-dependency-tracking || Exit $?
 
 test -f .deps/fx64.Po
+
+:
diff --git a/tests/pr279-2.test b/tests/pr279-2.test
index 286e33a..f4e6fb2 100755
--- a/tests/pr279-2.test
+++ b/tests/pr279-2.test
@@ -15,15 +15,22 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Another test related to PR 279.
+# Multiple DEPENDENCIES on conditionals.
+# Please keep this in sync with sister test pr279.test.
+#
+# == Report ==
+# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
+# xxx_LDADD one contains values set in conditionals, automake will
+# fail with messages like:
+#       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(FOOTEST, false)
-AC_CONFIG_FILES(Makefile)
+AM_CONDITIONAL([FOOTEST], [false])
 AC_OUTPUT
 END
 
@@ -37,8 +44,10 @@ endif
 bin_PROGRAMS = foo
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep 'address@hidden@foo_DEPENDENCIES *= *zardoz$' Makefile.in
+grep 'address@hidden@foo_DEPENDENCIES *= *maude$' Makefile.in
 
-grep '@foo_DEPENDENCIES = zardoz' Makefile.in || Exit 1
-grep '@foo_DEPENDENCIES = maude' Makefile.in || Exit 1
+:
diff --git a/tests/pr279.test b/tests/pr279.test
index 50dff53..d658668 100755
--- a/tests/pr279.test
+++ b/tests/pr279.test
@@ -15,15 +15,22 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 279.
+# Multiple DEPENDENCIES on conditionals.
+# Please keep this in sync with sister test pr279-2.test.
+#
+# == Report ==
+# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
+# xxx_LDADD one contains values set in conditionals, automake will
+# fail with messages like:
+#       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(FOOTEST, false)
-AC_CONFIG_FILES(Makefile)
+AM_CONDITIONAL([FOOTEST], [false])
 AC_OUTPUT
 END
 
@@ -39,5 +46,7 @@ foo_LDADD = ${xtralib}
 foo_DEPENDENCIES =
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/pr287.test b/tests/pr287.test
index 58553b5..3a6f902 100755
--- a/tests/pr287.test
+++ b/tests/pr287.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,11 +18,10 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, address@hidden)
-AM_INIT_AUTOMAKE
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
 END
 
@@ -38,13 +37,15 @@ END
 
 chmod +x foo
 
-set -e
-
 mkdir install
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
+
 ./configure "--prefix=`cd install && pwd`"
+
 $MAKE
 $MAKE distdir
+
+:
diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test
index 3d2fde5..ee46b4b 100755
--- a/tests/pr300-lib.test
+++ b/tests/pr300-lib.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -46,7 +46,9 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE
 
 test -f subdir/liba.a
@@ -66,3 +68,5 @@ $MAKE install-strip
 
 test -f inst/lib/liba.a
 test -f inst/lib/subdir/libb.a
+
+:
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index c6f9a5e..c47f32e 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -48,8 +48,10 @@ libtoolize
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
-$MAKE V=1 >stdout
+
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 
 grep 'liba.la .*-rpath .*lib' stdout
@@ -75,3 +77,5 @@ $MAKE install-strip
 
 test -f inst/lib/liba.la
 test -f inst/lib/subdir/libb.la
+
+:
diff --git a/tests/pr300-prog.test b/tests/pr300-prog.test
index 0b226c6..917a8a2 100755
--- a/tests/pr300-prog.test
+++ b/tests/pr300-prog.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -63,8 +63,12 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE test-all
 $MAKE test-install
 $MAKE test-uninstall
 $MAKE test-install-strip
+
+:
diff --git a/tests/pr307.test b/tests/pr307.test
index 0091415..7676c4b 100755
--- a/tests/pr307.test
+++ b/tests/pr307.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,10 +17,26 @@
 # Test for PR 307: depcomp with depmode=dashmstdout libtool race condition
 # Report from Laurent Morichetti.
 # (Also exercises check_LTLIBRARIES.)
+#
+# == Report ==
+#  The dashmstdout depmode calls libtool in parallel to generate the
+#  dependencies (with -M flag) and to build the objfile (both have
+#  --mode=compile and -o).
+#  The process with 'libtool --mode=compile .* -M' can corrupt the objfile
+#  as none is generated by the compiler.  Since --mode=compile and -o are
+#  set libtool assumes that a objfile should be generated and will execute
+#  invalid $mv & $LN_S.
+#
+# == Fix ==
+#  Now 'depcomp' never compute dependencies in the background, as this can
+#  cause races with libtool.  Compute the dependencies after the actual
+#  compilation.
 
 required='libtoolize gcc'
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
@@ -34,8 +50,8 @@ librace_la_SOURCES = a.c b.c c.c d.c e.c f.c g.c h.c
 # Make sure the dependencies are updated.
 check-local:
        for i in $(librace_la_SOURCES:.c=.Plo); do \
-         echo checking ./$(DEPDIR)/$$i; \
-         grep foo.h ./$(DEPDIR)/$$i >tst || exit 1; \
+         echo "checking ./$(DEPDIR)/$$i"; \
+         grep 'foo\.h' ./$(DEPDIR)/$$i >tst || exit 1; \
          test `wc -l <tst` -eq 2 || exit 1; \
        done
 END
@@ -49,8 +65,6 @@ int $i() { return 0; }
 EOF
 done
 
-set -e
-
 libtoolize --force
 $ACLOCAL
 $AUTOCONF
@@ -61,6 +75,7 @@ $AUTOMAKE -a
 grep am_cv_CC_dependencies_compiler_type configure
 
 ./configure am_cv_CC_dependencies_compiler_type=dashmstdout
+
 $MAKE
 test -f librace.la && Exit 1
 $MAKE check
@@ -75,3 +90,5 @@ $MAKE check
 
 test -f librace.la
 test -f tst # a proof that check-local was run
+
+:
diff --git a/tests/pr401.test b/tests/pr401.test
index 7a092bf..88f7733 100755
--- a/tests/pr401.test
+++ b/tests/pr401.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
 # Check support for AC_CONFIG_LIBOBJ_DIR vs LIBOBJS.
 # (pr401b.test and pr401c.test do the same for LTLIBOBJS and ALLOCA)
 
+parallel_tests=no
 required=gcc
 . ./defs || Exit 1
 
@@ -178,3 +179,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
diff --git a/tests/pr401b.test b/tests/pr401b.test
index f7f6344..0af4646 100755
--- a/tests/pr401b.test
+++ b/tests/pr401b.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
 # Check support for AC_CONFIG_LIBOBJ_DIR vs LTLIBOBJS.
 # (pr401.test and pr401c.test do the same for LIBOBJS and ALLOCA)
 
+parallel_tests=no
 required='gcc libtoolize'
 . ./defs || Exit 1
 
@@ -179,3 +180,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
diff --git a/tests/pr401c.test b/tests/pr401c.test
index fc2f5de..b94bc16 100755
--- a/tests/pr401c.test
+++ b/tests/pr401c.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
 # Check support for AC_CONFIG_LIBOBJ_DIR vs ALLOCA.
 # (pr401.test and pr401b.test do the same for LIBOBJS and LTLIBOBJS)
 
+parallel_tests=no
 required=gcc
 . ./defs || Exit 1
 
@@ -181,3 +182,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
diff --git a/tests/pr72.test b/tests/pr72.test
index d67c17b..ab911ad 100755
--- a/tests/pr72.test
+++ b/tests/pr72.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,9 +15,13 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 72
+# Empty _SOURCES results in $(LINK) undefined.
+
 required=libtool
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
@@ -34,7 +38,9 @@ END
 : > config.guess
 : > config.sub
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^LINK =' Makefile.in
 
-grep '^LINK ' Makefile.in
+:
diff --git a/tests/pr8365-remake-timing.test b/tests/pr8365-remake-timing.test
new file mode 100755
index 0000000..079b0c0
--- /dev/null
+++ b/tests/pr8365-remake-timing.test
@@ -0,0 +1,110 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test for automake bug#8365, related to Makefile remake rules.
+# The bug is due to subtle timestamp issues and limitations in
+# make's behaviour, and is very unlikely to be triggered (we have
+# to resort to timestamp edit hacks to consistently expose it); in
+# any account, it is nigh to impossible to trigger it by running
+# make by hand.  Thus, fixing it would not be worth the hassle, but
+# we prefer to keep it exposed anyway.
+
+. ./defs || Exit 1
+
+set -e
+
+# We'll use calls to stat to get debugging information.
+if stat /dev/null; then stat=stat; else stat=:; fi
+
+cat >> configure.in << 'END'
+FOOBAR=zardoz
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+$ACLOCAL
+# Run automake *before* autoconf, because we want to ensure that
+# Makefile.in is not newer than configure.
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE Makefile
+$EGREP 'FOOBAR|zardoz' Makefile && Exit 99 # Sanity check.
+
+echo 'AC_SUBST([FOOBAR])' >> configure.in
+
+# Modified configure dependencies must have the same timestamp of
+# config.status and Makefile in order to trigger the bug.
+# We also re-touch config.status, because "touch -r" can truncate
+# timestamps on file systems with sub-second resolutions (see the
+# autoconf manual).  Finally, we also sleep before touching, to ensure
+# that the (possibly truncated) timestamps of config.status etc. are
+# strictly newer than the non-truncated configure timestamp.
+$stat config.status Makefile configure.in
+$sleep
+touch config.status
+touch -r config.status config.status Makefile configure.in
+$stat config.status Makefile configure.in
+
+# Also, the race condition is triggered only when aclocal, automake
+# and aclocal run fast enough to keep the timestamp of the generated
+# aclocal.m4, Makefile.in and configure equal to the timestamp of
+# Makefile & config.status.  To reproduce this race consistently, we
+# need the following hackish wrappers.
+
+save_AUTOCONF=$AUTOCONF
+
+cat > aclocal-wrap <<END
+#!/bin/sh
+set -ex
+# aclocal shouldn't use our autoconf wrapper when extracting
+# the races from configure.in.
+AUTOCONF='$save_AUTOCONF'; export AUTOCONF
+$ACLOCAL "\$@"
+touch -r config.status aclocal.m4
+$stat aclocal.m4
+END
+
+cat > automake-wrap <<END
+#!/bin/sh
+set -ex
+# automake shouldn't use our autoconf wrapper when extracting
+# the races from configure.in.
+AUTOCONF='$save_AUTOCONF'; export AUTOCONF
+$AUTOMAKE "\$@"
+touch -r config.status Makefile.in
+$stat Makefile.in
+END
+
+cat > autoconf-wrap <<END
+#!/bin/sh
+set -ex
+$AUTOCONF "\$@"
+touch -r config.status configure
+$stat configure
+END
+
+chmod a+x aclocal-wrap automake-wrap autoconf-wrap
+
+env \
+  ACLOCAL=./aclocal-wrap AUTOMAKE=./automake-wrap AUTOCONF=./autoconf-wrap \
+  $MAKE -e Makefile
+grep '^FOOBAR =' Makefile.in
+grep '^FOOBAR *= *zardoz *$' Makefile
+
+:
diff --git a/tests/pr87.test b/tests/pr87.test
index 369849b..31e6482 100755
--- a/tests/pr87.test
+++ b/tests/pr87.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,10 +15,13 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR automake/87.
+# "make distcheck" fails when two source dirs exist.
 
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 subdirs="foo bar"
 
 for i in $subdirs; do
@@ -36,7 +39,7 @@ echo "SUBDIRS = $subdirs" > Makefile.am
 cat >configure.in <<EOF
 AC_INIT(`echo $subdirs | sed 's|\([a-z][a-z]*\).*|\1/\1.c|'`)
 AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+AM_INIT_AUTOMAKE($me, 1.0)
 AC_PROG_CC
 AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`)
 EOF
@@ -45,15 +48,11 @@ EOF
 CFLAGS=
 export CFLAGS
 
-touch README NEWS AUTHORS ChangeLog
-
 mkdir build
 
-# We use gcc and not gcc -traditional as the latter fails on some
-# Linux boxes (Red Hat 5.1 in particular).
-$ACLOCAL \
-   && $AUTOCONF \
-   && $AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
 
 # Regression test for bug where `.c.o:' is followed by blank line.
 (while read line; do
@@ -61,11 +60,15 @@ $ACLOCAL \
        read next
        if test -z "$next"; then
          Exit 1
+       else
+          : # for shells with broken 'set -e'
        fi
        break
     fi
  done) < foo/Makefile.in || Exit 1
 
-cd build \
-   && ../configure \
-   && $MAKE distcheck || Exit 1
+cd build
+../configure
+$MAKE distcheck
+
+:
diff --git a/tests/pr9.test b/tests/pr9.test
index dab9734..1f27f69 100755
--- a/tests/pr9.test
+++ b/tests/pr9.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,29 +15,46 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for bug in PR 9.
+# "make dist" incorrect when AC_CONFIG_AUX_DIR is present.
+#
+# == Report ==
+# When AC_CONFIG_AUX_DIR is set (in my case to `support'), make dist
+# no longer automatically includes config.guess, config.sub, install-sh,
+# ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs.  In fact,
+# the entire `support/' directory is omitted.
 
-required=gzip
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AC_CONFIG_AUX_DIR(support)
-AM_INIT_AUTOMAKE(pr9, 0)
-AC_OUTPUT(Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([support])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 : > Makefile.am
 
 mkdir support
 
-$ACLOCAL || Exit 1
+$ACLOCAL
+
+$AUTOCONF
+$AUTOMAKE -a -c
+./configure
+$MAKE
+$MAKE distcheck
+
+gzip -d $distdir.tar.gz
 
-$AUTOCONF || Exit 1
-$AUTOMAKE -a -c || Exit 1
-./configure || Exit 1
-$MAKE || Exit 1
-$MAKE distcheck || Exit 1
+tar tf $distdir.tar | $FGREP support
 
-gunzip pr9-0.tar.gz || Exit 1
+tar xf $distdir.tar
+ls -l . $distdir # for debugging
+test -d $distdir/support
+ls -l $distdir/support # for debugging
+test -f $distdir/support/install-sh
 
-tar tf pr9-0.tar | $FGREP support
+:
diff --git a/tests/prefix.test b/tests/prefix.test
index 8199bd4..8ba92ef 100755
--- a/tests/prefix.test
+++ b/tests/prefix.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -27,5 +29,7 @@ bnidir = $(prefix)/bni
 bni_PROGRAMS = zardoz
 EOF
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/primary-prefix-couples-documented-valid.test 
b/tests/primary-prefix-couples-documented-valid.test
new file mode 100755
index 0000000..645f318
--- /dev/null
+++ b/tests/primary-prefix-couples-documented-valid.test
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the "uncommon" prefix/primary combinations used in
+# examples in the Automake manual do not cause obvious errors.
+# Please keep this test in sync with the automake manual.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AM_PROG_GCJ
+AM_PATH_PYTHON
+END
+
+# Fake libtool availability.
+: > ltmain.sh
+cat > acinclude.m4 <<'END'
+AC_DEFUN([AC_PROG_LIBTOOL],
+         [AC_SUBST([LIBTOOL], [:])])
+END
+
+cat > Makefile.am <<'END'
+xmldir = $(datadir)/xml
+xml_DATA = file.xml
+
+data_DATA = file1 file2 file3
+data2dir = $(datadir)
+data2_DATA = file4 file5 file6
+
+aclocaldir = $(datadir)/aclocal
+aclocal_DATA = mymacro.m4 myothermacro.m4
+
+imagesdir = $(pkgdatadir)/images
+soundsdir = $(pkgdatadir)/sounds
+dist_images_DATA = images/vortex.pgm
+dist_sounds_DATA = sounds/whirl.ogg
+
+lisp_DATA = file1.el file2.el
+
+javadir = $(datadir)/java
+dist_java_JAVA = a.java b.java c.java
+
+pkgpython_PYTHON = foo.py
+
+pyexec_LTLIBRARIES = quaternion.la
+quaternion_la_SOURCES = quaternion.c support.c support.h
+quaternion_la_LDFLAGS = -avoid-version -module
+
+myexecbindir = /exec
+myexecbin_PROGRAMS = zardoz
+
+foodir = $(prefix)/foo
+barexecdir = $(prefix)/bar/binaries
+foo_SCRIPTS = foo.sh
+barexec_SCRIPTS = quux.pl
+
+my_execbindir = $(pkglibdir)
+my_doclibdir = $(docdir)
+my_execbin_PROGRAMS = foo
+my_doclib_LIBRARIES = libquux.a
+END
+
+$ACLOCAL
+
+# Both these two invocations are meant.
+# They exercise both code paths concerning auxiliary files.
+$AUTOMAKE -a
+$AUTOMAKE
+
+:
diff --git a/tests/primary-prefix-couples-force-valid.test 
b/tests/primary-prefix-couples-force-valid.test
new file mode 100755
index 0000000..315ee4e
--- /dev/null
+++ b/tests/primary-prefix-couples-force-valid.test
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that a user who wants to use an invalid prefix/primary
+# combination can do so with a proper workaround.
+# For example, this:
+#   lib_PROGRAMS = foo
+# is expected to cause an automake error, but this:
+#   bardir = $(libdir)
+#   bar_PROGRAMS = foo
+# should work.
+
+required=cc
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+my_libdir = $(libdir)
+my_lib_PROGRAMS = foo
+
+foodir = $(bindir)
+foo_LIBRARIES = libquux.a
+
+xdir = $(libexecdir)
+x_HEADERS = bar.h
+
+installcheck-local: test
+.PHONY: test
+test:
+       (cd '$(prefix)' && find .);: For debugging.
+       ls -l '$(libdir)/foo'
+       test -f '$(libdir)/foo'
+       test -x '$(libdir)/foo'
+       ls -l '$(bindir)/libquux.a'
+       test -f '$(bindir)/libquux.a'
+       ls -l '$(libexecdir)/bar.h'
+       test -f '$(libexecdir)/bar.h'
+       test ! -x '$(libexecdir)/bar.h'
+END
+
+cat > foo.c <<'END'
+int main (void)
+{
+  return 0;
+}
+END
+
+cat > libquux.c <<'END'
+int quux(void)
+{
+  return 1;
+}
+END
+
+: > bar.h
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+cwd=`pwd` || fatal_ "cannot get current working directory"
+./configure --prefix="$cwd/_inst"
+
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/primary-prefix-invalid-couples.test 
b/tests/primary-prefix-invalid-couples.test
new file mode 100755
index 0000000..88e0817
--- /dev/null
+++ b/tests/primary-prefix-invalid-couples.test
@@ -0,0 +1,187 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Not all primaries/directories combinations are valid.
+# Automake should flag them as errors.
+# Originated from PR/294, extended later (following bug #7647) to
+# cover more cases.
+# See also test `primary-prefix-valid-couples.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+oIFS=$IFS # Saved for later.
+
+: > ltmain.sh
+: > texinfo.tex
+: > elisp-comp
+: > py-compile
+: > config.guess
+: > config.sub
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_SUBST([LIBTOOL], [:]) dnl So that we don't have to require Libtool.
+AM_PROG_GCJ
+AM_PATH_PYTHON
+AM_PATH_LISPDIR
+END
+
+$ACLOCAL
+
+# Please keep this list in sync with the list of "Directory Variables"
+# in the GNU Coding Standards and with the list additional directory
+# variables provided by autoconf and/or automake (pkgdatadir, pkglibdir,
+# ...).   See also the hash `%standard_prefix' in the automake script.
+prefixes='bin data dataroot doc dvi exec html include info lib libexec
+          lisp locale localstate man man1 man2 man3 man4 man5 man6 man7
+          man8 man9 oldinclude pdf pkgdata pkginclude pkglib pkglibexec
+          ps sbin sharedstate sysconf'
+# Please keep this list in sync with the list of primaries documented in
+# the Automake manual (see the "The Uniform Naming Scheme" section).
+primaries='PROGRAMS LIBRARIES LTLIBRARIES LISP PYTHON JAVA SCRIPTS DATA
+           HEADERS MANS TEXINFOS'
+
+# Use files, not variables, to hold the list of all the possible
+# prefix_PRIMARY couples and the list of those couples valid for
+# automake, to avoid having unreadable very verbose traces.
+
+set +x # Don't be overly verbose.
+
+for prefix in $prefixes; do
+  for primary in $primaries; do
+    echo ${prefix} ${primary}
+  done
+done >all.list
+
+for primary in $primaries; do
+  prefixes_ok=''
+  case $primary in
+    LIBRARIES|LTLIBRARIES)
+      prefixes_ok='lib pkglib'
+      ;;
+    PROGRAMS)
+      prefixes_ok='bin sbin libexec pkglibexec'
+      ;;
+    SCRIPTS)
+      prefixes_ok='bin sbin libexec pkgdata'
+      ;;
+    DATA)
+      prefixes_ok='data dataroot pkgdata doc html dvi pdf ps
+                   sysconf sharedstate localstate lisp'
+      ;;
+    HEADERS)
+      prefixes_ok='include oldinclude pkginclude'
+      ;;
+    LISP)
+      prefixes_ok='lisp'
+      ;;
+    PYTHON)
+      prefixes_ok='python'
+      ;;
+    JAVA)
+      prefixes_ok='java'
+      ;;
+    MANS)
+      # FIXME: Here we'd like to have:
+      #   prefixes_ok='man man1 man2 man3 man4 man5 man6 man7 man8 man9'
+      # but Automake currently fails on that, as it allows the MANS
+      # primary to be coupled to any prefix.
+      # See also Automake bug#7656.
+      # We should dig out how automake had come to behave this way, and
+      # if such a behaviour can be safely changed.
+      prefixes_ok=$prefixes
+      ;;
+    TEXINFOS)
+      # FIXME: Here we'd like to have:
+      #   prefixes_ok='info'
+      # but Automake currently fails on that, as it allows the use of
+      # `foo_TEXINFOS' to declare extra Texinfo sources for the `foo'
+      # Texinfo manual, as in e.g.:
+      #   info_TEXINFOS = foo.texi
+      #   foo_TEXINFOS = gpl.texi
+      # See also Automake bug#7657.
+      prefixes_ok=$prefixes
+      ;;
+    *)
+      fatal_ "unrecognized primary '$primary'"
+      ;;
+  esac
+  for prefix in $prefixes_ok; do
+    echo ${prefix}_${primary}
+  done
+done >allow.list
+
+# `html_TEXINFOS' is not yet supported, and might never be.
+grep -v '^html TEXINFOS$' all.list | awk '{print NR, $0}' > t
+mv -f t all.list
+
+# For debugging.
+echo '=== all.list ==='
+cat all.list
+echo '=== allow.list ==='
+cat allow.list
+
+# Create the Makefile.am.
+while read lineno prefix primary; do
+  test -n "$prefix" && test -n "$primary" && test 0 -lt $lineno \
+    || fatal_ "internal error in 'all.list'"
+  pfx='' ext=''
+  case $primary in
+    LTLIBRARIES) pfx=lib ext=la;;
+    LIBRARIES) pfx=lib ext=a;;
+    MANS) ext=man;;
+    HEADERS) ext=h;;
+    JAVA) ext=java;;
+    PYTHON) ext=py;;
+    LISP) ext=el;;
+    TEXINFOS) ext=texi;;
+  esac
+  test -z "$ext" || ext=.$ext
+  if test $primary = TEXINFOS; then
+    echo @setfilename foo$lineno.info > foo$lineno.texi
+  fi
+  echo ${prefix}_${primary} = ${pfx}foo${lineno}${ext}
+done <all.list >Makefile.am
+
+# For debugging.
+echo '=== Makefile.am ==='
+cat Makefile.am
+
+set -x # Restore shell xtraces from now on.
+
+AUTOMAKE_fails -a
+
+while read lineno prefix primary; do
+  test -n "$prefix" && test -n "$primary" && test 0 -lt $lineno \
+    || fatal_ "internal error in 'all.list'"
+  grep "^${prefix}_${primary}$" allow.list >/dev/null && continue
+  errmsg_rx=".*${prefix}dir.* not a legitimate directory .*$primary"
+  grep "^Makefile\\.am:$lineno: $errmsg_rx" stderr || Exit 1
+done <all.list
+
+# Check that automake really failed only for the expected reason(s).
+grep -v 'dir.* not a legitimate directory' stderr && Exit 1
+
+# Check that the same failures are present without the `--add-missing'
+# option.
+mv stderr stderr.old
+AUTOMAKE_fails
+diff stderr.old stderr
+
+:
diff --git a/tests/primary-prefix-valid-couples.test 
b/tests/primary-prefix-valid-couples.test
new file mode 100755
index 0000000..f326808
--- /dev/null
+++ b/tests/primary-prefix-valid-couples.test
@@ -0,0 +1,90 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test for valid prefix/primary combinations.
+# See also test `primary-prefix-invalid-couples.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AM_PROG_GCJ
+AM_PATH_PYTHON
+AM_PATH_LISPDIR
+END
+
+# Fake libtool availability.
+: > ltmain.sh
+: > config.sub
+: > config.guess
+cat > acinclude.m4 <<'END'
+AC_DEFUN([AC_PROG_LIBTOOL],
+         [AC_SUBST([LIBTOOL], [:])])
+END
+
+# Other required files.
+echo '@setfilename foo' > foo.texi
+: > texinfo.tex
+: > py-compile
+: > elisp-comp
+
+# Setup Makefile.am.
+
+: > Makefile.am
+
+for p in bin sbin libexec pkglibexec; do
+  echo "${p}_PROGRAMS = prog-$p" >> Makefile.am
+done
+
+for p in lib pkglib; do
+  echo "${p}_LIBRARIES = libs-$p.a" >> Makefile.am
+  echo "${p}_LTLIBRARIES = libd-$p.la" >> Makefile.am
+done
+
+for p in bin sbin libexec pkgdata; do
+  echo "${p}_SCRIPTS = $p.sh" >> Makefile.am
+done
+
+for p in data dataroot pkgdata doc html dvi pdf ps sysconf \
+         sharedstate localstate lisp; do
+  echo "${p}_DATA = $p.dat" >> Makefile.am
+done
+
+for p in include oldinclude pkginclude; do
+  echo "${p}_HEADERS = $p.h" >> Makefile.am
+done
+
+for p in man man1 man2 man3 man4 man5 man6 man7 man8 man9; do
+  echo "${p}_MANS = bar.$p"
+done
+
+echo "info_TEXINFOS = foo.texi" >> Makefile.am
+echo "lisp_LISP = foo.el" >> Makefile.am
+echo "python_PYTHON = foo.py" >> Makefile.am
+echo "java_JAVA = foo.java" >> Makefile.am
+
+awk '{print NR ":" $0}' Makefile.am # For debugging.
+
+# Go with the tests.
+
+$ACLOCAL
+$AUTOMAKE
+
+:
diff --git a/tests/primary.test b/tests/primary.test
index ac5e54f..a866f8f 100755
--- a/tests/primary.test
+++ b/tests/primary.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,4 +27,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'EXTRA_PROGRAMS' stderr
+grep 'bin_PROGRAMS.*configure substitution' stderr
+grep 'EXTRA_PROGRAMS.*not defined' stderr
+
+:
diff --git a/tests/primary2.test b/tests/primary2.test
index faa7aed..2fb3a60 100755
--- a/tests/primary2.test
+++ b/tests/primary2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,4 +30,6 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep EXTRA_PROGRAMS stderr
+grep 'EXTRA_PROGRAMS.*configure substitution' stderr
+
+:
diff --git a/tests/primary3.test b/tests/primary3.test
index 578d053..afccd0c 100755
--- a/tests/primary3.test
+++ b/tests/primary3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,3 +38,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE
+
+:
diff --git a/tests/proginst.test b/tests/proginst.test
index 8881b9d..31745b7 100755
--- a/tests/proginst.test
+++ b/tests/proginst.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,9 +20,13 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_SCRIPTS = zardoz qbert brownie
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/remake-subdir-from-subdir.test 
b/tests/remake-subdir-from-subdir.test
new file mode 100755
index 0000000..1e369f8
--- /dev/null
+++ b/tests/remake-subdir-from-subdir.test
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that remake rules works for adding a new subdirectory from a
+# pre-existing subdirectory.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+m4_include([subdirs.m4])
+AC_SUBST([MAGIC], [magic])
+AC_OUTPUT
+END
+
+echo 'AC_CONFIG_FILES([sub/Makefile])' > subdirs.m4
+echo 'SUBDIRS = sub' > Makefile.am
+
+mkdir sub
+: > sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+
+cd sub
+$sleep
+echo 'AC_CONFIG_FILES([sub/subsub/Makefile])' >> ../subdirs.m4
+echo 'SUBDIRS = subsub' >> Makefile.am
+mkdir subsub
+cat > subsub/Makefile.am <<'END'
+all-local:
+       : > ok-it-works
+END
+using_gmake || $MAKE Makefile
+$MAKE
+test -f subsub/ok-it-works
+
+:
diff --git a/tests/remake-subdir-gnu.test b/tests/remake-subdir-gnu.test
new file mode 100755
index 0000000..cc683f3
--- /dev/null
+++ b/tests/remake-subdir-gnu.test
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that remake rules works from subdirectories, even using
+# `GNUmakefile' as makefiles name.  This obviously requires GNU
+# make.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1='::MagicString::One::'
+magic2='__MagicString__Two__'
+
+debug_info ()
+{
+  grep -i magic configure GNUmakefile.in GNUmakefile \
+                sub/GNUmakefile.in sub/GNUmakefile
+}
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([GNUmakefile sub/GNUmakefile])
+AC_SUBST([MAGIC], [magic])
+AC_OUTPUT
+END
+
+cat > GNUmakefile.am <<'END'
+SUBDIRS = sub
+END
+
+mkdir sub
+: > sub/GNUmakefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+debug_info
+
+$sleep
+sed "s|magic|$magic1|" configure.in > t
+mv -f t configure.in
+cd sub
+$MAKE
+cd ..
+debug_info
+$FGREP $magic1 configure
+$FGREP $magic1 GNUmakefile
+$FGREP $magic1 sub/GNUmakefile
+
+$sleep
+cd sub
+echo MAGIC = $magic2 >> GNUmakefile.am
+$MAKE
+cd ..
+debug_info
+$FGREP $magic2 sub/GNUmakefile
+$FGREP $magic2 sub/GNUmakefile.in
+$FGREP $magic1 sub/GNUmakefile sub/GNUmakefile.in && Exit 1
+$FGREP $magic2 GNUmakefile GNUmakefile.in && Exit 1
+
+:
diff --git a/tests/remake-subdir-long-time.test 
b/tests/remake-subdir-long-time.test
new file mode 100755
index 0000000..18ba732
--- /dev/null
+++ b/tests/remake-subdir-long-time.test
@@ -0,0 +1,116 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that remake rules from subdirectories do not hang or cycle
+# endlessly, even with build systems that takes several seconds to
+# rebuild the Makefiles.
+# This test tries to ensure a long-enough rebuild time by introducing
+# an explicit delay in the build process.
+# Suggestion by Ralf Wildenhues.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
+AC_CONFIG_FILES([Makefile sub/Makefile])
+AC_SUBST([MAGIC], [magic])
+AC_OUTPUT
+END
+
+echo SUBDIRS = sub > Makefile.am
+mkdir sub
+: > sub/Makefile.am
+
+# Both aclocal and automake are expected to run one and just one time.
+# Create and use wrappers that will verify that.
+
+ocwd=`pwd` || fatal_ "cannot get current working directory"
+
+mkdir bin
+
+cat > bin/automake <<END
+#!/bin/sh
+set -e
+PATH='$PATH'; export PATH
+sentinel='$ocwd/automake-has-run'
+if test -f "\$sentinel"; then
+  echo "Automake has been run more than one time" >&2
+  exit 1
+else
+  echo automake has run > "\$sentinel"
+fi
+$sleep; $sleep;
+exec $AUTOMAKE \${1+"\$@"}
+END
+chmod a+x bin/automake
+
+cat > bin/aclocal <<END
+#!/bin/sh
+set -e
+PATH='$PATH'; export PATH
+sentinel='$ocwd/aclocal-has-run'
+if test -f "\$sentinel"; then
+  echo "Aclocal has been run more than one time" >&2
+  exit 1
+else
+  echo aclocal has run > "\$sentinel"
+fi
+$sleep; $sleep;
+exec $ACLOCAL \${1+"\$@"}
+END
+chmod a+x bin/aclocal
+
+# Just to be sure.
+cp bin/automake bin/automake-$APIVERSION
+cp bin/aclocal bin/aclocal-$APIVERSION
+
+PATH=$ocwd/bin$PATH_SEPARATOR$PATH; export PATH
+
+AUTOMAKE=automake ACLOCAL=aclocal; export AUTOMAKE ACLOCAL
+
+$ACLOCAL  # Should use or just-defined wrapper.
+$AUTOMAKE # Likewise.
+$AUTOCONF
+
+# Sanity check: the wrappers have been used.
+test -f automake-has-run
+test -f aclocal-has-run
+rm -f automake-has-run aclocal-has-run
+
+./configure
+# Sanity check: Makefile doesn't get updated uselessly.
+ACLOCAL=false AUTOMAKE=false AUTOCONF=false $MAKE -e
+
+$sleep
+sed "s|magic|magic2|" configure.in > t
+mv -f t configure.in
+
+cd sub
+AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL" $MAKE -e Makefile
+cd ..
+
+# For debugging.
+ls -l . sub
+grep -i magic configure Makefile.in Makefile sub/Makefile.in sub/Makefile
+# Sanity checks.
+$FGREP magic2 configure
+$FGREP magic2 Makefile
+$FGREP magic2 sub/Makefile
+
+:
diff --git a/tests/remake-subdir.test b/tests/remake-subdir.test
new file mode 100755
index 0000000..5bbc345
--- /dev/null
+++ b/tests/remake-subdir.test
@@ -0,0 +1,81 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that remake rules works from subdirectories, even with non-GNU
+# make implementations.
+
+. ./defs || Exit 1
+
+set -e
+
+if using_gmake; then
+  remake=$MAKE
+else
+  remake="$MAKE Makefile"
+fi
+
+magic1='::MagicString::One::'
+magic2='__MagicString__Two__'
+
+debug_info ()
+{
+  grep -i magic configure Makefile.in Makefile sub/Makefile.in sub/Makefile
+}
+
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_SUBST([MAGIC], [magic])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+END
+
+mkdir sub
+: > sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+debug_info
+
+$sleep
+sed "s|magic|$magic1|" configure.in > t
+mv -f t configure.in
+cd sub
+$remake
+cd ..
+debug_info
+$FGREP $magic1 configure
+$FGREP $magic1 Makefile
+$FGREP $magic1 sub/Makefile
+
+$sleep
+cd sub
+echo MAGIC = $magic2 >> Makefile.am
+$remake
+cd ..
+debug_info
+$FGREP $magic2 sub/Makefile
+$FGREP $magic2 sub/Makefile.in
+$FGREP $magic1 sub/Makefile sub/Makefile.in && Exit 1
+$FGREP $magic2 Makefile Makefile.in && Exit 1
+
+:
diff --git a/tests/remake-subdir2.test b/tests/remake-subdir2.test
new file mode 100755
index 0000000..09d1a36
--- /dev/null
+++ b/tests/remake-subdir2.test
@@ -0,0 +1,82 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that remake rules works from subdirectories, even when makefiles
+# are not named "Makefile".
+
+. ./defs || Exit 1
+
+set -e
+
+magic1='::MagicString::One::'
+magic2='__MagicString__Two__'
+
+debug_info ()
+{
+  grep -i magic configure build.in build.mk sub/build.in sub/build.mk
+}
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([build.mk:build.in])
+AC_CONFIG_FILES([sub/build.mk:sub/build.in])
+AC_SUBST([MAGIC], [magic])
+AC_OUTPUT
+END
+
+cat > build.am <<'END'
+AM_MAKEFLAGS = -f build.mk
+SUBDIRS = sub
+END
+
+mkdir sub
+cat > sub/build.am <<'END'
+AM_MAKEFLAGS = -f build.mk
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+ls -l # For debugging.
+
+$MAKE -f build.mk
+debug_info
+
+$sleep
+sed "s|magic|$magic1|" configure.in > t
+mv -f t configure.in
+cd sub
+$MAKE -f build.mk build.mk
+cd ..
+debug_info
+$FGREP $magic1 configure
+$FGREP $magic1 build.mk
+$FGREP $magic1 sub/build.mk
+
+$sleep
+cd sub
+echo MAGIC = $magic2 >> build.am
+$MAKE -f build.mk build.mk
+cd ..
+debug_info
+$FGREP $magic2 sub/build.mk
+$FGREP $magic2 sub/build.in
+$FGREP $magic1 sub/build.in sub/build.mk && Exit 1
+$FGREP $magic2 build.in build.mk && Exit 1
+
+:
diff --git a/tests/self-check-env-sanitize.test 
b/tests/self-check-env-sanitize.test
new file mode 100755
index 0000000..9d18d9e
--- /dev/null
+++ b/tests/self-check-env-sanitize.test
@@ -0,0 +1,30 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Make sure that the testsuite initialization code complains when
+# some testsuite-influential variables are set in the environment.
+
+set -x
+
+exec 5>&1
+for var in me parallel_tests required; do
+  env "$var=foo" /bin/sh -c '. ./defs' foo.test && exit 1
+  env "$var=foo" /bin/sh -c '. ./defs' foo.test 2>&1 1>&5 \
+    | grep "variable \`$var' is set in the environment.*unsafe" || exit 1
+done
+
+:
diff --git a/tests/self-check-report.test b/tests/self-check-report.test
new file mode 100755
index 0000000..639319a
--- /dev/null
+++ b/tests/self-check-report.test
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Test subroutines to report warnings, and to signal failures, skips
+# and hard errors.
+
+. ./defs || Exit 1
+
+set +e
+
+exec 5>&1
+
+(warn_ foobar) 2>&1 1>&5 | grep '^foobar$'             || Exit 1
+(fail_ foo); test $? -eq 1                             || Exit 1
+(fail_ foo) 2>&1 1>&5 | grep "^$me: failed test: foo"  || Exit 1
+(skip_ foo); test $? -eq 77                            || Exit 1
+(skip_ foo) 2>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
+(framework_failure_ foo); test $? -eq 99               || Exit 1
+(framework_failure_ foo) 2>&1 1>&5 \
+  | grep "^$me: set-up failure: foo"                   || Exit 1
+
+stderr_fileno_=6
+
+(warn_ foobar) 6>&1 1>&5 | grep '^foobar$'             || Exit 1
+(fail_ foo); test $? -eq 1                             || Exit 1
+(fail_ foo) 6>&1 1>&5 | grep "^$me: failed test: foo"  || Exit 1
+(skip_ foo); test $? -eq 77                            || Exit 1
+(skip_ foo) 6>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
+(framework_failure_ foo); test $? -eq 99               || Exit 1
+(framework_failure_ foo) 6>&1 1>&5 \
+  | grep "^$me: set-up failure: foo"                   || Exit 1
+
+:
diff --git a/tests/silent-configsite.test b/tests/silent-configsite.test
new file mode 100755
index 0000000..a0255f5
--- /dev/null
+++ b/tests/silent-configsite.test
@@ -0,0 +1,86 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the user can control default mode of silent-rules
+# from config.site, and that this default can be overridden from
+# either the ./configure or make command line.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'EOF'
+AM_SILENT_RULES
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+.PHONY: test-silent test-nosilent
+test-silent:
+       test x'$(AM_DEFAULT_VERBOSITY)' = x'0'
+test-nosilent:
+       test x'$(AM_DEFAULT_VERBOSITY)' = x'1'
+EOF
+
+unset enable_silent_rules || :
+
+: 'No explicit default in configure.in, enable by default in config.site'
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+echo "enable_silent_rules=\${enable_silent_rules-yes}" > config.site
+CONFIG_SITE=./config.site ./configure
+$MAKE test-silent
+$MAKE distclean
+# Command line should win over default values in config.site.
+CONFIG_SITE=./config.site ./configure --disable-silent-rules
+$MAKE test-nosilent
+$MAKE distclean
+
+: 'Disable by default in configure.in, enable by default in config.site'
+
+sed 's/^AM_SILENT_RULES/&([no])/' configure.in > configure.tmp
+mv -f configure.tmp configure.in
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+echo "enable_silent_rules=\${enable_silent_rules-yes}" > config.site
+CONFIG_SITE=./config.site ./configure
+$MAKE test-silent
+# Command line should win over default values in config.site.
+$MAKE distclean
+CONFIG_SITE=./config.site ./configure --disable-silent-rules
+$MAKE test-nosilent
+$MAKE distclean
+
+: 'Enable by default in configure.in, disable by default in config.site'
+
+sed 's/^AM_SILENT_RULES/&([yes])/' configure.in > configure.tmp
+mv -f configure.tmp configure.in
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+echo "enable_silent_rules=\${enable_silent_rules-no}" > config.site
+CONFIG_SITE=./config.site ./configure
+$MAKE test-nosilent
+$MAKE distclean
+# Command line should win over default values in config.site.
+CONFIG_SITE=./config.site ./configure --enable-silent-rules
+$MAKE test-silent
+$MAKE distclean
+
+:
diff --git a/tests/silent-lex-gcc.test b/tests/silent-lex-gcc.test
new file mode 100755
index 0000000..426dc50
--- /dev/null
+++ b/tests/silent-lex-gcc.test
@@ -0,0 +1,143 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check silent-rules mode for Lex, forcing gcc depmode.
+# Keep this in sync with sister test `silent-lex-generic.test'.
+
+required='flex gcc'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_LEX
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.l
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+LDADD = $(LEXLIB)
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.l
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CFLAGS)
+LDADD = $(LEXLIB)
+EOF
+
+cat > foo.l <<'EOF'
+%%
+"END"   return EOF;
+.
+%%
+EOF
+cp foo.l sub/bar.l
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-lex-gcc.test'.
+for config_args in \
+  am_cv_CC_dependencies_compiler_type=gcc
+do
+  ./configure $config_args --enable-silent-rules
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'LEX .*foo\.' stdout
+  grep 'LEX .*bar\.' stdout
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  # Don't look for LEX, as probably lex hasn't been re-run.
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Ensure a truly clean rebuild.
+  $MAKE clean
+  rm -f foo.c sub/bar.c
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+  grep 'ylwrap ' stdout
+
+  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  # Don't look for ylwrap, as probably lex hasn't been re-run.
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+  # Ensure a truly clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+  rm -f foo.c sub/bar.c
+
+done
+
+:
diff --git a/tests/silent-lex-generic.test b/tests/silent-lex-generic.test
new file mode 100755
index 0000000..66535e8
--- /dev/null
+++ b/tests/silent-lex-generic.test
@@ -0,0 +1,143 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check silent-rules mode for Lex.
+# Keep this in sync with sister test `silent-lex-gcc.test'.
+
+required='flex'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_LEX
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.l
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+LDADD = $(LEXLIB)
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.l
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CFLAGS)
+LDADD = $(LEXLIB)
+EOF
+
+cat > foo.l <<'EOF'
+%%
+"END"   return EOF;
+.
+%%
+EOF
+cp foo.l sub/bar.l
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected.  Try also with dependency tracking
+# explicitly disabled.
+for config_args in \
+  --enable-dependency-tracking --disable-dependency-tracking
+do
+  ./configure $config_args --enable-silent-rules
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'LEX .*foo\.' stdout
+  grep 'LEX .*bar\.' stdout
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  # Don't look for LEX, as probably lex hasn't been re-run.
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Ensure a truly clean rebuild.
+  $MAKE clean
+  rm -f foo.c sub/bar.c
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+  grep 'ylwrap ' stdout
+
+  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  # Don't look for ylwrap, as probably lex hasn't been re-run.
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+  # Ensure a truly clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+  rm -f foo.c sub/bar.c
+
+done
+
+:
diff --git a/tests/silent-many-gcc.test b/tests/silent-many-gcc.test
new file mode 100755
index 0000000..d770a46
--- /dev/null
+++ b/tests/silent-many-gcc.test
@@ -0,0 +1,220 @@
+#!/bin/sh
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check silent-rules mode, with gcc depmode and many languages at once.
+# This test partly overlaps with other silent*.test, but it serves as
+# a stress test by using many different languages at once -- so don't
+# remove this test script.
+# This test requires the GNU compilers; keep it in sync with sister test
+# `silent-many-generic.test', which should work with generic compilers.
+
+required='gcc g++ gfortran flex bison'
+. ./defs || Exit 1
+
+set -e
+
+# Avoids too much code duplication.
+do_and_check_silent_build ()
+{
+  case $1 in
+    --rebuild) rebuild=true;;
+            *) rebuild=false;;
+  esac
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  # Avoid spurious failures with SunStudio Fortran compilers.
+  sed '/^NOTICE:/d' stdout > t
+  mv -f t stdout
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'CXX .*foo1\.' stdout
+  grep 'CXX .*baz1\.' stdout
+  grep 'FC .*foo2\.'  stdout
+  grep 'FC .*baz2\.'  stdout
+  grep 'F77 .*foo3\.' stdout
+  grep 'F77 .*baz3\.' stdout
+  grep ' CC .*foo5\.' stdout
+  grep ' CC .*baz5\.' stdout
+  grep ' CC .*foo6\.' stdout
+  grep ' CC .*baz6\.' stdout
+
+  grep 'CXXLD .*foo' stdout
+  grep 'CCLD .*bar'  stdout
+  grep 'CXXLD .*baz' stdout
+  grep 'CCLD .*bla'  stdout
+
+  if $rebuild; then :; else
+    grep 'YACC .*foo6\.' stdout
+    grep 'YACC .*baz6\.' stdout
+    grep 'LEX .*foo5\.'  stdout
+    grep 'LEX .*baz5\.'  stdout
+  fi
+
+  unset rebuild
+}
+
+# Avoids too much code duplication.
+do_and_check_verbose_build ()
+{
+
+  case $1 in
+    --rebuild) rebuild=true;;
+            *) rebuild=false;;
+  esac
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+
+  if $rebuild; then :; else
+    grep 'ylwrap ' stdout
+    $EGREP '(LEX|YACC) ' stdout && Exit 1
+  fi
+
+  unset rebuild
+}
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_F77
+AC_PROG_FC
+AC_PROG_LEX
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo bar fo2
+bar_CFLAGS = $(AM_CFLAGS)
+foo_SOURCES = foo1.cpp foo2.f90 foo3.f foo5.l foo6.y
+fo2_SOURCES = $(foo_SOURCES)
+fo2_CPPFLAGS = $(AM_CPPFLAGS)
+fo2_FFLAGS = $(AM_FFLAGS)
+fo2_FCFLAGS = $(AM_FCFLAGS)
+SUBDIRS = sub
+AM_YFLAGS = -d
+LDADD = $(LEXLIB)
+BUILT_SOURCES = foo6.h
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = baz bla ba2
+bla_CFLAGS = $(AM_CFLAGS)
+baz_SOURCES = baz1.cpp baz2.f90 baz3.f baz5.l baz6.y
+ba2_SOURCES = $(baz_SOURCES)
+ba2_CPPFLAGS = $(AM_CPPFLAGS)
+ba2_FFLAGS = $(AM_FFLAGS)
+ba2_FCFLAGS = $(AM_FCFLAGS)
+AM_YFLAGS = -d
+LDADD = $(LEXLIB)
+BUILT_SOURCES = baz6.h
+EOF
+
+cat > foo1.cpp <<'EOF'
+int main ()
+{
+  return 0;
+}
+EOF
+cat > foo2.f90 <<'EOF'
+      subroutine foo2
+      return
+      end
+EOF
+cat > foo3.f <<'EOF'
+      subroutine foo3
+      return
+      end
+EOF
+cat > foo5.l <<'EOF'
+%%
+"END"   return EOF;
+.
+%%
+EOF
+cat > foo6.y <<'EOF'
+%{
+void yyerror (char *s) {}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo1.cpp bar.c
+cp foo1.cpp sub/baz.c
+cp foo1.cpp sub/bla.c
+cp foo1.cpp sub/baz1.cpp
+cp foo2.f90 sub/baz2.f90
+cp foo3.f sub/baz3.f
+cp foo5.l sub/baz5.l
+cp foo6.y sub/baz6.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-many-gcc.test'.
+for config_args in \
+  am_cv_CC_dependencies_compiler_type=gcc
+do
+
+  ./configure $config_args --enable-silent-rules
+
+  do_and_check_silent_build
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+  do_and_check_silent_build --rebuild
+
+  # Ensure a clean rebuild.
+  $MAKE clean
+  # This is required, since these files are not removed by `make clean'
+  # (as dictated by the GNU Coding Standards).
+  rm -f foo5.c foo6.[ch] sub/baz5.c sub/baz6.[ch]
+
+  do_and_check_verbose_build
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+  do_and_check_verbose_build --rebuild
+
+  # Ensure a clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+
+done
+
+:
diff --git a/tests/silent-many-generic.test b/tests/silent-many-generic.test
new file mode 100755
index 0000000..223a97c
--- /dev/null
+++ b/tests/silent-many-generic.test
@@ -0,0 +1,222 @@
+#!/bin/sh
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check silent-rules mode, with many languages at once.
+# This test partly overlaps with other silent*.test, but it serves as
+# a stress test by using many different languages at once -- so don't
+# remove this test script.
+# This test should work with generic compilers; keep it in sync with
+# sister test `silent-many-gcc.test', which requires the GNU compilers
+# and forces the use of gcc depmode.
+
+# FIXME: generic C++/Fortran compilers should suffice here
+required='g++ gfortran flex bison'
+. ./defs || Exit 1
+
+set -e
+
+# Avoids too much code duplication.
+do_and_check_silent_build ()
+{
+  case $1 in
+    --rebuild) rebuild=true;;
+            *) rebuild=false;;
+  esac
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  # Avoid spurious failures with SunStudio Fortran compilers.
+  sed '/^NOTICE:/d' stdout > t
+  mv -f t stdout
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'CXX .*foo1\.' stdout
+  grep 'CXX .*baz1\.' stdout
+  grep 'FC .*foo2\.'  stdout
+  grep 'FC .*baz2\.'  stdout
+  grep 'F77 .*foo3\.' stdout
+  grep 'F77 .*baz3\.' stdout
+  grep ' CC .*foo5\.' stdout
+  grep ' CC .*baz5\.' stdout
+  grep ' CC .*foo6\.' stdout
+  grep ' CC .*baz6\.' stdout
+
+  grep 'CXXLD .*foo' stdout
+  grep 'CCLD .*bar'  stdout
+  grep 'CXXLD .*baz' stdout
+  grep 'CCLD .*bla'  stdout
+
+  if $rebuild; then :; else
+    grep 'YACC .*foo6\.' stdout
+    grep 'YACC .*baz6\.' stdout
+    grep 'LEX .*foo5\.'  stdout
+    grep 'LEX .*baz5\.'  stdout
+  fi
+
+  unset rebuild
+}
+
+# Avoids too much code duplication.
+do_and_check_verbose_build ()
+{
+
+  case $1 in
+    --rebuild) rebuild=true;;
+            *) rebuild=false;;
+  esac
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+
+  if $rebuild; then :; else
+    grep 'ylwrap ' stdout
+    $EGREP '(LEX|YACC) ' stdout && Exit 1
+  fi
+
+  unset rebuild
+}
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_F77
+AC_PROG_FC
+AC_PROG_LEX
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo bar fo2
+bar_CFLAGS = $(AM_CFLAGS)
+foo_SOURCES = foo1.cpp foo2.f90 foo3.f foo5.l foo6.y
+fo2_SOURCES = $(foo_SOURCES)
+fo2_CPPFLAGS = $(AM_CPPFLAGS)
+fo2_FFLAGS = $(AM_FFLAGS)
+fo2_FCFLAGS = $(AM_FCFLAGS)
+SUBDIRS = sub
+AM_YFLAGS = -d
+LDADD = $(LEXLIB)
+BUILT_SOURCES = foo6.h
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = baz bla ba2
+bla_CFLAGS = $(AM_CFLAGS)
+baz_SOURCES = baz1.cpp baz2.f90 baz3.f baz5.l baz6.y
+ba2_SOURCES = $(baz_SOURCES)
+ba2_CPPFLAGS = $(AM_CPPFLAGS)
+ba2_FFLAGS = $(AM_FFLAGS)
+ba2_FCFLAGS = $(AM_FCFLAGS)
+AM_YFLAGS = -d
+LDADD = $(LEXLIB)
+BUILT_SOURCES = baz6.h
+EOF
+
+cat > foo1.cpp <<'EOF'
+int main ()
+{
+  return 0;
+}
+EOF
+cat > foo2.f90 <<'EOF'
+      subroutine foo2
+      return
+      end
+EOF
+cat > foo3.f <<'EOF'
+      subroutine foo3
+      return
+      end
+EOF
+cat > foo5.l <<'EOF'
+%%
+"END"   return EOF;
+.
+%%
+EOF
+cat > foo6.y <<'EOF'
+%{
+void yyerror (char *s) {}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo1.cpp bar.c
+cp foo1.cpp sub/baz.c
+cp foo1.cpp sub/bla.c
+cp foo1.cpp sub/baz1.cpp
+cp foo2.f90 sub/baz2.f90
+cp foo3.f sub/baz3.f
+cp foo5.l sub/baz5.l
+cp foo6.y sub/baz6.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected.  Try also with dependency tracking
+# explicitly disabled.
+for config_args in \
+  --enable-dependency-tracking --disable-dependency-tracking
+do
+
+  ./configure $config_args --enable-silent-rules
+
+  do_and_check_silent_build
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+  do_and_check_silent_build --rebuild
+
+  # Ensure a clean rebuild.
+  $MAKE clean
+  # This is required, since these files are not removed by `make clean'
+  # (as dictated by the GNU Coding Standards).
+  rm -f foo5.c foo6.[ch] sub/baz5.c sub/baz6.[ch]
+
+  do_and_check_verbose_build
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+  do_and_check_verbose_build --rebuild
+
+  # Ensure a clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+
+done
+
+:
diff --git a/tests/silent-yacc-gcc.test b/tests/silent-yacc-gcc.test
new file mode 100755
index 0000000..33ae8ae
--- /dev/null
+++ b/tests/silent-yacc-gcc.test
@@ -0,0 +1,145 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check silent-rules mode for Yacc, forcing gcc depmode.
+# Keep this in sync with sister test `silent-yacc-generic.test'.
+
+required='gcc bison'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.y
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CPPFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.y
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CPPFLAGS)
+EOF
+
+cat > foo.y <<'EOF'
+%{
+void yyerror (char *s) {}
+int yylex (void) {return 0;}
+int main(void) {return 0;}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo.y sub/bar.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-yacc-gcc.test'.
+for config_args in \
+  am_cv_CC_dependencies_compiler_type=gcc
+do
+  ./configure $config_args --enable-silent-rules
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'YACC .*foo\.' stdout
+  grep 'YACC .*bar\.' stdout
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  # Don't look for YACC, as probably yacc hasn't been re-run.
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Ensure a truly clean rebuild.
+  $MAKE clean
+  rm -f foo.[ch] sub/bar.[ch]
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+  grep 'ylwrap ' stdout
+
+  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  # Don't look for ylwrap, as probably lex hasn't been re-run.
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+  # Ensure a truly clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+  rm -f foo.[ch] sub/bar.[ch]
+
+done
+
+:
diff --git a/tests/silent-yacc-generic.test b/tests/silent-yacc-generic.test
new file mode 100755
index 0000000..b7489da
--- /dev/null
+++ b/tests/silent-yacc-generic.test
@@ -0,0 +1,145 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check silent-rules mode for Yacc.
+# Keep this in sync with sister test `silent-yacc-gcc.test'.
+
+required='bison'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.y
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CPPFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.y
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CPPFLAGS)
+EOF
+
+cat > foo.y <<'EOF'
+%{
+void yyerror (char *s) {}
+int yylex (void) {return 0;}
+int main(void) {return 0;}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo.y sub/bar.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected.  Try also with dependency tracking
+# explicitly disabled.
+for config_args in \
+  --enable-dependency-tracking --disable-dependency-tracking
+do
+  ./configure $config_args --enable-silent-rules
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'YACC .*foo\.' stdout
+  grep 'YACC .*bar\.' stdout
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  # Don't look for YACC, as probably yacc hasn't been re-run.
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Ensure a truly clean rebuild.
+  $MAKE clean
+  rm -f foo.[ch] sub/bar.[ch]
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+  grep 'ylwrap ' stdout
+
+  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  # Don't look for ylwrap, as probably lex hasn't been re-run.
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+  # Ensure a truly clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+  rm -f foo.[ch] sub/bar.[ch]
+
+done
+
+:
diff --git a/tests/silent.test b/tests/silent.test
index c91115c..97d881e 100755
--- a/tests/silent.test
+++ b/tests/silent.test
@@ -18,7 +18,7 @@
 
 # Please keep this file in sync with silent2.test.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/silent2.test b/tests/silent2.test
index da22718..aed8546 100755
--- a/tests/silent2.test
+++ b/tests/silent2.test
@@ -20,7 +20,7 @@
 # Please keep this file in sync with silent.test.
 
 required=gcc
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/silent3.test b/tests/silent3.test
index d0a0131..17f1959 100755
--- a/tests/silent3.test
+++ b/tests/silent3.test
@@ -19,7 +19,7 @@
 # Please keep this file in sync with silent4.test and silent9.test.
 
 required=libtoolize
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -85,6 +85,4 @@ grep ' -o libfoo' stdout
 # The libtool command line can contain e.g. a `--tag=CC' option.
 sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
 
-$MAKE distclean
-
 :
diff --git a/tests/silent4.test b/tests/silent4.test
index c6c1298..9c343c0 100755
--- a/tests/silent4.test
+++ b/tests/silent4.test
@@ -20,7 +20,7 @@
 # Please keep this file in sync with silent3.test and silent9.test.
 
 required="libtoolize gcc"
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -86,6 +86,4 @@ grep ' -o libfoo' stdout
 # The libtool command line can contain e.g. a `--tag=CC' option.
 sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
 
-$MAKE distclean
-
 :
diff --git a/tests/silent5.test b/tests/silent5.test
deleted file mode 100755
index e29f48f..0000000
--- a/tests/silent5.test
+++ /dev/null
@@ -1,215 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check silent-rules mode, languages other than C.
-# This test partly overlaps with other silent*.test, but it serves as
-# a stress test by using many different languages at once -- so don't
-# remove this test script.
-
-# FIXME: generic C++/Fortran compilers should suffice here
-required='g++ gfortran flex bison'
-. ./defs
-
-set -e
-
-# Avoids too much code duplication.
-do_and_check_silent_build ()
-{
-  case $1 in
-    --rebuild) rebuild=true;;
-            *) rebuild=false;;
-  esac
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  grep 'CXX .*foo1\.' stdout
-  grep 'CXX .*baz1\.' stdout
-  grep 'FC .*foo2\.'  stdout
-  grep 'FC .*baz2\.'  stdout
-  grep 'F77 .*foo3\.' stdout
-  grep 'F77 .*baz3\.' stdout
-  grep ' CC .*foo5\.' stdout
-  grep ' CC .*baz5\.' stdout
-  grep ' CC .*foo6\.' stdout
-  grep ' CC .*baz6\.' stdout
-
-  grep 'CXXLD .*foo' stdout
-  grep 'CCLD .*bar'  stdout
-  grep 'CXXLD .*baz' stdout
-  grep 'CCLD .*bla'  stdout
-
-  if $rebuild; then :; else
-    grep 'YACC .*foo6\.' stdout
-    grep 'YACC .*baz6\.' stdout
-    grep 'LEX .*foo5\.'  stdout
-    grep 'LEX .*baz5\.'  stdout
-  fi
-
-  unset rebuild
-}
-
-# Avoids too much code duplication.
-do_and_check_verbose_build ()
-{
-
-  case $1 in
-    --rebuild) rebuild=true;;
-            *) rebuild=false;;
-  esac
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
-
-  if $rebuild; then :; else
-    grep 'ylwrap ' stdout
-    $EGREP '(LEX|YACC) ' stdout && Exit 1
-  fi
-
-  unset rebuild
-}
-
-mkdir sub
-
-cat >>configure.in <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
-AC_PROG_CXX
-AC_PROG_F77
-AC_PROG_FC
-AC_PROG_LEX
-AC_PROG_YACC
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo bar fo2
-bar_CFLAGS = $(AM_CFLAGS)
-foo_SOURCES = foo1.cpp foo2.f90 foo3.f foo5.l foo6.y
-fo2_SOURCES = $(foo_SOURCES)
-fo2_CPPFLAGS = $(AM_CPPFLAGS)
-fo2_FFLAGS = $(AM_FFLAGS)
-fo2_FCFLAGS = $(AM_FCFLAGS)
-SUBDIRS = sub
-AM_YFLAGS = -d
-LDADD = $(LEXLIB)
-BUILT_SOURCES = foo6.h
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = baz bla ba2
-bla_CFLAGS = $(AM_CFLAGS)
-baz_SOURCES = baz1.cpp baz2.f90 baz3.f baz5.l baz6.y
-ba2_SOURCES = $(baz_SOURCES)
-ba2_CPPFLAGS = $(AM_CPPFLAGS)
-ba2_FFLAGS = $(AM_FFLAGS)
-ba2_FCFLAGS = $(AM_FCFLAGS)
-AM_YFLAGS = -d
-LDADD = $(LEXLIB)
-BUILT_SOURCES = baz6.h
-EOF
-
-cat > foo1.cpp <<'EOF'
-int main ()
-{
-  return 0;
-}
-EOF
-cat > foo2.f90 <<'EOF'
-      subroutine foo2
-      return
-      end
-EOF
-cat > foo3.f <<'EOF'
-      subroutine foo3
-      return
-      end
-EOF
-cat > foo5.l <<'EOF'
-%%
-"END"   return EOF;
-.
-%%
-EOF
-cat > foo6.y <<'EOF'
-%{
-void yyerror (char *s) {}
-%}
-%token EOF
-%%
-fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
-EOF
-cp foo1.cpp bar.c
-cp foo1.cpp sub/baz.c
-cp foo1.cpp sub/bla.c
-cp foo1.cpp sub/baz1.cpp
-cp foo2.f90 sub/baz2.f90
-cp foo3.f sub/baz3.f
-cp foo5.l sub/baz5.l
-cp foo6.y sub/baz6.y
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# configure once for fastdep, once for non-fastdep, once for nodep
-for config_args in \
-  '' \
-  am_cv_CC_dependencies_compiler_type=gcc \
-  --disable-dependency-tracking
-do
-
-  ./configure $config_args --enable-silent-rules
-
-  do_and_check_silent_build
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-  do_and_check_silent_build --rebuild
-
-  # Ensure a clean rebuild.
-  $MAKE clean
-  # This is required, since these files are not removed by `make clean'
-  # (as dictated by the GNU Coding Standards).
-  rm -f foo5.c foo6.[ch] sub/baz5.c sub/baz6.[ch]
-
-  do_and_check_verbose_build
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-  do_and_check_verbose_build --rebuild
-
-  # Ensure a clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-
-done
-
-:
diff --git a/tests/silent6.test b/tests/silent6.test
index 2afe6bc..acd9cea 100755
--- a/tests/silent6.test
+++ b/tests/silent6.test
@@ -16,7 +16,7 @@
 
 # Check user extensibility of silent-rules mode.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/silent7.test b/tests/silent7.test
index cd8e1b5..5ae8ac0 100755
--- a/tests/silent7.test
+++ b/tests/silent7.test
@@ -16,7 +16,7 @@
 
 # Check user extensibility of silent-rules mode.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/silent9.test b/tests/silent9.test
index 11375f8..f0abb29 100755
--- a/tests/silent9.test
+++ b/tests/silent9.test
@@ -19,7 +19,7 @@
 # Please keep this file in sync with silent3.test and silent4.test.
 
 required="libtoolize"
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -85,6 +85,4 @@ grep ' -o libfoo' stdout
 # The libtool command line can contain e.g. a `--tag=CC' option.
 sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
 
-$MAKE distclean
-
 :
diff --git a/tests/silentcxx.test b/tests/silentcxx.test
index aa64d8f..40fc92e 100755
--- a/tests/silentcxx.test
+++ b/tests/silentcxx.test
@@ -17,7 +17,7 @@
 # Check silent-rules mode for C++.
 
 required='g++' # FIXME: any decent C++ compiler should be OK
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/silentf77.test b/tests/silentf77.test
index 39495d4..cfdb186 100755
--- a/tests/silentf77.test
+++ b/tests/silentf77.test
@@ -18,7 +18,7 @@
 # Keep this ins sync with the sister test silentf90.test.
 
 required='gfortran' # FIXME: any working Fortran compiler should be OK!
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -63,6 +63,10 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
+# Avoid spurious failures with SunStudio Fortran compilers.
+sed '/^NOTICE:/d' stdout > t
+mv -f t stdout
+cat stdout
 
 $EGREP ' (-c|-o)' stdout && Exit 1
 grep 'mv ' stdout && Exit 1
@@ -87,5 +91,4 @@ grep ' -o ' stdout
 
 $EGREP '(F77|FC|LD) ' stdout && Exit 1
 
-$MAKE clean
-$MAKE maintainer-clean
+:
diff --git a/tests/silentf90.test b/tests/silentf90.test
index 9330bdd..4fe1c3f 100755
--- a/tests/silentf90.test
+++ b/tests/silentf90.test
@@ -18,7 +18,7 @@
 # Keep this ins sync with the sister test silentf77.test.
 
 required='gfortran' # FIXME: any working Fortran compiler should be OK!
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -63,6 +63,10 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
+# Avoid spurious failures with SunStudio Fortran compilers.
+sed '/^NOTICE:/d' stdout > t
+mv -f t stdout
+cat stdout
 
 $EGREP ' (-c|-o)' stdout && Exit 1
 grep 'mv ' stdout && Exit 1
@@ -87,5 +91,4 @@ grep ' -o ' stdout
 
 $EGREP '(F77|FC|LD) ' stdout && Exit 1
 
-$MAKE clean
-$MAKE maintainer-clean
+:
diff --git a/tests/silentlex.test b/tests/silentlex.test
deleted file mode 100755
index 78e0c7d..0000000
--- a/tests/silentlex.test
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check silent-rules mode for Lex.
-
-required='flex'
-. ./defs
-
-set -e
-
-mkdir sub
-
-cat >>configure.in <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
-AC_PROG_LEX
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo1 foo2
-foo1_SOURCES = foo.l
-foo2_SOURCES = $(foo1_SOURCES)
-foo2_CFLAGS = $(AM_CFLAGS)
-SUBDIRS = sub
-LDADD = $(LEXLIB)
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = bar1 bar2
-bar1_SOURCES = bar.l
-bar2_SOURCES = $(bar1_SOURCES)
-bar2_CFLAGS = $(AM_CFLAGS)
-LDADD = $(LEXLIB)
-EOF
-
-cat > foo.l <<'EOF'
-%%
-"END"   return EOF;
-.
-%%
-EOF
-cp foo.l sub/bar.l
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# configure once for fastdep, once for non-fastdep, once for nodep
-for config_args in \
-  '' \
-  am_cv_CC_dependencies_compiler_type=gcc \
-  --disable-dependency-tracking
-do
-  ./configure $config_args --enable-silent-rules
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  grep 'LEX .*foo\.' stdout
-  grep 'LEX .*bar\.' stdout
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  # Don't look for LEX, as probably lex hasn't been re-run.
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Ensure a truly clean rebuild.
-  $MAKE clean
-  rm -f foo.c sub/bar.c
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-  grep 'ylwrap ' stdout
-
-  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  # Don't look for ylwrap, as probably lex hasn't been re-run.
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
-
-  # Ensure a truly clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-  rm -f foo.c sub/bar.c
-
-done
-
-:
diff --git a/tests/silentyacc.test b/tests/silentyacc.test
deleted file mode 100755
index ac5f061..0000000
--- a/tests/silentyacc.test
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check silent-rules mode for Yacc.
-
-required='bison'
-. ./defs
-
-set -e
-
-mkdir sub
-
-cat >>configure.in <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
-AC_PROG_YACC
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo1 foo2
-foo1_SOURCES = foo.y
-foo2_SOURCES = $(foo1_SOURCES)
-foo2_CFLAGS = $(AM_CPPFLAGS)
-SUBDIRS = sub
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = bar1 bar2
-bar1_SOURCES = bar.y
-bar2_SOURCES = $(bar1_SOURCES)
-bar2_CFLAGS = $(AM_CPPFLAGS)
-EOF
-
-cat > foo.y <<'EOF'
-%{
-void yyerror (char *s) {}
-int yylex (void) {return 0;}
-int main(void) {return 0;}
-%}
-%token EOF
-%%
-fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
-EOF
-cp foo.y sub/bar.y
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# configure once for fastdep, once for non-fastdep, once for nodep
-for config_args in \
-  '' \
-  am_cv_CC_dependencies_compiler_type=gcc \
-  --disable-dependency-tracking
-do
-  ./configure $config_args --enable-silent-rules
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  grep 'YACC .*foo\.' stdout
-  grep 'YACC .*bar\.' stdout
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  # Don't look for YACC, as probably yacc hasn't been re-run.
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Ensure a truly clean rebuild.
-  $MAKE clean
-  rm -f foo.[ch] sub/bar.[ch]
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-  grep 'ylwrap ' stdout
-
-  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  # Don't look for ylwrap, as probably lex hasn't been re-run.
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
-
-  # Ensure a truly clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-  rm -f foo.[ch] sub/bar.[ch]
-
-done
-
-:
diff --git a/tests/sinclude.test b/tests/sinclude.test
deleted file mode 100755
index cc8898b..0000000
--- a/tests/sinclude.test
+++ /dev/null
@@ -1,61 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test to see if `m4_sinclude' and `m4_include' works.
-
-. ./defs || Exit 1
-
-set -e
-
-# Overwrite configure.in, because the default uses `sinclude' as package
-# name and this play havoc with Autoconf on some platforms (`sinclude'
-# is an m4 macro).
-cat > configure.in <<EOF
-AC_INIT([amsinclude], [1.0])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
-sinclude([doesntexist.m4])
-EOF
-
-mkdir sub
-cat > sub/p.m4 << 'END'
-AC_SUBST(MAGICALPIG)
-END
-
-cat > sub/h.m4 << 'END'
-AC_SUBST(MAGICALHOG)
-END
-
-cat > sub/g.m4 << 'END'
-AC_SUBST(GREPME)
-END
-
-: > Makefile.am
-
-echo 'sinclude(sub/g.m4)' >> acinclude.m4
-echo 'm4_sinclude(sub/doesntexist.m4)' >> acinclude.m4
-
-$ACLOCAL
-
-echo 'm4_sinclude(sub/p.m4)' >> aclocal.m4
-echo 'm4_include(sub/h.m4)' >> aclocal.m4
-
-$AUTOMAKE
-
-grep doesntexist Makefile.in && Exit 1
-grep MAGICALPIG Makefile.in
-grep MAGICALHOG Makefile.in
-grep GREPME Makefile.in
diff --git a/tests/specflg-dummy.test b/tests/specflg-dummy.test
new file mode 100755
index 0000000..614d6c2
--- /dev/null
+++ b/tests/specflg-dummy.test
@@ -0,0 +1,248 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that even "dummy" per-target flags triggers the use of renamed
+# objects.  I.e., a definition like `foo_CFLAGS = $(AM_CFLAGS)' should
+# always cause Automake to trigger the semantics for per-target CFLAGS,
+# even if AM_CFLAGS is undefined. Similarly for other *FLAGS variables
+# (CXXFLAGS, YFLAGS, LDFLAGS, ...)
+
+. ./defs || Exit 1
+
+set -e
+
+# Disable shell globbing if possible.
+(set +f) >/dev/null 2>&1 && set +f
+
+oIFS=$IFS
+nl='
+'
+
+matches=
+add_match ()
+{
+  matches="$matches$nl$1"
+}
+
+do_check ()
+{
+  IFS=$nl
+  for string in $matches; do
+    IFS=$oIFS
+    $FGREP "$string" Makefile.in
+  done
+  IFS=$oIFS
+}
+
+# Fake libtool presence, so that we won't have to require it.
+cat > acinclude.m4 <<END
+AC_DEFUN([AC_PROG_LIBTOOL], [AC_SUBST([LIBTOOL], [dummy])])
+END
+: > ltmain.sh
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_YACC
+AC_PROG_LEX
+AC_PROG_F77
+AC_PROG_FC
+AM_PROG_GCJ
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AM_PROG_UPC
+AC_PROG_OBJC
+AM_PROG_CC_C_O
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS =
+lib_LIBRARIES =
+lib_LTLIBRARIES =
+END
+
+$ACLOCAL
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog1
+prog1_SOURCES = source1.c
+prog1_CFLAGS = $(AM_CFLAGS)
+END
+
+add_match 'prog1-source1.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog2
+prog2_SOURCES = source2.c
+prog2_CPPFLAGS = $(AM_CPPFLAGS)
+END
+
+add_match 'prog2-source2.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog3
+prog3_SOURCES = source3.cxx
+prog3_CXXFLAGS = $(AM_CXXFLAGS)
+END
+
+add_match 'prog3-source3.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog4
+prog4_SOURCES = source4.c++
+prog4_CPPFLAGS = $(AM_CPPFLAGS)
+END
+
+add_match 'prog4-source4.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog5
+prog5_SOURCES = source5.f
+prog5_FFLAGS = $(AM_FFLAGS)
+END
+
+add_match 'prog5-source5.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog6
+prog6_SOURCES = source6.f90
+prog6_FCFLAGS = $(AM_FCFLAGS)
+END
+
+add_match 'prog6-source6.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog7
+prog7_SOURCES = source7.r
+prog7_RFLAGS = $(AM_RFLAGS)
+END
+
+add_match 'prog7-source7.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog8
+prog8_SOURCES = source8.java
+prog8_GCJFLAGS = $(AM_GCJFLAGS)
+END
+
+add_match 'prog8-source8.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog9
+prog9_SOURCES = source9.upc
+prog9_UPCFLAGS = $(AM_UPCFLAGS)
+END
+
+add_match 'prog9-source9.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog10
+prog10_SOURCES = source10.m
+prog10_OBJCFLAGS = $(AM_OBJCFLAGS)
+END
+
+add_match 'prog10-source10.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += linkprog
+linkprog_SOURCES = linkprog.c
+linkprog_LDFLAGS = $(AM_LDFLAGS)
+END
+
+add_match 'linkprog_LINK ='
+
+cat >> Makefile.am <<'END'
+lib_LIBRARIES += libstatic.a
+libstatic_a_SOURCES = static123.c
+libstatic_a_CFLAGS = $(AM_CFLAGS)
+END
+
+add_match 'libstatic_a-static123.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+lib_LTLIBRARIES += libshared1.la
+libshared1_la_SOURCES = shared1.c
+libshared1_la_LIBTOOLFLAGS = $(AM_LIBTOOLFLAGS)
+END
+
+add_match 'libshared1_la-shared1.lo'
+
+cat >> Makefile.am <<'END'
+lib_LTLIBRARIES += libshared2.la
+libshared2_la_SOURCES = shared2.cc
+libshared2_la_CXXFLAGS = $(AM_CXXFLAGS)
+END
+
+add_match 'libshared2_la-shared2.lo'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += parse1
+parse1_SOURCES = parse.y
+parse1_YFLAGS = $(AM_YFLAGS)
+END
+
+add_match 'parse1-parse.c'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += parse2
+parse2_SOURCES = parse.ypp
+parse2_YFLAGS = $(AM_YFLAGS)
+END
+
+add_match 'parse2-parse.cpp'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += lexer1
+lexer1_SOURCES = lex.l
+lexer1_LFLAGS = $(AM_YFLAGS)
+END
+
+add_match 'lexer1-lex.c'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += lexer2
+lexer2_SOURCES = lexer.ll
+lexer2_LFLAGS = $(AM_YFLAGS)
+END
+
+add_match 'lexer2-lexer.cc'
+
+# For debugging.
+cat Makefile.am
+
+$AUTOMAKE -a
+do_check
+
+sed '
+  s|^\(.*\)_SOURCES *= *|sub_\1_SOURCES = srcsub/|
+  s|^\(.*\)PROGRAMS *+= *|\1PROGRAMS += sub/|
+  s|^\(.*\)LIBRARIES *+= *|\1LIBRARIES += sub/|
+  s|^\(.*\)FLAGS *=|sub_\1FLAGS =|
+' Makefile.am > t
+
+cat - t > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+END
+
+rm -f t
+
+# For debugging.
+cat Makefile.am
+
+$AUTOMAKE
+do_check
+
+:
diff --git a/tests/specflg8.test b/tests/specflg8.test
index 1abcaa2..79daa15 100755
--- a/tests/specflg8.test
+++ b/tests/specflg8.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,25 +34,18 @@ END
 # different flags.
 
 cat > Makefile.am << 'END'
-FALSESOURCE = false.c
+TRUESOURCE = true.c
 bin_PROGRAMS = false true
-true_SOURCES = $(FALSESOURCE)
-true_CPPFLAGS = -DAM_TRUE
-false_SOURCES = $(FALSESOURCE)
-false_CPPFLAGS = -DAM_FALSE
+true_SOURCES = $(TRUESOURCE)
+true_CPPFLAGS = -DEXIT_CODE=0
+false_SOURCES = $(TRUESOURCE)
+false_CPPFLAGS = -DEXIT_CODE=1
 END
 
-cat > false.c << 'END'
-#include <stdio.h>
-int
-main (int argc, char *argv[])
+cat > true.c << 'END'
+int main (void)
 {
-#ifdef AM_TRUE
-   puts ("true");
-#else
-   puts ("false");
-#endif
-   return 0;
+   return EXIT_CODE;
 }
 END
 
@@ -62,5 +55,11 @@ $AUTOMAKE -a
 
 ./configure
 $MAKE
-./true | grep true
-./false | grep false
+
+./true
+./false && Exit 1
+
+test -f ./true-true.o
+test -f ./true-true.o
+
+:
diff --git a/tests/spy.test b/tests/spy.test
index c4993c6..5f1a87b 100755
--- a/tests/spy.test
+++ b/tests/spy.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,8 +16,8 @@
 
 # Check whether double colon rules work.  The Unix V7 make manual
 # mentions double-colon rules, but POSIX does not.  They seem to be
-# supported by all Make implementation as we can tell. This test case
-# is a spy: we want to detect if there exist implementations where
+# supported by all Make implementation as far as we can tell. This test
+# case is a spy: we want to detect if there exist implementations where
 # these do not work.  We might use these rules to simplify the rebuild
 # rules (instead of the $? hack).
 
@@ -87,8 +87,22 @@ $sleep
 touch b
 $MAKE
 test "`cat a`" = rule1
+# Ensure a is strictly newer than b, so HP-UX make does not execute rule2.
+$sleep
 : > a
 $sleep
 touch c
 $MAKE
 test "`cat a`" = rule2
+
+# Unfortunately, the following is not portable to FreeBSD/NetBSD/OpenBSD
+# make, see explanation above.
+
+#: > a
+#$sleep
+#touch b c
+#$MAKE
+#grep rule1 a
+#grep rule2 a
+
+:
diff --git a/tests/strip2.test b/tests/strip2.test
new file mode 100755
index 0000000..5786ded
--- /dev/null
+++ b/tests/strip2.test
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure install-strip works when STRIP consists of more than one word.
+# This test needs GNU binutils strip.  See sister test strip3.
+
+required=strip
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+lib_LIBRARIES = libfoo.a
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+cat > libfoo.c << 'END'
+int foo () { return 0; }
+END
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+prefix=`pwd`/inst
+./configure --prefix="$prefix" STRIP='strip --verbose'
+$MAKE
+$MAKE install-strip
+
+:
diff --git a/tests/strip3.test b/tests/strip3.test
new file mode 100755
index 0000000..b159673
--- /dev/null
+++ b/tests/strip3.test
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure install-strip works when STRIP consists of more than one word.
+# This test needs GNU binutils strip.  Libtool variant.
+
+required='libtoolize strip'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+lib_LTLIBRARIES = libfoo.la
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+cat > libfoo.c << 'END'
+int foo () { return 0; }
+END
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+prefix=`pwd`/inst
+./configure --prefix="$prefix" STRIP='strip --verbose'
+$MAKE
+$MAKE install-strip
+
+:
diff --git a/tests/subdir5.test b/tests/subdir5.test
index 6eb3aaa..3f4dfa3 100755
--- a/tests/subdir5.test
+++ b/tests/subdir5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -55,21 +55,18 @@ $AUTOMAKE --include-deps --copy --add-missing
 $MAKE
 
 # Now add new directories.
-#
-# We shouldn't need to $sleep here: configure ensures that files
-# generated by it are newer than configure.  Thus, even if
-# Makefile.in is newer than configure but the updated Makefile.am
-# below has the same timestamp as Makefile.in, the latter should
-# be rebuilt due to its dependency on configure.in.
 
 # First we add a new directory by modifying configure.in directly.
 # We update configure.in *before* updating sub/Makefile.am; subdir8.test
 # does it in the other way: it updates confiles.m4 (which is m4_included
 # by configure.in there) after Makefile.am.
 
+# Modified configure dependencies must be newer than config.status.
+$sleep
 sed <configure.in >configure.tmp -e '/^AC_OUTPUT$/i\
 AC_CONFIG_FILES([maude/Makefile])\
-m4_include([confile.m4])'
+m4_include([confile.m4])\
+' # last newline required by older OpenBSD sed
 mv -f configure.tmp configure.in
 
 cat configure.in # might be useful for debugging
@@ -88,11 +85,15 @@ echo 'SUBDIRS = maude' >> Makefile.am
 
 # We want a simple rebuild to create maude/Makefile automatically.
 $MAKE
+grep '^SUBDIRS = *maude *$' Makefile.in
+grep '^SUBDIRS = *maude *$' Makefile
 test -f maude/Makefile
 
 # Then we add a new directory by modifying a file included (through
 # `m4_include') by configure.in.
 mkdir maude2
+# Modified configure dependencies must be newer than config.status.
+$sleep
 cat >> confile.m4 << 'END'
 AC_CONFIG_FILES([maude2/Makefile])
 AC_SUBST([GREPME])
@@ -103,8 +104,13 @@ echo 'SUBDIRS += maude2' >> Makefile.am
 # We want a simple rebuild to create maude2/Makefile and update
 # all other Makefiles automatically.
 $MAKE
-grep '^GREPME =' Makefile
-grep '^GREPME =' maude/Makefile
-grep '^GREPME =' maude2/Makefile
+grep '^SUBDIRS =.* maude2' Makefile.in
+grep '^SUBDIRS =.* maude2' Makefile
+
+for ext in '.in' ''; do
+  for d in . maude maude2; do
+    grep '^GREPME =' $d/Makefile$ext
+  done
+done
 
 :
diff --git a/tests/subdir8.test b/tests/subdir8.test
index 093fac8..b39dfe4 100755
--- a/tests/subdir8.test
+++ b/tests/subdir8.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -68,12 +69,6 @@ $AUTOMAKE --copy --add-missing
 $MAKE
 
 # Now add new directories.
-#
-# We shouldn't need to $sleep here: configure ensures that files
-# generated by it are newer than configure.  Thus, even if
-# Makefile.in is newer than configure but the updated Makefile.am
-# below has the same timestamp as Makefile.in, the latter should
-# be rebuilt due to its dependency on configure.in.
 
 # The first step users typically do when adding a new subdir is
 # editing configure.in.  That is already tested by subdir5.test,
@@ -94,6 +89,9 @@ mkdir maude
 
 # Update confiles.m4 *after* updating sub/Makefile.am; subdir5.test do
 # it in the other way: it updates configure.in before Makefile.am.
+# We sleep here because modified configure dependencies must be newer
+# than config.status.
+$sleep
 echo 'AC_CONFIG_FILES([maude/Makefile sub/maude/Makefile])' >> confiles.m4
 
 # We want a simple rebuild from sub/ to create sub/maude/Makefile
@@ -101,6 +99,8 @@ echo 'AC_CONFIG_FILES([maude/Makefile sub/maude/Makefile])' 
>> confiles.m4
 cd sub
 $MAKE
 cd ..
+grep '^SUBDIRS = *maude *$' sub/Makefile.in
+grep '^SUBDIRS = *maude *$' sub/Makefile
 test -f maude/Makefile
 test -f sub/maude/Makefile
 
@@ -109,9 +109,10 @@ test -f sub/maude/Makefile
 echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
 $MAKE
 
-grep '^GREPME =' Makefile
-grep '^GREPME =' maude/Makefile
-grep '^GREPME =' sub/Makefile
-grep '^GREPME =' sub/maude/Makefile
+for ext in '.in' ''; do
+  for d in . maude sub sub/maude; do
+    grep '^GREPME =' $d/Makefile$ext
+  done
+done
 
 :
diff --git a/tests/subdir9.test b/tests/subdir9.test
index c73ca18..403a376 100755
--- a/tests/subdir9.test
+++ b/tests/subdir9.test
@@ -43,8 +43,6 @@ cat >src/subdir2/Makefile.am <<'EOF'
 EXTRA_DIST = foo
 EOF
 
-distdir=$me-1.0
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
diff --git a/tests/subobj.test b/tests/subobj.test
index 64edd0e..39dc1b9 100755
--- a/tests/subobj.test
+++ b/tests/subobj.test
@@ -39,10 +39,10 @@ cat stderr >&2
 grep 'install.*compile' stderr
 test -f compile
 
-$FGREP 'generic/a.$(OBJEXT)' Makefile.in
+grep '^generic/a\.\$(OBJEXT):' Makefile.in
 grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
 
 # Opportunistically test for a different bug.
-grep '^generic/b.\$(OBJEXT):.*dirstamp' Makefile.in
+grep '^generic/b\.\$(OBJEXT):.*dirstamp' Makefile.in
 
 :
diff --git a/tests/subobj10.test b/tests/subobj10.test
index a589e45..dbddf29 100755
--- a/tests/subobj10.test
+++ b/tests/subobj10.test
@@ -21,8 +21,8 @@ required=gcc  # avoid compiler errors.
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(x, 0, x)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([subdir-objects])
 
 AM_PROG_AS
@@ -45,8 +45,6 @@ mkdir src
 : >src/c.s
 : >d.s
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -54,3 +52,5 @@ $AUTOMAKE -a
 ./configure
 $MAKE
 $MAKE distcheck
+
+:
diff --git a/tests/subobj11a.test b/tests/subobj11a.test
new file mode 100755
index 0000000..3bf3012
--- /dev/null
+++ b/tests/subobj11a.test
@@ -0,0 +1,82 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that automake works around a bug of Solaris Make. The bug is the
+# following.  If we have a Makefile containg a file inclusion like this:
+#   include .//foo.mk
+# Solaris make fails with a message like:
+#   make: ... can't find `/foo.mk': No such file or directory
+#   make: fatal error ... read of include file `/foo.mk' failed
+# (even if the file `foo.mk' exists). The error disappear by collapsing
+# the repeated slash `/' characters into a single one.
+#
+# See also sister "grepping" test `subobj11b.test', and related test
+# `subobj11c.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+## the `.//' is meant
+foo_SOURCES = .//src/foo.c
+END
+
+mkdir src
+
+cat > src/foo.c << 'END'
+int main(void)
+{
+  return 0;
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure --enable-dependency-tracking
+
+depdir=`sed -n 's/^ *DEPDIR *= *//p' Makefile`
+if test x"$depdir" != x; then
+  depdir=src/$depdir
+else
+  echo "$me: cannot extract value of DEPDIR from Makefile" >&2
+  Exit 1
+fi
+
+ls -l "$depdir"
+test -f "$depdir"/foo.Po
+
+echo 'quux:; echo "address@hidden@z" >$@' >> "$depdir"/foo.Po
+
+$MAKE quux
+$FGREP "address@hidden@z" quux
+
+$MAKE
+
+DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
+DISTCHECK_CONFIGURE_FLAGS='--disable-dependency-tracking' $MAKE distcheck
+
+:
diff --git a/tests/subobj11b.test b/tests/subobj11b.test
new file mode 100755
index 0000000..1db5fab
--- /dev/null
+++ b/tests/subobj11b.test
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that automake works around a bug of Solaris Make. The bug is the
+# following.  If we have a Makefile containg a file inclusion like this:
+#   include .//foo.mk
+# Solaris make fails with a message like:
+#   make: ... can't find `/foo.mk': No such file or directory
+#   make: fatal error ... read of include file `/foo.mk' failed
+# (even if the file `foo.mk' exists). The error disappear by collapsing
+# the repeated slash `/' characters into a single one.
+#
+# See also "semantic" sister test `subobj11a.test', and related test
+# `subobj11c.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+## The `zardoz' sources should activate a code paths in Automake that
+## cannot be sensibly tested by sister test `subobj11a.test'.  The other
+## sources provide some sort of stress testing.
+foo_SOURCES = \
+  //server/zardoz0.c \
+  //server//zardoz1.c \
+  //server/path/to/zardoz2.c \
+  //server/another//path///to////zardoz3.c \
+  /foobar0.c \
+  ///foobar1.c \
+  ////foobar2.c \
+  /sub///foobar3.c \
+  ///sub/foobar4.c \
+  .//foobar5.c \
+  .//sub/foobar6.c \
+  ./sub//foobar7.c \
+  .//sub//foobar8.c \
+  sub/sub//sub///sub////foobar9.c
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+# Be lax in the regexp, to account for automake conditionals, the
+# use of @am__include@, and similar stuff.
+grep 'include.*//.*foobar' Makefile.in && Exit 1
+
+# These checks depend on automake internals, but presently this is
+# the only way to test the code path we are interested in.
+# Please update these checks when (and if) the relevant automake
+# internals are changed.
+for x in zardoz0 zardoz1 path/to/zardoz2 another/path/to/zardoz3; do
+  case $x in
+   */*) d=`echo $x | sed 's,[^/]*$,,'`; b=`echo $x | sed 's,^.*/,,'`;;
+     *) d=''; b=$x;;
+  esac
+  # Be a little lax in the regexp, to account for automake conditionals,
+  # quoting, and similar stuff.
+  grep "^[^/]*am__include[^/]*//server/$d\\\$(DEPDIR)/$b\\.[^/]*$" Makefile.in
+done
+
+# Sanity checks.
+for i in 0 1 2 3 4 5 6 7 8 9; do
+  grep "am__include.*/foobar$i\\." Makefile.in
+done
+
+:
diff --git a/tests/subobj11c.test b/tests/subobj11c.test
new file mode 100755
index 0000000..9262d15
--- /dev/null
+++ b/tests/subobj11c.test
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Automatic dependency tracking with subdir-objects option active:
+# check for a pathological case of slash-collapsing in the name of
+# included makefile fragments (containing dependency info).
+# See also related tests `subobj11a.test' and `subobj11b.test'
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+foo_SOURCES = //zardoz.c
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+#
+# This check depends on automake internals, but presently this is
+# the only way to test the code path we are interested in.
+# Please update these checks when (and if) the relevant automake
+# internals are changed.
+#
+# Be a little lax in the regexp, to account for automake conditionals,
+# quoting, and similar stuff.
+#
+# FIXME: Are we sure this is the most sensible output in our situation?
+#
+grep '^[^/]*am__include[^/]*//\$(DEPDIR)/zardoz\.[^/]*$' Makefile.in
+
+:
diff --git a/tests/subobj2.test b/tests/subobj2.test
index 1282f80..87a4671 100755
--- a/tests/subobj2.test
+++ b/tests/subobj2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,4 +35,6 @@ $AUTOMAKE
 
 $FGREP 'generic/a.$(OBJEXT)' Makefile.in
 grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
-$FGREP -e '-c -o' Makefile.in
+grep '.*-c -o' Makefile.in
+
+:
diff --git a/tests/subobj3.test b/tests/subobj3.test
index a4ba765..4fe685c 100755
--- a/tests/subobj3.test
+++ b/tests/subobj3.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006  Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2010 Free
+# Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,16 +22,17 @@ required=gcc
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(sub/hello.c)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(hello,0.23)
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
 AC_PROG_CC_STDC
 AM_PROG_CC_C_O
 AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -63,3 +64,5 @@ $AUTOMAKE -a
 ./configure
 ANSI2KNR=./ansi2knr U=_ $MAKE -e
 ./hello
+
+:
diff --git a/tests/subobj4.test b/tests/subobj4.test
index f98ae5b..ead2305 100755
--- a/tests/subobj4.test
+++ b/tests/subobj4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,11 +19,14 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CXX
-AC_OUTPUT(d1/Makefile d2/Makefile)
+AC_CONFIG_FILES([d1/Makefile d2/Makefile])
+AC_OUTPUT
 END
 
 mkdir d1 d2
@@ -43,7 +46,9 @@ END
 : > compile
 : > d2/z.c
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '\$(CC) .*\.\./d2/z\.c' d1/Makefile.in
 
-grep 'CC.*z' d1/Makefile.in
+:
diff --git a/tests/subobj5.test b/tests/subobj5.test
index 9c9568a..c857e73 100755
--- a/tests/subobj5.test
+++ b/tests/subobj5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,12 +19,13 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(generic/a.c)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([generic/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile generic/Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -36,10 +37,12 @@ mkdir generic
 : > generic/a.c
 : > generic/Makefile.am
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
+
 ./configure
+
 $MAKE dist
+
+:
diff --git a/tests/subobj6.test b/tests/subobj6.test
index 42b6e14..228a1e9 100755
--- a/tests/subobj6.test
+++ b/tests/subobj6.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +21,8 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AM_PROG_CC_C_O
 AC_OUTPUT
@@ -38,9 +41,6 @@ test-distclean: distclean
        test ! -f generic/$(am__dirstamp)
 END
 
-# The ac-init file.
-: > f
-
 mkdir generic
 cat > generic/a.c << 'END'
 #include <stdio.h>
@@ -51,8 +51,6 @@ int main ()
 }
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
@@ -86,3 +84,5 @@ cd build2
 ../configure
 $MAKE
 $MAKE mostlyclean
+
+:
diff --git a/tests/subobj7.test b/tests/subobj7.test
index d77670c..dd1a8fe 100755
--- a/tests/subobj7.test
+++ b/tests/subobj7.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,12 +21,10 @@
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(f)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
diff --git a/tests/subobj8.test b/tests/subobj8.test
index 63a02d1..ae9b09b 100755
--- a/tests/subobj8.test
+++ b/tests/subobj8.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,13 +18,16 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AC_CONFIG_AUX_DIR(tools)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([tools])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile foo/Makefile)
+AC_CONFIG_FILES([Makefile foo/Makefile])
+AC_OUTPUT
 END
 
 mkdir tools foo foo/bar
@@ -33,12 +36,14 @@ cat > Makefile.am << 'END'
 SUBDIRS = foo
 END
 
-cat > foo/Makefile.am << 'EOF'
+cat > foo/Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = mumble
 mumble_SOURCES = bar/a.c
-EOF
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+test -f tools/compile
 
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
-test -f tools/compile || Exit 1
+:
diff --git a/tests/subobj9.test b/tests/subobj9.test
index 2b331e0..83f3a31 100755
--- a/tests/subobj9.test
+++ b/tests/subobj9.test
@@ -19,13 +19,13 @@
 required='libtoolize g++'
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(x, 0, x)
-AM_INIT_AUTOMAKE([subdir-objects])
+set -e
 
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_CXX
 AM_PROG_LIBTOOL
-
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
@@ -33,7 +33,7 @@ END
 cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = libfoo.la
 libfoo_la_SOURCES = src/foo.cc .//src/bar.cc  # the `.//' is meant.
-
+.PHONY: print
 print:
        @echo BEG1: "$(LTCXXCOMPILE)" :1END
        @echo BEG2: "$(CXXLINK)" :2END
@@ -55,7 +55,6 @@ int doit2 (void)
 }
 END
 
-set -e
 
 libtoolize --force
 $ACLOCAL
@@ -65,17 +64,22 @@ $AUTOMAKE -a
 # Skip this test on configure errors (e.g., broken C++ compilers).
 ./configure || Exit 77
 
-# opportunistically check that --tag=CXX is used when supported
-if test -n "`./libtool --help | grep tag=TAG`"; then
-  $MAKE print >stdout
+# Ensure './libtool --help' will use the right tool versions.
+export AUTOCONF AUTOMAKE
+
+# Opportunistically check that --tag=CXX is used when supported.
+if ./libtool --help | grep tag=TAG; then
+  $MAKE print >stdout || { cat stdout; Exit 1; }
   cat stdout
   grep 'BEG1: .*--tag=CXX.*--mode=compile.* :1END' stdout
   grep 'BEG2: .*--tag=CXX.*--mode=link.* :2END' stdout
 fi
 
 $MAKE
-$MAKE distcheck 2>&1 | tee out
+$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
+cat output
 # GNU Make used to complain that the Makefile contained two rules
 # for `src/.dirstamp' and `.//src/.dirstamp'.
-grep 'overriding commands' out && Exit 1
+grep 'overriding commands' output && Exit 1
+
 :
diff --git a/tests/subobjname.test b/tests/subobjname.test
index 79584cf..a8128bb 100755
--- a/tests/subobjname.test
+++ b/tests/subobjname.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -70,3 +70,5 @@ dobj=`sed -n '/^am_d_OBJECTS = / {
                p
               }' Makefile.in`
 test "$cobj" = "$dobj"
+
+:
diff --git a/tests/substref.test b/tests/substref.test
index 3d4da05..23dc168 100755
--- a/tests/substref.test
+++ b/tests/substref.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ diff exp got
 
 # This is unrelated to the rest of this test.  But while we are
 # at it, make sure we don't use am__helldl_SOURCES_DIST here, since
-# it's not needed.  DIST_SOURCES should contains $(helldl_SOURCES).
+# it's not needed.  DIST_SOURCES should contain $(helldl_SOURCES).
 grep am__helldl_SOURCES_DIST Makefile && Exit 1
 grep 'DIST_SOURCES.*\$(helldl_SOURCES)' Makefile
 
diff --git a/tests/suffix13.test b/tests/suffix13.test
index 2b39460..8120024 100755
--- a/tests/suffix13.test
+++ b/tests/suffix13.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2006, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2006, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -38,7 +38,8 @@ AUTOMAKE_OPTIONS = subdir-objects
 SUFFIXES = .baz .c
 .baz.c:
        case $@ in sub/*) $(MKDIR_P) sub;; *) :;; esac
-       cp $< $@
+## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5)
+       cp `test -f '$<' || echo $(srcdir)/`$< $@
 
 DISTCLEANFILES = sub/bar.c
 
diff --git a/tests/suffix7.test b/tests/suffix7.test
index 60058b8..eb67195 100755
--- a/tests/suffix7.test
+++ b/tests/suffix7.test
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure Automake supports implicit rules "confusing"
-# extensions.  Inspired by a mail from Alex Hornby. 
+# extensions.  Inspired by a mail from Alex Hornby.
 
 . ./defs || Exit 1
 
diff --git a/tests/tests-environment-backcompat.test 
b/tests/tests-environment-backcompat.test
new file mode 100755
index 0000000..ecf1b16
--- /dev/null
+++ b/tests/tests-environment-backcompat.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# With old serial testsuite driver, TESTS_ENVIRONMENT can be used to
+# define the "test runner", i.e. the program that the test scripts must
+# be run by (with the parallel-tests driver one should use LOG_COMPILER
+# for this).  The behaviour tested here is also documented in the manual.
+
+parallel_tests=no
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_SUBST([PERL], ['$PERL'])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS_ENVIRONMENT = $(PERL) -Mstrict -w
+TESTS = foo.pl bar.pl baz.pl
+XFAIL_TESTS = baz.pl
+EXTRA_DIST = $(TESTS)
+END
+
+echo 'exit (0);' > foo.pl
+echo 'exit (0);' > bar.pl
+
+cat > baz.pl << 'END'
+# With "use strict" enacted, this will cause an error, since the
+# variable `$x' is not declared with `my' nor specified with an
+# explicit package name.
+$x = 0;
+exit ($x);
+END
+
+chmod a+x *.pl
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/tests/txinfo.test b/tests/txinfo.test
index 3f1c533..b764e53 100755
--- a/tests/txinfo.test
+++ b/tests/txinfo.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2011 Free
+# Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,22 +15,36 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to ensure texinfo.tex included in distribution.  Bug report by
+# Test to ensure texinfo.tex is included in distribution.  Bug report by
 # Jim Meyering.
 
+required=makeinfo
 . ./defs || Exit 1
 
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
-magic:
-       @echo $(DISTFILES)
+.PHONY: test1 test2
+test1:
+       @echo DISTFILES = $(DISTFILES)
+       echo ' ' $(DISTFILES) ' ' | grep '[ /]texinfo\.tex '
+test2: distdir
+       ls -l $(distdir)
+       test -f $(distdir)/texinfo.tex
 END
 
 echo '@setfilename textutils.info' > textutils.texi
 : > texinfo.tex
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test1 test2
 
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep 'texinfo\.tex'
+:
diff --git a/tests/txinfo16.test b/tests/txinfo16.test
index 66ed686..4c14aba 100755
--- a/tests/txinfo16.test
+++ b/tests/txinfo16.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2008, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,14 +14,17 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check that info files are not built in $(srcdir).
+# Check that info files are normally built in $(srcdir),
+# not in $(builddir).
 
 required='makeinfo tex texi2dvi'
 . ./defs || Exit 1
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = main.texi
@@ -86,3 +89,5 @@ $MAKE dvi
 test -f main.dvi
 
 $MAKE distcheck
+
+:
diff --git a/tests/txinfo18.test b/tests/txinfo18.test
index 4df5257..8dc8961 100755
--- a/tests/txinfo18.test
+++ b/tests/txinfo18.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2008, 2009, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,9 @@ required='makeinfo tex texi2dvi'
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = main.texi
@@ -62,4 +64,14 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 ./configure
+
+$MAKE dvi
+ls -l           # for debugging
+test -f main.sa # sanity check
+$MAKE clean
+ls -l           # for debugging
+test x"`echo main.*`" = x"main.texi"
+
 TAR_OPTIONS= $MAKE distcheck
+
+:
diff --git a/tests/txinfo2.test b/tests/txinfo2.test
index 2324f57..f51d0b6 100755
--- a/tests/txinfo2.test
+++ b/tests/txinfo2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,24 +22,27 @@
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
-magic:
-       @echo $(DISTFILES)
+.PHONY: test
+test:
+       @echo DISTFILES = $(DISTFILES)
+       case '$(DISTFILES)' in *'~'*) exit 1;; *) exit 0;; esac
 END
 
 : > texinfo.tex
 echo '@setfilename textutils.info' > textutils.texi
 : > textutils.info~
 
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
+
 ./configure
-$MAKE magic >stdout
-cat stdout
-grep '~' stdout && Exit 1
-Exit 0
+$MAKE test
+
+:
diff --git a/tests/txinfo21.test b/tests/txinfo21.test
index 4bbce4a..ae1d985 100755
--- a/tests/txinfo21.test
+++ b/tests/txinfo21.test
@@ -95,11 +95,11 @@ test -d sub/main2.html
 test -d rec/main3.html
 
 # Rebuilding main.html should cause its timestamp to be updated.
-test `ls -1td main.texi main.html | sed 1q` = main.html
+is_newest main.html main.texi
 $sleep
 touch main.texi
 $MAKE html
-test `ls -1td main.texi main.html | sed 1q` = main.html
+is_newest main.html main.texi
 
 $MAKE clean
 test ! -d main.html
@@ -118,8 +118,8 @@ test ! -f rec/main3.html
 
 # Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
 cat >>Makefile.am <<\EOF
-AM_MAKEINFOHTMLFLAGS=--no-split
-AM_MAKEINFOFLAGS=--unsupported-option
+AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
+AM_MAKEINFOFLAGS = --unsupported-option
 EOF
 $AUTOMAKE
 ./configure --prefix "`pwd`"
diff --git a/tests/txinfo22.test b/tests/txinfo22.test
index 3c2265d..c2f23e1 100755
--- a/tests/txinfo22.test
+++ b/tests/txinfo22.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,32 +16,27 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure the user can override TEXINFO_TEX.
-# Report from Tom Tromey.
-# Also make sure Automake ignores in-line comments when using variables,
-# but preserve them in the output.
 # Also make sure TEXINFO_TEX is not distributed.
+# Report from Tom Tromey.
 
 required='makeinfo tex texi2dvi'
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT([txinfo22], [1.0])
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([aux1])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
-# Use a slash in the comment, because automake takes the dirname
-# of TEXINFO_TEX to compute $(am__TEXINFO_TEX_DIR)...
 cat > Makefile.am << 'END'
-TEXINFO_TEX = $(srcdir)/tex/texinfo.tex    # some comment w/ a slash
+TEXINFO_TEX = $(srcdir)/tex/texinfo.tex
 info_TEXINFOS = main.texi
 sure_it_exists:
        test -f $(TEXINFO_TEX)
-       test -d "$(am__TEXINFO_TEX_DIR)"
 sure_it_is_not_distributed: distdir
        test ! -f $(distdir)/tex/texinfo.tex
 END
@@ -67,7 +63,9 @@ test ! -f aux1/texinfo.tex
 test -f tex/texinfo.tex
 
 ./configure
+
 $MAKE sure_it_exists
 $MAKE distcheck
-grep 'TEXINFO_TEX = .* # some comment w/ a slash' Makefile
 $MAKE sure_it_is_not_distributed
+
+:
diff --git a/tests/txinfo23.test b/tests/txinfo23.test
index 903e681..660487d 100755
--- a/tests/txinfo23.test
+++ b/tests/txinfo23.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,15 +14,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check for subdir Texinfo in $(srcdir).
+# Check that info files are built in builddir when needed.
+# Test with subdir Texinfo.
 # (Similar to txinfo13.test, plus DISTCLEANFILES.)
+# (See also txinfo24.test and txinfo25.test)
 
 required='makeinfo tex texi2dvi-o'
 . ./defs || Exit 1
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 DISTCLEANFILES = subdir/*.info*
@@ -50,7 +54,6 @@ cat > subdir/inc.texi << 'END'
 I'm included.
 END
 
-
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
@@ -60,3 +63,6 @@ cd build
 ../configure
 $MAKE distcheck
 test -f subdir/main.info
+test ! -f ../subdir/main.info
+
+:
diff --git a/tests/txinfo24.test b/tests/txinfo24.test
index 4c0bc82..fc9f9d1 100755
--- a/tests/txinfo24.test
+++ b/tests/txinfo24.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,13 +16,16 @@
 
 # Check that info files are built in builddir when needed.
 # (Similar to txinfo16.test, plus CLEANFILES.)
+# (See also txinfo23.test and txinfo25.test)
 
 required='makeinfo tex texi2dvi-o'
 . ./defs || Exit 1
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 CLEANFILES = main.info
@@ -47,6 +50,7 @@ mkdir build
 cd build
 ../configure
 $MAKE
+test ! -f ../main.info
 test -f main.info
 
 cd ..
@@ -77,3 +81,5 @@ $MAKE dvi
 test -f main.dvi
 
 $MAKE distcheck
+
+:
diff --git a/tests/txinfo25.test b/tests/txinfo25.test
index 85007f9..f80b035 100755
--- a/tests/txinfo25.test
+++ b/tests/txinfo25.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,15 +14,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Similar to texinfo24.test, but with two info files, only one of
-# which being cleaned.
+# Check that info files are built in builddir and in srcdir can safely
+# co-exist.  This setup is obtained by having two info files, only one
+# of which being cleaned.
+# (Similar to txinfo16.test, plus CLEANFILES.)
+# (See also txinfo23.test and txinfo24.test)
 
 required='makeinfo tex texi2dvi-o'
 . ./defs || Exit 1
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 CLEANFILES = [a-m]*.info
@@ -104,3 +109,5 @@ test -f main.dvi
 test -f other.dvi
 
 $MAKE distcheck
+
+:
diff --git a/tests/txinfo29.test b/tests/txinfo29.test
index 1d4aeff..42dd3ab 100755
--- a/tests/txinfo29.test
+++ b/tests/txinfo29.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ echo '@setfilename baz.info' > bar.texi
 
 $ACLOCAL
 AUTOMAKE_fails --add-missing
-grep '^Makefile.am:1:.*user variable.*INFO_DEPS' stderr
+grep '^Makefile\.am:1:.*user variable.*INFO_DEPS' stderr
 grep 'overrides Automake variable.*INFO_DEPS' stderr
 
 $AUTOMAKE -Wno-override
@@ -38,19 +38,20 @@ $AUTOMAKE -Wno-override
 # There is only one definition of INFO_DEPS
 test 1 = `grep '^INFO_DEPS.*=' Makefile.in | wc -l`
 # and it is the right one.
-grep '^INFO_DEPS = foo.info$' Makefile.in
-
+grep '^INFO_DEPS *= *foo.info *$' Makefile.in
 
 # Likewise with AC_SUBST.
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = bar.texi
 END
-echo 'AC_SUBST([INFO_DEPS])' >>configure.in
+cat >> configure.in << 'END'
+AC_SUBST([INFO_DEPS])
+END
 rm -rf autom4te.cache # Make sure autoconf sees the configure.in update.
 AUTOMAKE_fails
 
-grep '^configure.in:4:.*user variable.*INFO_DEPS' stderr
+grep '^configure\.in:4:.*user variable.*INFO_DEPS' stderr
 grep 'overrides Automake variable.*INFO_DEPS' stderr
 
 $AUTOMAKE -Wno-override
@@ -58,4 +59,6 @@ $AUTOMAKE -Wno-override
 # There is only one definition of INFO_DEPS
 test 1 = `grep '^INFO_DEPS.*=' Makefile.in | wc -l`
 # and it is the right one.
-grep '^INFO_DEPS = @address@hidden' Makefile.in
+grep '^INFO_DEPS *= address@hidden@ *$' Makefile.in
+
+:
diff --git a/tests/txinfo3.test b/tests/txinfo3.test
index dcdfcfa..6af712f 100755
--- a/tests/txinfo3.test
+++ b/tests/txinfo3.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2003, 2008  Free Software Foundation,
-# Inc.
+# Copyright (C) 1997, 2001, 2002, 2003, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,9 @@ required='makeinfo tex texi2dvi'
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
@@ -45,8 +47,10 @@ grep '^INFO_DEPS.*textutils$' Makefile.in
 
 # We should not use single suffix inference rules (with separate
 # dependencies), this confuses Solaris make.
-grep '^.texi:$' Makefile.in && Exit 1
-grep 'textutils: textutils.texi' Makefile.in
+grep '^\.texi:$' Makefile.in && Exit 1
+grep 'textutils: *textutils\.texi' Makefile.in
 
 ./configure
 $MAKE distcheck
+
+:
diff --git a/tests/txinfo30.test b/tests/txinfo30.test
index 8db42d9..296180d 100755
--- a/tests/txinfo30.test
+++ b/tests/txinfo30.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ EOF
 
 chmod +x makeinfo
 
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
 export PATH
 
 $ACLOCAL
diff --git a/tests/txinfo4.test b/tests/txinfo4.test
index 1c6a92f..0c55a1c 100755
--- a/tests/txinfo4.test
+++ b/tests/txinfo4.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,4 +30,6 @@ echo '@setfilename textutils.frob' > textutils.texi
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'textutils.texi:1:.*textutils.frob.*extension' stderr
+grep 'textutils\.texi:1:.*textutils\.frob.*extension' stderr
+
+:
diff --git a/tests/txinfo5.test b/tests/txinfo5.test
index 0bbc7d9..0b3ea68 100755
--- a/tests/txinfo5.test
+++ b/tests/txinfo5.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2008  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,9 +16,15 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure that texinfo.tex is not required by --cygnus.
+# Also check that TEXINFOS + cygnus work without requiring the
+# `-Wno-override' option.
+# See also sister test txinfo5b.test.
 # Report from Ian Taylor.
+
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AM_MAINTAINER_MODE
 END
@@ -28,5 +35,7 @@ END
 
 echo '@setfilename ian.info' > ian.texi
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE --cygnus
+
+:
diff --git a/tests/txinfo5b.test b/tests/txinfo5b.test
new file mode 100755
index 0000000..f14eadb
--- /dev/null
+++ b/tests/txinfo5b.test
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 1998, 2001, 2002, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure that texinfo.tex is not required by --cygnus.
+# See also sister test txinfo5.test.
+# Report from Ian Taylor.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_MAINTAINER_MODE
+END
+
+cat > Makefile.am << 'END'
+# Disable `override' warning to work around an unrelated
+# texi+cygnus bug.
+AUTOMAKE_OPTIONS = -Wno-override
+info_TEXINFOS = ian.texi
+END
+
+echo '@setfilename ian.info' > ian.texi
+
+$ACLOCAL
+$AUTOMAKE --cygnus
+$AUTOMAKE -a --cygnus
+test ! -f texinfo.tex
+
+:
diff --git a/tests/txinfo6.test b/tests/txinfo6.test
index ad3704e..f5b8c0b 100755
--- a/tests/txinfo6.test
+++ b/tests/txinfo6.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,11 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure `.txi' extension works.
+
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = foo.txi
 END
@@ -24,7 +27,9 @@ END
 echo '@setfilename foo.info' > foo.txi
 : > texinfo.tex
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^\.txi\.info: *$' Makefile.in
 
-$FGREP '.txi.info' Makefile.in
+:
diff --git a/tests/txinfo7.test b/tests/txinfo7.test
index 466a216..9a1dd5c 100755
--- a/tests/txinfo7.test
+++ b/tests/txinfo7.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,15 +19,17 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
-magic:
-       @echo $(DISTFILES)
 END
 
 echo '@setfilename textutils.info' > textutils.texi
 
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
 
 test -f texinfo.tex
+
+:
diff --git a/tests/txinfo8.test b/tests/txinfo8.test
index 7975b28..13c8e31 100755
--- a/tests/txinfo8.test
+++ b/tests/txinfo8.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004  Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2011 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -21,32 +21,45 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AC_CONFIG_AUX_DIR(sub)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
+.PHONY: test1 test2
+test1:
+       @echo DISTFILES = $(DISTFILES)
+       echo ' ' $(DISTFILES) ' ' | grep '[ /]auxdir/texinfo\.tex '
+test2: distdir
+       ls -l $(distdir)/*
+       test -f $(distdir)/auxdir/texinfo.tex
 END
 
 echo '@setfilename textutils.info' > textutils.texi
 
-test -d sub || mkdir sub
+mkdir auxdir
 
-cat > sub/Makefile.am << 'END'
-magic:
-       @echo $(DISTFILES)
-END
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+test -f auxdir/texinfo.tex
+
+./configure
 
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+# Create textutils.info by hand, so that we don't have to require
+# makeinfo.  Also ensure it's really newer than textutils.texi, so
+# that make won't try to re-create it.
+$sleep
+: > textutils.info
 
-$FGREP -v @SET_MAKE@ sub/Makefile.in > sub/Makefile.sed
-test -f sub/texinfo.tex &&
-$MAKE -s -f sub/Makefile.sed SHELL=$SHELL magic | grep 'texinfo\.tex'
-stat=$?
+$MAKE test1 test2
 
-Exit $stat
+:
diff --git a/tests/txinfo9.test b/tests/txinfo9.test
index b9eb7b5..71b5efb 100755
--- a/tests/txinfo9.test
+++ b/tests/txinfo9.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,12 +14,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure we only create dist-info target once.
-# This is just an example -- basically for many targets in texinfos.am
-# we only want them to appear once.
+# Make sure we only create texinfo-related targets once.
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = maude.texi liver.txi heart.texinfo
 END
@@ -29,7 +29,15 @@ echo '@setfilename liver.info' > liver.txi
 echo '@setfilename heart.info' > heart.texinfo
 : > texinfo.tex
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+# These are just examples -- basically for many targets in texinfos.am
+# we only want them to appear once.  But grepping them all would be
+# overkill.
+for t in info dist-info dvi-am install-html uninstall-pdf-am; do
+  $EGREP "(^| )$t*.:" Makefile.in # help in debugging
+  test `$EGREP -c "(^| )$t(:| *.:)" Makefile.in` -eq 1
+done
 
-test `grep '^dist-info:' Makefile.in | wc -l` -eq 1
+:
diff --git a/tests/vala-vpath.test b/tests/vala-vpath.test
new file mode 100755
index 0000000..98e0f43
--- /dev/null
+++ b/tests/vala-vpath.test
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure vala support handles from-scratch VPATH builds.
+# See automake bug#8753.
+
+required="valac"
+. ./defs || Exit 1
+
+set -e
+
+mkdir src
+
+cat >> configure.in << 'END'
+AC_CONFIG_SRCDIR([hello.vala])
+AC_PROG_CC
+AM_PROG_VALAC([0.7])
+AC_OUTPUT
+END
+
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = hello.vala
+END
+
+cat > hello.vala <<'END'
+void main ()
+{
+  stdout.printf ("foo\n");
+  return 0;
+}
+END
+
+$ACLOCAL  || framework_failure_ "aclocal error"
+$AUTOCONF || framework_failure_ "autoconf error"
+$AUTOMAKE || framework_failure_ "automake error"
+
+mkdir build
+cd build
+../configure || Exit 77
+$MAKE
+$MAKE distcheck
+
+:
diff --git a/tests/vtexi.test b/tests/vtexi.test
index c28a356..e9a4511 100755
--- a/tests/vtexi.test
+++ b/tests/vtexi.test
@@ -1,6 +1,6 @@
 #!/bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Basic checks and some regressions testing on `version.texi'
+# support for texinfo files.
+
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
 END
@@ -30,9 +35,7 @@ END
 : > mdate-sh
 : > texinfo.tex
 
-set -e
-
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
 
 # Test for bug reported by Jim Meyering:
@@ -41,25 +44,22 @@ $AUTOMAKE
 #   textutils.info: textutils.texi
 # instead of
 #   textutils.info: textutils.texi version.texi
-# (Today this should be `textutils.info: version.texi')
-
-grep 'textutils\.info:.*version\.texi$' Makefile.in
-
+# Today this should be:
+#   $(srcdir)/textutils.info: $(srcdir)/version.texi
+# or:
+#   $(srcdir)/textutils.info: version.texi
+grep '^\$(srcdir)/textutils\.info:.*[ /]version\.texi *$' Makefile.in
 
 # Test for bug reported by Lars Hecking:
 # When running the first version of configure.ac aware automake,
 # @CONFIGURE_AC@ was not properly substituted.
-
 $EGREP 'stamp-vti:.*textutils\.texi( .*)?$' Makefile.in
 $EGREP 'stamp-vti:.*\$\(top_srcdir\)/configure( .*)?$' Makefile.in
 
-
 # Check that the path to mdate-sh is correct.  Over escaping of `$'
 # etc. once led to `\$\(srcdir\)/mdate-sh'.
+# Filter out '$(srcdir)/mdate-sh'; there should be no occurrences
+# of `.../mdate-sh' left then.
+sed 's,\$(srcdir)/mdate-sh,,g' Makefile.in | grep '/mdate-sh' && Exit 1
 
-# Filter out '$(srcdir)/mdate-sh'; output occurrences of `SOMETHING/mdate-sh'
-sed -n 's,\$(srcdir)/mdate-sh,,g;s,.* \([^ ]*/mdate-sh\) .*,\1,gp' Makefile.in|
-# There must remain nothing.
- grep . && Exit 1
-
-Exit 0
+:
diff --git a/tests/vtexi2.test b/tests/vtexi2.test
index e1a1b93..00e4c1e 100755
--- a/tests/vtexi2.test
+++ b/tests/vtexi2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
+# Copyright (C) 1996, 1997, 2001, 2002, 2011 Free Software Foundation,
 # Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@ info_TEXINFOS = zardoz.texi
 END
 
 cat > zardoz.texi << 'END'
address@hidden  zardoz  
address@hidden zardoz
 @include version.texi
 END
 
@@ -40,4 +40,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^zardoz\.dvi:' Makefile.in
+grep '^zardoz\.dvi:.*[ /]version.texi' Makefile.in
+
+:
diff --git a/tests/vtexi3.test b/tests/vtexi3.test
new file mode 100755
index 0000000..4b0f45d
--- /dev/null
+++ b/tests/vtexi3.test
@@ -0,0 +1,126 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that vers*.texi files are automatically created and distributed
+# if @included into a texi source.  Also check that they correctly contain
+# the @values definitions they are advertised to.
+# See also the related test `vtexi4.test', which does similar checks, but
+# for version.texi only, and requires makeinfo, tex and texi2dvi.
+
+. ./defs || Exit 1
+
+set -e
+
+# We are going to override package version in AC_INIT, so we need
+# to redefine the name of the distdir as well.
+distdir=$me-7.45.3a
+
+# This should work without tex, texinfo or makeinfo
+TEX=false TEXI2DVI=false MAKEINFO=false
+export TEX TEXI2DVI MAKEINFO
+
+cat > configure.in << END
+AC_INIT([$me], [7.45.3a])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foobar.texi quux.texi zardoz.texi
+.PHONY: echo-distfiles
+echo-distfiles:
+       @echo ' ' $(DISTFILES) ' '
+END
+
+cat > foobar.texi << 'END'
address@hidden foobar.info
+random text
address@hidden version.texi
+END
+
+cat > quux.texi << 'END'
address@hidden quux.info
address@hidden version-quux.texi
+random text
+END
+
+cat > zardoz.texi << 'END'
address@hidden zardoz.info
+some randome text
address@hidden vers1a_2b.texi
+more random text
+END
+
+# Required when using Texinfo.
+: > texinfo.tex
+cp "$testsrcdir/../lib/mdate-sh" .
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+day='([1-9]|1[0-9]|2[0-9]|3[01])'
+month='(January|February|March|April|May|June|July|August|September|October|November|December)'
+year='20[0-9][0-9]' # Hopefully automake will be obsolete in 80 years ;-)
+date="$day $month $year"
+
+do_check ()
+{
+  # Basename of the vers*.texi file.
+  vfile=$1
+  # The $(srcdir) of the current build.
+  srcdir=$2
+  # The vers*.texi file must be created in $(srcdir).
+  $MAKE $srcdir/$vfile.texi
+  cat $srcdir/$vfile.texi
+  # EDITION and VERSION are synonyms, as per documentation.
+  grep "address@hidden EDITION 7\\.45\\.3a$" $srcdir/$vfile.texi
+  grep "address@hidden VERSION 7\\.45\\.3a$" $srcdir/$vfile.texi
+  # Check that UPDATED seems right, and that UPDATED and UPDATED-MONTH
+  # are consistent.
+  $EGREP "address@hidden UPDATED $date$" $srcdir/$vfile.texi
+  vmonth=`grep 'address@hidden UPDATED ' $srcdir/$vfile.texi | awk '{print $4, 
$5}'`
+  grep "address@hidden UPDATED-MONTH $vmonth$" $srcdir/$vfile.texi
+  # Check that the vers*.texi file is distributed according
+  # to $(DISTFILES).
+  $MAKE echo-distfiles # For debugging.
+  $MAKE -s echo-distfiles | grep "[ /]$vfile\\.texi"
+}
+
+mkdir build
+cd build
+../configure
+
+do_check version ..
+do_check version-quux ..
+do_check vers1a_2b ..
+
+# The various $(srcdir)/*.info are required for the distribution
+# and they must be newer than version.texi, so that make won't try
+# to rebuild them.
+$sleep
+touch ../foobar.info
+touch ../quux.info
+touch ../zardoz.info
+# Check that the vers*.texi files are really distributed.
+$MAKE distdir
+ls -l $distdir
+diff ../version.texi $distdir/version.texi
+diff ../version-quux.texi $distdir/version-quux.texi
+diff ../version.texi $distdir/vers1a_2b.texi
+
+:
diff --git a/tests/vtexi4.test b/tests/vtexi4.test
new file mode 100755
index 0000000..3c8ab41
--- /dev/null
+++ b/tests/vtexi4.test
@@ -0,0 +1,118 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the version.texi file is automatically created and distributed
+# if @included into a texi source.  Also check that is correctly defined
+# @values definitions it is advertised to.
+# See also the related test `vtexi3.test', which does similar checks, but
+# for more vers*.texi files, and does not require makeinfo, tex and
+# texi2dvi.
+
+required='makeinfo tex texi2dvi-o'
+. ./defs || Exit 1
+
+set -e
+
+case `LC_ALL=C date '+%u'` in
+  [1-7]) date_is_posix=:;;
+      *) date_is_posx=false;;
+esac
+$date_is_posix \
+  && day=`LC_ALL=C date '+%d'` && test -n "$day" \
+  && month=`LC_ALL=C date '+%B'` && test -n "$month" \
+  && year=`LC_ALL=C date '+%Y'`&& test -n "$year" \
+  || { echo "$me: 'date' is not POSIX-compliant enough"; Exit 77; }
+day=`echo "$day" | sed 's/^0//'`
+
+# This test requires a grep program that can work on non-text input.
+(echo 'x' | grep x) || {
+  echo "$me: grep doesn't work on input that is not pure text" >&2
+  Exit 77
+}
+
+cat > configure.in << END
+AC_INIT([$me], [123.456])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > defs.am <<END
+my_date_rx = $day $month $year
+my_month_rx = $month $year
+my_version_rx = 123\.456
+END
+
+cat > Makefile.am << 'END'
+include defs.am
+info_TEXINFOS = foo.texi
+test-grepinfo:
+## Not useless uses of cat: we only tested that grep worked on
+## non-text input when that's given from a pipe.
+       cat $(srcdir)/foo.info | grep 'GREPVERSION=$(my_version_rx)='
+       cat $(srcdir)/foo.info | grep 'GREPEDITION=$(my_version_rx)='
+       cat $(srcdir)/foo.info | grep 'GREPDATE=$(my_date_rx)='
+       cat $(srcdir)/foo.info | grep 'GREPMONTH=$(my_month_rx)='
+test-distfiles:
+       @echo DISTFILES = $(DISTFILES)
+       echo ' ' $(DISTFILES) ' ' | grep '[ /]version.texi '
+test-distdir: distdir
+       ls -l $(distdir)
+       diff $(srcdir)/version.texi $(distdir)/version.texi
+.PHONY: test-grepinfo test-distfiles test-distdir
+check-local: test-grepinfo test-distfiles test-distdir
+END
+
+cat > foo.texi << 'END'
+\input texinfo
address@hidden %**start of header
address@hidden foo.info
address@hidden Zardoz
address@hidden %**end of header
+
address@hidden Top
address@hidden version.texi
+
address@hidden
+
address@hidden
+
address@hidden
+
address@hidden
+
address@hidden
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE all dvi
+
+# debugging & sanity checks
+ls -l
+cat version.texi
+cat foo.info
+test -f foo.dvi
+
+$MAKE test-grepinfo
+$MAKE test-distfiles
+$MAKE test-distdir
+$MAKE distcheck
+
+:
diff --git a/tests/yacc-dist-nobuild-subdir.test 
b/tests/yacc-dist-nobuild-subdir.test
new file mode 100755
index 0000000..b6811d7
--- /dev/null
+++ b/tests/yacc-dist-nobuild-subdir.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that VPATH builds and "make distcheck" works with packages
+# using yacc and the automake 'subdir-objects' option.
+# Exposes automake bug#8485.
+
+required=yacc
+. ./defs || Exit 1
+
+set -e
+
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat > sub/parse.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) { return; }
+%}
+%%
+x : 'x' {};
+%%
+int main (void)
+{
+  return yyparse ();
+}
+END
+
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_PROGRAMS = foo bar
+foo_SOURCES = sub/parse.y
+bar_SOURCES = $(foo_SOURCES)
+AM_YFLAGS = -d
+bar_YFLAGS =
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE distdir
+
+# Yacc-derived C source and header files must be built and distributed
+
+test   -f sub/parse.c
+test   -f sub/parse.h
+test   -f sub/bar-parse.c
+test ! -r sub/bar-parse.h
+
+test   -f $distdir/sub/parse.c
+test   -f $distdir/sub/parse.h
+test   -f $distdir/sub/bar-parse.c
+test ! -r $distdir/sub/bar-parse.h
+
+# But they shouldn't be rebuilt in VPATH builds.
+
+mkdir $distdir/build
+chmod -R a-w $distdir
+cd $distdir/build
+chmod u+w .
+# Try to enable dependency tracking even with slow dependency
+# extractors, to improve coverage.
+../configure --enable-dependency-tracking YACC=false
+YACC=false $MAKE -e
+ls -l sub/*.[ch] && Exit 1
+
+env YACC=false DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE -e distcheck
+
+:
diff --git a/tests/yacc5.test b/tests/yacc5.test
index 8b00ed8..f428396 100755
--- a/tests/yacc5.test
+++ b/tests/yacc5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ mkdir sub
 $ACLOCAL
 $AUTOMAKE -a
 
-grep '^maude\.c:' Makefile.in
+grep '^maude\.c:.*maude\.y' Makefile.in
 
 
 ## Try again with subdir-objects.
@@ -56,8 +56,9 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-# No rule needed, the default .y.c: inference rule is enough.
-grep '^sub/maude\.c:' Makefile.in && Exit 1
+# No rule needed, the default .y.c: inference rule is enough
+# (but there may be an additional dependency on a dirstamp file).
+grep '^sub/maude\.c:.*maude\.y' Makefile.in && Exit 1
 
 
 ## Try again with per-exe flags.
@@ -80,3 +81,5 @@ grep 'maudec' Makefile.in && Exit 1
 
 # Make sure the .o file is required.
 grep '^am_maude_OBJECTS.*maude' Makefile.in
+
+:
diff --git a/tests/yaccdry.test b/tests/yaccdry.test
new file mode 100755
index 0000000..d2e7632
--- /dev/null
+++ b/tests/yaccdry.test
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Removal recovery rules for headers should not remove files with `make -n'.
+
+required=bison
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AM_YFLAGS = -d
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c parse.y
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+cat > parse.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+./configure
+$MAKE
+
+rm -f parse.h
+$MAKE -n parse.h
+test -f parse.c
+test ! -f parse.h
+
+:
diff --git a/tests/yflags.test b/tests/yflags.test
index fcb0c64..dbc3a73 100755
--- a/tests/yflags.test
+++ b/tests/yflags.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,6 +30,10 @@ echo 'extern int dummy;' >> y.tab.c
 END
 chmod a+x fake-yacc
 
+# Remove Yacc from the environment, so that it won't interfere
+# with `make -e' below.
+unset YACC || :
+
 cat >> configure.in <<'END'
 AC_PROG_CC
 # Simulate presence of Yacc using our fake-yacc script.
diff --git a/tests/yflags2.test b/tests/yflags2.test
index 346c2e4..02aed8d 100755
--- a/tests/yflags2.test
+++ b/tests/yflags2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,6 +31,10 @@ echo 'extern int dummy;' >> y.tab.c
 END
 chmod a+x fake-yacc
 
+# Remove Yacc from the environment, so that it won't interfere
+# with `make -e' below.
+unset YACC || :
+
 cat >> configure.in <<'END'
 AC_PROG_CXX
 # Simulate presence of Yacc using our fake-yacc script.


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]